Skip to content

Commit

Permalink
V8 in Node 12 broke fibers. Work around with --no-wasm-code-gc.
Browse files Browse the repository at this point in the history
Node issue: nodejs/node#29767

Meteor's work-around: meteor/meteor@c37bab6

Meteor PR: meteor/meteor#10798
  • Loading branch information
kentonv committed Mar 15, 2020
1 parent f9e048c commit 13aed75
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/sandstorm/run-bundle.c++
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,9 @@ public:
kj::Vector<const char*> argv;
argv.add(nodePath.cStr());
argv.add("--expose-gc");
// --no-wasm-code-gc to work around https://github.com/nodejs/node/issues/29767
// Meteor did this too: https://github.com/meteor/meteor/commit/c37bab64a4750eafbc6483ee82f67e6ff6221029
argv.add("--no-wasm-code-gc");
argv.add("meteor-bundle-main.js");
argv.add(mainScriptPath.cStr());
argv.add(portArg.cStr());
Expand Down Expand Up @@ -2614,7 +2617,10 @@ private:

kj::String settingsString = makeMeteorSettings(config, buildstamp);
KJ_SYSCALL(setenv("METEOR_SETTINGS", settingsString.cStr(), true));
KJ_SYSCALL(execl("/bin/node", "/bin/node", "sandstorm-main.js", EXEC_END_ARGS));
// --no-wasm-code-gc to work around https://github.com/nodejs/node/issues/29767
// Meteor did this too: https://github.com/meteor/meteor/commit/c37bab64a4750eafbc6483ee82f67e6ff6221029
KJ_SYSCALL(execl("/bin/node", "/bin/node", "--no-wasm-code-gc",
"sandstorm-main.js", EXEC_END_ARGS));
KJ_UNREACHABLE;
});

Expand Down

0 comments on commit 13aed75

Please sign in to comment.