src/jdk/nashorn/internal/runtime/ScriptingFunctions.java

changeset 344
b0dcc3727fc3
parent 327
35bba63990b7
child 655
adab2c628923
equal deleted inserted replaced
343:d26e069353c0 344:b0dcc3727fc3
219 219
220 final String out = outBuffer.toString(); 220 final String out = outBuffer.toString();
221 final String err = errBuffer.toString(); 221 final String err = errBuffer.toString();
222 222
223 // Set globals for secondary results. 223 // Set globals for secondary results.
224 final boolean isStrict = global.isStrictContext(); 224 global.set(OUT_NAME, out, false);
225 global.set(OUT_NAME, out, isStrict); 225 global.set(ERR_NAME, err, false);
226 global.set(ERR_NAME, err, isStrict); 226 global.set(EXIT_NAME, exit, false);
227 global.set(EXIT_NAME, exit, isStrict);
228 227
229 // Propagate exception if present. 228 // Propagate exception if present.
230 for (int i = 0; i < exception.length; i++) { 229 for (int i = 0; i < exception.length; i++) {
231 if (exception[i] != null) { 230 if (exception[i] != null) {
232 throw exception[i]; 231 throw exception[i];

mercurial