Index: src/accessors.cc |
diff --git a/src/accessors.cc b/src/accessors.cc |
index 9bd6e5bb2c1b9bba335606f1ce6e3c1f47c04e92..ed9d2940e623fc518fc7c7e677144167ee36d150 100644 |
--- a/src/accessors.cc |
+++ b/src/accessors.cc |
@@ -172,7 +172,10 @@ void Accessors::ArgumentsIteratorSetter( |
LookupIterator it(object, Utils::OpenHandle(*name)); |
CHECK_EQ(LookupIterator::ACCESSOR, it.state()); |
DCHECK(it.HolderIsReceiverOrHiddenPrototype()); |
- Object::SetDataProperty(&it, value); |
+ |
+ if (Object::SetDataProperty(&it, value).is_null()) { |
+ isolate->OptionalRescheduleException(false); |
+ } |
} |
@@ -247,7 +250,7 @@ void Accessors::ArrayLengthSetter( |
if (uint32_v->Number() == number_v->Number()) { |
maybe = JSArray::SetElementsLength(array_handle, uint32_v); |
- maybe.Check(); |
+ if (maybe.is_null()) isolate->OptionalRescheduleException(false); |
return; |
} |
@@ -881,9 +884,8 @@ static Handle<Object> GetFunctionPrototype(Isolate* isolate, |
} |
-static Handle<Object> SetFunctionPrototype(Isolate* isolate, |
- Handle<JSFunction> function, |
- Handle<Object> value) { |
+MUST_USE_RESULT static MaybeHandle<Object> SetFunctionPrototype( |
+ Isolate* isolate, Handle<JSFunction> function, Handle<Object> value) { |
Handle<Object> old_value; |
bool is_observed = function->map()->is_observed(); |
if (is_observed) { |
@@ -897,16 +899,17 @@ static Handle<Object> SetFunctionPrototype(Isolate* isolate, |
DCHECK(function->prototype() == *value); |
if (is_observed && !old_value->SameValue(*value)) { |
- JSObject::EnqueueChangeRecord( |
+ MaybeHandle<Object> result = JSObject::EnqueueChangeRecord( |
function, "update", isolate->factory()->prototype_string(), old_value); |
+ if (result.is_null()) return MaybeHandle<Object>(); |
} |
return function; |
} |
-Handle<Object> Accessors::FunctionSetPrototype(Handle<JSFunction> function, |
- Handle<Object> prototype) { |
+MaybeHandle<Object> Accessors::FunctionSetPrototype(Handle<JSFunction> function, |
+ Handle<Object> prototype) { |
DCHECK(function->should_have_prototype()); |
Isolate* isolate = function->GetIsolate(); |
return SetFunctionPrototype(isolate, function, prototype); |
@@ -937,7 +940,9 @@ void Accessors::FunctionPrototypeSetter( |
} |
Handle<JSFunction> object = |
Handle<JSFunction>::cast(Utils::OpenHandle(*info.Holder())); |
- SetFunctionPrototype(isolate, object, value); |
+ if (SetFunctionPrototype(isolate, object, value).is_null()) { |
+ isolate->OptionalRescheduleException(false); |
+ } |
} |