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

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

Issue 2069953002: binding: Fixes the fallback mechanism of Document's named properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
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 ae45713e008b0b2fd6407d1e148676c8c8f4a46c..4c7b46ab97f3eaba17d96736989d1be325485723 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
@@ -540,12 +540,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