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

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

Issue 2683993003: Move toEventTarget to EventTarget (Closed)
Patch Set: Inline toEventTarget in V8Binding::toEventTarget Created 3 years, 10 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 | third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/core/v8/DictionaryHelperForCore.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/DictionaryHelperForCore.cpp b/third_party/WebKit/Source/bindings/core/v8/DictionaryHelperForCore.cpp
index 0a60f975f2533c68861550340788ef2aa34734e5..7d502cf547cf6337c17e7fbac596e0c0f97b0d89 100644
--- a/third_party/WebKit/Source/bindings/core/v8/DictionaryHelperForCore.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/DictionaryHelperForCore.cpp
@@ -236,23 +236,7 @@ bool DictionaryHelper::get(const Dictionary& dictionary,
if (!dictionary.get(key, v8Value))
return false;
- value = nullptr;
- // We need to handle a DOMWindow specially, because a DOMWindow wrapper
- // exists on a prototype chain of v8Value.
- if (v8Value->IsObject()) {
- v8::Local<v8::Object> wrapper = v8::Local<v8::Object>::Cast(v8Value);
- v8::Local<v8::Object> window =
- V8Window::findInstanceInPrototypeChain(wrapper, dictionary.isolate());
- if (!window.IsEmpty()) {
- value = toWrapperTypeInfo(window)->toEventTarget(window);
- return true;
- }
- }
-
- if (V8DOMWrapper::isWrapper(dictionary.isolate(), v8Value)) {
- v8::Local<v8::Object> wrapper = v8::Local<v8::Object>::Cast(v8Value);
- value = toWrapperTypeInfo(wrapper)->toEventTarget(wrapper);
- }
+ value = toEventTarget(dictionary.isolate(), v8Value);
return true;
}
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698