diff options
Diffstat (limited to 'deps/v8/src/api-natives.cc')
-rw-r--r-- | deps/v8/src/api-natives.cc | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/deps/v8/src/api-natives.cc b/deps/v8/src/api-natives.cc index 2e34595ab5..7b5541a1c3 100644 --- a/deps/v8/src/api-natives.cc +++ b/deps/v8/src/api-natives.cc @@ -69,15 +69,19 @@ MaybeHandle<Object> DefineAccessorProperty( !FunctionTemplateInfo::cast(*getter)->do_not_cache()); DCHECK(!setter->IsFunctionTemplateInfo() || !FunctionTemplateInfo::cast(*setter)->do_not_cache()); - if (force_instantiate) { - if (getter->IsFunctionTemplateInfo()) { + if (getter->IsFunctionTemplateInfo()) { + if (force_instantiate || + FunctionTemplateInfo::cast(*getter)->BreakAtEntry()) { ASSIGN_RETURN_ON_EXCEPTION( isolate, getter, InstantiateFunction(isolate, Handle<FunctionTemplateInfo>::cast(getter)), Object); } - if (setter->IsFunctionTemplateInfo()) { + } + if (setter->IsFunctionTemplateInfo()) { + if (force_instantiate || + FunctionTemplateInfo::cast(*setter)->BreakAtEntry()) { ASSIGN_RETURN_ON_EXCEPTION( isolate, setter, InstantiateFunction(isolate, @@ -85,9 +89,10 @@ MaybeHandle<Object> DefineAccessorProperty( Object); } } - RETURN_ON_EXCEPTION(isolate, JSObject::DefineAccessor(object, name, getter, - setter, attributes), - Object); + RETURN_ON_EXCEPTION( + isolate, + JSObject::DefineAccessor(object, name, getter, setter, attributes), + Object); return object; } @@ -492,8 +497,9 @@ MaybeHandle<JSFunction> InstantiateFunction(Isolate* isolate, ASSIGN_RETURN_ON_EXCEPTION(isolate, parent_prototype, GetInstancePrototype(isolate, parent), JSFunction); + CHECK(parent_prototype->IsHeapObject()); JSObject::ForceSetPrototype(Handle<JSObject>::cast(prototype), - parent_prototype); + Handle<HeapObject>::cast(parent_prototype)); } } InstanceType function_type = |