Index: src/runtime.cc |
diff --git a/src/runtime.cc b/src/runtime.cc |
index 495cccbd450dc8beac94870f253efffd1b8b2baa..811f3bc2617c7e17ab15e4a23751ac9e6c27de2b 100644 |
--- a/src/runtime.cc |
+++ b/src/runtime.cc |
@@ -628,11 +628,10 @@ RUNTIME_FUNCTION(MaybeObject*, Runtime_GetPrototype) { |
NoHandleAllocation ha; |
ASSERT(args.length() == 1); |
Object* obj = args[0]; |
- obj = obj->GetPrototype(); |
- while (obj->IsJSObject() && |
- JSObject::cast(obj)->map()->is_hidden_prototype()) { |
+ do { |
obj = obj->GetPrototype(); |
- } |
+ } while (obj->IsJSObject() && |
+ JSObject::cast(obj)->map()->is_hidden_prototype()); |
return obj; |
} |