| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index 89052139dfb598e9f2e3fc46b1998a7746f0ecbf..61381a0f946ab71282a93a5749c6c6a0ce64ccb3 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -1001,10 +1001,10 @@ bool Isolate::IsErrorObject(Handle<Object> obj) {
|
| js_builtins_object(), error_key).ToHandleChecked();
|
|
|
| DisallowHeapAllocation no_gc;
|
| - for (Object* prototype = *obj; !prototype->IsNull();
|
| - prototype = prototype->GetPrototype(this)) {
|
| - if (!prototype->IsJSObject()) return false;
|
| - if (JSObject::cast(prototype)->map()->constructor() ==
|
| + for (PrototypeIterator<STORE_AS_POINTER, TYPE_BASED_WALK, END_AT_NULL_VALUE>
|
| + iter(this, *obj); !iter.IsAtEnd(); iter.Advance()) {
|
| + if (!iter.GetCurrent()->IsJSObject()) return false;
|
| + if (JSObject::cast(iter.GetCurrent())->map()->constructor() ==
|
| *error_constructor) {
|
| return true;
|
| }
|
| @@ -2183,13 +2183,13 @@ bool Isolate::IsFastArrayConstructorPrototypeChainIntact() {
|
|
|
| // Check that the object prototype hasn't been altered WRT empty elements.
|
| JSObject* initial_object_proto = JSObject::cast(*initial_object_prototype());
|
| - Object* root_array_map_proto = initial_array_proto->GetPrototype();
|
| + Object* root_array_map_proto = SAFE_GET_PROTOTYPE_FAST(initial_array_proto);
|
| if (root_array_map_proto != initial_object_proto) return false;
|
| if (initial_object_proto->elements() != heap()->empty_fixed_array()) {
|
| return false;
|
| }
|
|
|
| - return initial_object_proto->GetPrototype()->IsNull();
|
| + return SAFE_GET_PROTOTYPE_FAST(initial_object_proto)->IsNull();
|
| }
|
|
|
|
|
|
|