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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp

Issue 2070463002: binding: Fixes the fallback mechanism of Document's named properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2743
Patch Set: Created 4 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 | « third_party/WebKit/LayoutTests/fast/dom/HTMLDocument/named-item-not-found.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
index 1fabde7f93d8889df8fd40b01d57c04d6678e494..9d3b961cab70db200aaa192460c19d5a02066995 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
@@ -520,12 +520,9 @@ static void getter(v8::Local<v8::Name> property, const v8::PropertyCallbackInfo<
v8SetReturnValue(info, result);
return;
}
- v8::Local<v8::Value> prototype = info.Holder()->GetPrototype();
- if (prototype->IsObject()) {
- v8::Local<v8::Value> value;
- if (prototype.As<v8::Object>()->Get(info.GetIsolate()->GetCurrentContext(), property).ToLocal(&value))
- v8SetReturnValue(info, value);
- }
+ v8::Local<v8::Value> value;
+ if (info.Holder()->GetRealNamedPropertyInPrototypeChain(info.GetIsolate()->GetCurrentContext(), property.As<v8::String>()).ToLocal(&value))
+ v8SetReturnValue(info, value);
}
void WindowProxy::namedItemAdded(HTMLDocument* document, const AtomicString& name)
« no previous file with comments | « third_party/WebKit/LayoutTests/fast/dom/HTMLDocument/named-item-not-found.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698