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

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

Issue 2065523002: binding: Fixes the fallback mechanism of Document's named properties. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Synced. 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 bdf76edfc2536574abceed985a63be93a34d6d4f..849eeed174dfde1a5b985140c30206f6af4c80bf 100644
--- a/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/WindowProxy.cpp
@@ -521,12 +521,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