diff options
Diffstat (limited to 'deps/v8/src/accessors.cc')
-rw-r--r-- | deps/v8/src/accessors.cc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/deps/v8/src/accessors.cc b/deps/v8/src/accessors.cc index ae59ec3356e..da935f36528 100644 --- a/deps/v8/src/accessors.cc +++ b/deps/v8/src/accessors.cc @@ -4,7 +4,7 @@ #include "src/accessors.h" -#include "src/api.h" +#include "src/api-inl.h" #include "src/contexts.h" #include "src/deoptimizer.h" #include "src/execution.h" @@ -13,6 +13,7 @@ #include "src/isolate-inl.h" #include "src/messages.h" #include "src/objects/api-callbacks.h" +#include "src/objects/js-array-inl.h" #include "src/objects/module-inl.h" #include "src/property-details.h" #include "src/prototype.h" @@ -77,8 +78,7 @@ bool Accessors::IsJSObjectFieldAccessor(Isolate* isolate, Handle<Map> map, } V8_WARN_UNUSED_RESULT MaybeHandle<Object> -Accessors::ReplaceAccessorWithDataProperty(Isolate* isolate, - Handle<Object> receiver, +Accessors::ReplaceAccessorWithDataProperty(Handle<Object> receiver, Handle<JSObject> holder, Handle<Name> name, Handle<Object> value) { @@ -112,8 +112,8 @@ void Accessors::ReconfigureToDataProperty( Handle<JSObject>::cast(Utils::OpenHandle(*info.Holder())); Handle<Name> name = Utils::OpenHandle(*key); Handle<Object> value = Utils::OpenHandle(*val); - MaybeHandle<Object> result = Accessors::ReplaceAccessorWithDataProperty( - isolate, receiver, holder, name, value); + MaybeHandle<Object> result = + Accessors::ReplaceAccessorWithDataProperty(receiver, holder, name, value); if (result.is_null()) { isolate->OptionalRescheduleException(false); } else { @@ -327,6 +327,7 @@ void Accessors::FunctionPrototypeGetter( HandleScope scope(isolate); Handle<JSFunction> function = Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder())); + DCHECK(function->has_prototype_property()); Handle<Object> result = GetFunctionPrototype(isolate, function); info.GetReturnValue().Set(Utils::ToLocal(result)); } @@ -341,6 +342,7 @@ void Accessors::FunctionPrototypeSetter( Handle<Object> value = Utils::OpenHandle(*val); Handle<JSFunction> object = Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder())); + DCHECK(object->has_prototype_property()); JSFunction::SetPrototype(object, value); info.GetReturnValue().Set(true); } @@ -857,8 +859,8 @@ void Accessors::ErrorStackGetter( Utils::OpenHandle(*v8::Local<v8::Value>(info.This())); Handle<Name> name = Utils::OpenHandle(*key); if (IsAccessor(receiver, name, holder)) { - result = Accessors::ReplaceAccessorWithDataProperty( - isolate, receiver, holder, name, formatted_stack_trace); + result = Accessors::ReplaceAccessorWithDataProperty(receiver, holder, name, + formatted_stack_trace); if (result.is_null()) { isolate->OptionalRescheduleException(false); return; |