| Index: src/string-stream.cc
|
| diff --git a/src/string-stream.cc b/src/string-stream.cc
|
| index 930ce3dff535b182c6949c207163159ef1f3d014..e77148da669e88a41ebe2be7ce1ee5192e6be95c 100644
|
| --- a/src/string-stream.cc
|
| +++ b/src/string-stream.cc
|
| @@ -5,6 +5,7 @@
|
| #include "src/string-stream.h"
|
|
|
| #include "src/handles-inl.h"
|
| +#include "src/prototype-iterator.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -506,11 +507,10 @@ void StringStream::PrintPrototype(JSFunction* fun, Object* receiver) {
|
| Object* name = fun->shared()->name();
|
| bool print_name = false;
|
| Isolate* isolate = fun->GetIsolate();
|
| - for (Object* p = receiver;
|
| - p != isolate->heap()->null_value();
|
| - p = p->GetPrototype(isolate)) {
|
| - if (p->IsJSObject()) {
|
| - Object* key = JSObject::cast(p)->SlowReverseLookup(fun);
|
| + for (PrototypeIterator<STORE_AS_POINTER, TYPE_BASED_WALK, END_AT_NULL_VALUE>
|
| + iter(isolate, receiver); !iter.IsAtEnd(); iter.Advance()) {
|
| + if (iter.GetCurrent()->IsJSObject()) {
|
| + Object* key = JSObject::cast(iter.GetCurrent())->SlowReverseLookup(fun);
|
| if (key != isolate->heap()->undefined_value()) {
|
| if (!name->IsString() ||
|
| !key->IsString() ||
|
|
|