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

Unified Diff: src/messages.cc

Issue 1218023002: Use correct LookupIterator in CallSite::GetMethodName. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | test/mjsunit/regress/regress-crbug-505370.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/messages.cc
diff --git a/src/messages.cc b/src/messages.cc
index a69df0463a892b8dbcbc93d828cc726b7ace9906..5e050bd2909f17fcf4a27433c30f9ad15cc61093 100644
--- a/src/messages.cc
+++ b/src/messages.cc
@@ -175,10 +175,11 @@ Handle<Object> CallSite::GetScriptNameOrSourceUrl(Isolate* isolate) {
}
-bool CheckMethodName(Handle<JSObject> obj, Handle<Name> name,
+bool CheckMethodName(Isolate* isolate, Handle<JSObject> obj, Handle<Name> name,
Handle<JSFunction> fun,
LookupIterator::Configuration config) {
- LookupIterator iter(obj, name, config);
+ LookupIterator iter =
+ LookupIterator::PropertyOrElement(isolate, obj, name, config);
if (iter.state() == LookupIterator::DATA) {
return iter.GetDataValue().is_identical_to(fun);
} else if (iter.state() == LookupIterator::ACCESSOR) {
@@ -203,7 +204,7 @@ Handle<Object> CallSite::GetMethodName(Isolate* isolate) {
Handle<Object> function_name(fun_->shared()->name(), isolate);
if (function_name->IsName()) {
Handle<Name> name = Handle<Name>::cast(function_name);
- if (CheckMethodName(obj, name, fun_,
+ if (CheckMethodName(isolate, obj, name, fun_,
LookupIterator::PROTOTYPE_CHAIN_SKIP_INTERCEPTOR))
return name;
}
@@ -222,7 +223,7 @@ Handle<Object> CallSite::GetMethodName(Isolate* isolate) {
HandleScope inner_scope(isolate);
if (!keys->get(i)->IsName()) continue;
Handle<Name> name_key(Name::cast(keys->get(i)), isolate);
- if (!CheckMethodName(current_obj, name_key, fun_,
+ if (!CheckMethodName(isolate, current_obj, name_key, fun_,
LookupIterator::OWN_SKIP_INTERCEPTOR))
continue;
// Return null in case of duplicates to avoid confusion.
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-505370.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698