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, |