Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: src/accessors.cc

Issue 390323002: Remove JSReceiver::GetPrototype and replace it with PrototypeIterator calls (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/accessors.cc
diff --git a/src/accessors.cc b/src/accessors.cc
index 13c28038875da867fc738222b6f66251fbd2d0d4..182f0f63420e26e6c20cfbb3239a3e0f5200082d 100644
--- a/src/accessors.cc
+++ b/src/accessors.cc
@@ -846,8 +846,8 @@ static Handle<Object> GetFunctionPrototype(Isolate* isolate,
JSFunction* function_raw = FindInstanceOf<JSFunction>(isolate, *receiver);
if (function_raw == NULL) return isolate->factory()->undefined_value();
while (!function_raw->should_have_prototype()) {
- function_raw = FindInstanceOf<JSFunction>(isolate,
- function_raw->GetPrototype());
+ PrototypeIterator iter(isolate, function_raw);
+ function_raw = FindInstanceOf<JSFunction>(isolate, iter.GetCurrent());
// There has to be one because we hit the getter.
ASSERT(function_raw != NULL);
}
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698