Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 29f7603

Browse files
committed
chore: Upgrade isolated-vm, remove deprecated extension code
1 parent 91d6ca0 commit 29f7603

File tree

3 files changed

+60
-26
lines changed

3 files changed

+60
-26
lines changed

package-lock.json

Lines changed: 54 additions & 24 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/worker/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"cargo-cp-artifact": "^0.1.4",
2929
"dedent": "^0.7.0",
3030
"fs-extra": "^9.0.1",
31-
"isolated-vm": "^4.2.0",
31+
"isolated-vm": "^4.3.3",
3232
"memfs": "^3.2.2",
3333
"ms": "^2.1.3",
3434
"nan": "^2.14.2",

packages/worker/workflow-isolate-extension.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,12 @@ void custom_promise_hook(
2525
PromiseHookType type,
2626
Local<Promise> promise,
2727
Local<Value> parent
28-
) {
28+
) {
29+
#if V8_AT_LEAST(9, 0, 0)
30+
Local<Context> context = promise->GetCreationContext().ToLocalChecked();
31+
#else
2932
Local<Context> context = promise->CreationContext();
33+
#endif
3034
Local<Function> fn = Local<Function>::Cast(context->GetEmbedderData(EMBEDDER_DATA_IDX));
3135

3236
const unsigned argc = 3;

0 commit comments

Comments
 (0)