Skip to content

Commit

Permalink
Fixes #976 running with java 8 nashorn produces ReferenceError: proce…
Browse files Browse the repository at this point in the history
…ss is not defined
  • Loading branch information
jrburke committed Feb 12, 2018
1 parent c0f2086 commit 1752638
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
5 changes: 0 additions & 5 deletions build/jslib/uglifyjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -10416,11 +10416,6 @@ exports["is_identifier"] = is_identifier;
exports["SymbolDef"] = SymbolDef;

AST_Node.warn_function = function(txt) { logger.error("uglifyjs WARN: " + txt); };
// workaround for tty output truncation upon process.exit()
[process.stdout, process.stderr].forEach(function(stream){
if (stream._handle && stream._handle.setBlocking)
stream._handle.setBlocking(true);
});

exports.AST_Node.warn_function = function(txt) {
console.error("WARN: %s", txt);
Expand Down
10 changes: 10 additions & 0 deletions build/jslib/uglifyjs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,16 @@ THINGS TO CHECK:

REMOVE this section:

```javascript
// workaround for tty output truncation upon process.exit()
[process.stdout, process.stderr].forEach(function(stream){
if (stream._handle && stream._handle.setBlocking)
stream._handle.setBlocking(true);
});
```

ALSO REMOVE this section:

```javascript
var path = require("path");
var fs = require("fs");
Expand Down
2 changes: 1 addition & 1 deletion build/jslib/x.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var requirejs, require, define, xpcUtil;
(function (console, args, readFileFunc) {
var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode, Cc, Ci,
version = '2.3.5',
version = '2.3.5+',
jsSuffixRegExp = /\.js$/,
commandOption = '',
useLibLoaded = {},
Expand Down
9 changes: 2 additions & 7 deletions dist/r.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* @license r.js 2.3.5 Copyright jQuery Foundation and other contributors.
* @license r.js 2.3.5 Mon, 12 Feb 2018 00:23:55 GMT Copyright jQuery Foundation and other contributors.
* Released under MIT license, http://github.com/requirejs/r.js/LICENSE
*/

Expand All @@ -19,7 +19,7 @@ var requirejs, require, define, xpcUtil;
(function (console, args, readFileFunc) {
var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire,
nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode, Cc, Ci,
version = '2.3.5',
version = '2.3.5+ Mon, 12 Feb 2018 00:23:55 GMT',
jsSuffixRegExp = /\.js$/,
commandOption = '',
useLibLoaded = {},
Expand Down Expand Up @@ -24656,11 +24656,6 @@ exports["is_identifier"] = is_identifier;
exports["SymbolDef"] = SymbolDef;

AST_Node.warn_function = function(txt) { logger.error("uglifyjs WARN: " + txt); };
// workaround for tty output truncation upon process.exit()
[process.stdout, process.stderr].forEach(function(stream){
if (stream._handle && stream._handle.setBlocking)
stream._handle.setBlocking(true);
});

exports.AST_Node.warn_function = function(txt) {
console.error("WARN: %s", txt);
Expand Down

0 comments on commit 1752638

Please sign in to comment.