| Index: third_party/WebKit/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp
|
| diff --git a/third_party/WebKit/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp b/third_party/WebKit/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp
|
| index 58528e582143bf48b4546ba67bc2c61159f8776c..2f0b950526e2645f706ef25cfd9f04bd23042c55 100644
|
| --- a/third_party/WebKit/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp
|
| +++ b/third_party/WebKit/Source/bindings/core/v8/custom/V8EventTargetCustom.cpp
|
| @@ -78,13 +78,9 @@ void V8EventTarget::addEventListenerMethodCustom(const v8::FunctionCallbackInfo<
|
| return;
|
| }
|
| EventTarget* impl = V8EventTarget::toImpl(info.Holder());
|
| - if (LocalDOMWindow* window = impl->toDOMWindow()) {
|
| - if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), callingDOMWindow(info.GetIsolate()), window->frame(), exceptionState)) {
|
| - exceptionState.throwIfNeeded();
|
| - return;
|
| - }
|
| - if (!window->document())
|
| - return;
|
| + if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), callingDOMWindow(info.GetIsolate()), impl, exceptionState)) {
|
| + exceptionState.throwIfNeeded();
|
| + return;
|
| }
|
| V8StringResource<> type;
|
| RefPtrWillBeRawPtr<EventListener> listener;
|
| @@ -121,13 +117,9 @@ void V8EventTarget::removeEventListenerMethodCustom(const v8::FunctionCallbackIn
|
| return;
|
| }
|
| EventTarget* impl = V8EventTarget::toImpl(info.Holder());
|
| - if (LocalDOMWindow* window = impl->toDOMWindow()) {
|
| - if (!BindingSecurity::shouldAllowAccessToFrame(info.GetIsolate(), callingDOMWindow(info.GetIsolate()), window->frame(), exceptionState)) {
|
| - exceptionState.throwIfNeeded();
|
| - return;
|
| - }
|
| - if (!window->document())
|
| - return;
|
| + if (!BindingSecurity::shouldAllowAccessTo(info.GetIsolate(), callingDOMWindow(info.GetIsolate()), impl, exceptionState)) {
|
| + exceptionState.throwIfNeeded();
|
| + return;
|
| }
|
| V8StringResource<> type;
|
| RefPtrWillBeRawPtr<EventListener> listener;
|
|
|