Chromium Code Reviews| Index: third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
| diff --git a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
| index 8df616db64ac390ada680866c0801f65b3a9562d..e34a8b21e095d66fdae733400edb334962736de8 100644 |
| --- a/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
| +++ b/third_party/WebKit/Source/bindings/core/v8/V8Binding.cpp |
| @@ -797,15 +797,7 @@ EventTarget* toEventTarget(v8::Isolate* isolate, v8::Local<v8::Value> value) { |
| // exists on a prototype chain of v8Value. |
| if (DOMWindow* window = toDOMWindow(isolate, value)) |
|
Yuki
2017/02/13 05:48:00
I think we no longer need this hack.
https://crre
|
| return window; |
| - if (V8EventTarget::hasInstance(value, isolate)) { |
| - v8::Local<v8::Object> object = v8::Local<v8::Object>::Cast(value); |
| - const WrapperTypeInfo* wrapperTypeInfo = toWrapperTypeInfo(object); |
| - if (wrapperTypeInfo->eventTargetInheritance == |
| - WrapperTypeInfo::NotInheritFromEventTarget) |
| - return nullptr; |
| - return static_cast<EventTarget*>(toScriptWrappable(object)); |
| - } |
| - return nullptr; |
| + return V8EventTarget::toImplWithTypeCheck(isolate, value); |
| } |
| void toFlexibleArrayBufferView(v8::Isolate* isolate, |