diff options
Diffstat (limited to 'src/node_contextify.cc')
-rw-r--r-- | src/node_contextify.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 7710c252b2..ff66ffdaaa 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -456,8 +456,12 @@ class ContextifyContext { Maybe<bool> success = ctx->sandbox()->Delete(ctx->context(), property); - if (success.IsJust()) - args.GetReturnValue().Set(success.FromJust()); + if (success.FromMaybe(false)) + return; + + // Delete failed on the sandbox, intercept and do not delete on + // the global object. + args.GetReturnValue().Set(false); } |