Chromium Code Reviews| Index: src/runtime.cc |
| diff --git a/src/runtime.cc b/src/runtime.cc |
| index f307c5d52cfa4a3e4d51650b3dba5f6fe95d6175..7d4ee5b2726a64102b0142491732b5115fbb3999 100644 |
| --- a/src/runtime.cc |
| +++ b/src/runtime.cc |
| @@ -4899,7 +4899,7 @@ MaybeHandle<Object> Runtime::GetElementOrCharAt(Isolate* isolate, |
| Handle<Object> result; |
| if (object->IsString() || object->IsNumber() || object->IsBoolean()) { |
| - Handle<Object> proto(object->GetPrototype(isolate), isolate); |
| + Handle<Object> proto = Object::GetPrototype(isolate, object); |
| return Object::GetElement(isolate, proto, index); |
| } else { |
| return Object::GetElement(isolate, object, index); |
| @@ -10623,7 +10623,7 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetArrayKeys) { |
| Handle<FixedArray> keys = isolate->factory()->empty_fixed_array(); |
| for (Handle<Object> p = array; |
| !p->IsNull(); |
| - p = Handle<Object>(p->GetPrototype(isolate), isolate)) { |
| + p = Object::GetPrototype(isolate, p)) { |
| if (p->IsJSProxy() || JSObject::cast(*p)->HasIndexedInterceptor()) { |
| // Bail out if we find a proxy or interceptor, likely not worth |
| // collecting keys in that case. |
| @@ -12825,7 +12825,8 @@ static MaybeObject* DebugEvaluate(Isolate* isolate, |
| // Skip the global proxy as it has no properties and always delegates to the |
| // real global object. |
| if (result->IsJSGlobalProxy()) { |
| - result = Handle<JSObject>(JSObject::cast(result->GetPrototype(isolate))); |
| + Handle<Object> proto = Object::GetPrototype(isolate, result); |
| + result = handle(JSObject::cast(*proto)); |
|
Yang
2014/04/15 13:10:48
Use Handle<JSObject>::cast here. That will not cre
|
| } |
| // Clear the oneshot breakpoints so that the debugger does not step further. |
| @@ -12980,7 +12981,7 @@ static int DebugReferencedBy(HeapIterator* iterator, |
| FixedArray* instances, int instances_size, |
| JSFunction* arguments_function) { |
| Isolate* isolate = target->GetIsolate(); |
| - SealHandleScope shs(isolate); |
| + HandleScope shs(isolate); |
| DisallowHeapAllocation no_allocation; |
| // Iterate the heap. |
| @@ -13006,7 +13007,8 @@ static int DebugReferencedBy(HeapIterator* iterator, |
| if (!instance_filter->IsUndefined()) { |
| Object* V = obj; |
| while (true) { |
| - Object* prototype = V->GetPrototype(isolate); |
| + Object* prototype = |
| + *Object::GetPrototype(isolate, handle(V, isolate)); |
|
Yang
2014/04/15 13:10:48
This function is not handlified. Please don't do i
|
| if (prototype->IsNull()) { |
| break; |
| } |