Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d89f719

Browse filesBrowse files
legendecasaduh95
authored andcommitted
src: remove outdated comments in contextify
PR-URL: #62932 Refs: #61898 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ilyas Shabi <ilyasshabi94@gmail.com>
1 parent c1d6b3d commit d89f719
Copy full SHA for d89f719

1 file changed

-30Lines changed: 0 additions & 30 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎src/node_contextify.cc‎

Copy file name to clipboardExpand all lines: src/node_contextify.cc
-30Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.