@@ -600,38 +600,8 @@ Intercepted ContextifyContext::PropertySetterCallback(
600600 return Intercepted::kNo ;
601601 }
602602
603- // V8 comment: As long as the context is not detached the contextual accesses
604- // are the same as regular accesses to `context->Global()`s data property.
605- // The only difference is that after detaching `args.Holder()` will
606- // become a new identity and will no longer be equal to `context->Global()`.
607- // TODO(Node.js): revise the code below as the "contextual"-ness of the
608- // store is not actually relevant here. Also, new variable declaration is
609- // reported by V8 via PropertyDefinerCallback.
610603 bool is_declared = is_declared_on_global_proxy || is_declared_on_sandbox;
611604
612- /*
613- // true for x = 5
614- // false for this.x = 5
615- // false for Object.defineProperty(this, 'foo', ...)
616- // false for vmResult.x = 5 where vmResult = vm.runInContext();
617-
618- bool is_contextual_store = ctx->global_proxy() != args.This();
619-
620- // Indicator to not return before setting (undeclared) function declarations
621- // on the sandbox in strict mode, i.e. args.ShouldThrowOnError() = true.
622- // True for 'function f() {}', 'this.f = function() {}',
623- // 'var f = function()'.
624- // In effect only for 'function f() {}' because
625- // var f = function(), is_declared = true
626- // this.f = function() {}, is_contextual_store = false.
627- bool is_function = value->IsFunction();
628-
629- bool is_declared = is_declared_on_global_proxy || is_declared_on_sandbox;
630- if (!is_declared && args.ShouldThrowOnError() && is_contextual_store &&
631- !is_function) {
632- return Intercepted::kNo;
633- }
634- */
635605 if (!is_declared && property->IsSymbol ()) {
636606 return Intercepted::kNo ;
637607 }
0 commit comments