| Index: Source/bindings/v8/BindingSecurity.cpp
|
| diff --git a/Source/bindings/v8/BindingSecurity.cpp b/Source/bindings/v8/BindingSecurity.cpp
|
| index 59cc6b1c1e387a747f17575b1017b7c0e37cf9a8..6b6110381e2cd484af6d083dc22539c7b7785947 100644
|
| --- a/Source/bindings/v8/BindingSecurity.cpp
|
| +++ b/Source/bindings/v8/BindingSecurity.cpp
|
| @@ -80,14 +80,18 @@ static bool canAccessDocument(v8::Isolate* isolate, Document* targetDocument, Se
|
| return false;
|
| }
|
|
|
| -bool BindingSecurity::shouldAllowAccessToFrame(v8::Isolate* isolate, LocalFrame* target, SecurityReportingOption reportingOption)
|
| +bool BindingSecurity::shouldAllowAccessToFrame(v8::Isolate* isolate, Frame* target, SecurityReportingOption reportingOption)
|
| {
|
| - return target && canAccessDocument(isolate, target->document(), reportingOption);
|
| + if (!target || !target->isLocalFrame())
|
| + return false;
|
| + return canAccessDocument(isolate, toLocalFrame(target)->document(), reportingOption);
|
| }
|
|
|
| -bool BindingSecurity::shouldAllowAccessToFrame(v8::Isolate* isolate, LocalFrame* target, ExceptionState& exceptionState)
|
| +bool BindingSecurity::shouldAllowAccessToFrame(v8::Isolate* isolate, Frame* target, ExceptionState& exceptionState)
|
| {
|
| - return target && canAccessDocument(isolate, target->document(), exceptionState);
|
| + if (!target || !target->isLocalFrame())
|
| + return false;
|
| + return canAccessDocument(isolate, toLocalFrame(target)->document(), exceptionState);
|
| }
|
|
|
| bool BindingSecurity::shouldAllowAccessToNode(v8::Isolate* isolate, Node* target, ExceptionState& exceptionState)
|
|
|