Chromium Code Reviews| Index: Source/bindings/v8/BindingSecurity.cpp |
| diff --git a/Source/bindings/v8/BindingSecurity.cpp b/Source/bindings/v8/BindingSecurity.cpp |
| index 59cc6b1c1e387a747f17575b1017b7c0e37cf9a8..54937e4e6bbba0e2482fa96872713b503e5c113e 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->isLocalFrame()) |
|
eseidel
2014/03/24 16:12:48
This makes much more sense, thank you.
|
| + return false; |
| + return target && 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->isLocalFrame()) |
| + return false; |
| + return target && canAccessDocument(isolate, toLocalFrame(target)->document(), exceptionState); |
| } |
| bool BindingSecurity::shouldAllowAccessToNode(v8::Isolate* isolate, Node* target, ExceptionState& exceptionState) |