Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Unified Diff: src/api-natives.cc

Issue 2201113002: [api] Fix IsSimpleInstantion check in InstantiatObject (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api-natives.cc
diff --git a/src/api-natives.cc b/src/api-natives.cc
index bb1119dc59466ece534a8bfc5ccf6cc3a7af935b..b70cb0a646e2e9cafdb99fb9a2118c02b1c119ae 100644
--- a/src/api-natives.cc
+++ b/src/api-natives.cc
@@ -334,8 +334,7 @@ bool IsSimpleInstantiation(Isolate* isolate, ObjectTemplateInfo* info,
JSFunction* fun = JSFunction::cast(new_target);
if (fun->shared()->function_data() != info->constructor()) return false;
if (info->immutable_proto()) return false;
- return fun->context()->native_context() !=
- isolate->context()->native_context();
+ return fun->context()->native_context() == isolate->raw_native_context();
}
MaybeHandle<JSObject> InstantiateObject(Isolate* isolate,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698