Skip to content

Commit

Permalink
lib: worker fix workers isolation
Browse files Browse the repository at this point in the history
Added strict mode inside the worker script.

Fixes: nodejs#24947
  • Loading branch information
sagitsofan committed Dec 24, 2018
1 parent 6061d24 commit f34f390
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/internal/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ function setupChild(evalScript) {
port.unref();
port.postMessage({ type: messageTypes.UP_AND_RUNNING });
if (doEval) {
filename = `'use strict'; ${filename}`;
evalScript('[worker eval]', filename);
} else {
process.argv[1] = filename; // script filename
Expand Down

0 comments on commit f34f390

Please sign in to comment.