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

Unified Diff: third_party/WebKit/Source/bindings/templates/interface_base.cpp

Issue 2209303002: binding: Moves the check for the first access to the initial document into BindingSecurity. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments. Created 4 years, 4 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 | « third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/templates/interface_base.cpp
diff --git a/third_party/WebKit/Source/bindings/templates/interface_base.cpp b/third_party/WebKit/Source/bindings/templates/interface_base.cpp
index 1ea037fe52ae7869108177bcca360bbdd6bb7cd7..e4fe0cd7522eec3b1667862f126d4967b6d6b6d7 100644
--- a/third_party/WebKit/Source/bindings/templates/interface_base.cpp
+++ b/third_party/WebKit/Source/bindings/templates/interface_base.cpp
@@ -88,19 +88,7 @@ bool securityCheck(v8::Local<v8::Context> accessingContext, v8::Local<v8::Object
if (window.IsEmpty())
return false; // the frame is gone.
- DOMWindow* targetWindow = V8Window::toImpl(window);
- ASSERT(targetWindow);
- if (!targetWindow->isLocalDOMWindow())
- return false;
-
- LocalFrame* targetFrame = toLocalDOMWindow(targetWindow)->frame();
- if (!targetFrame)
- return false;
-
- // Notify the loader's client if the initial document has been accessed.
- if (targetFrame->loader().stateMachine()->isDisplayingInitialEmptyDocument())
- targetFrame->loader().didAccessInitialDocument();
-
+ const DOMWindow* targetWindow = V8Window::toImpl(window);
return BindingSecurity::shouldAllowAccessTo(isolate, toLocalDOMWindow(toDOMWindow(accessingContext)), targetWindow, DoNotReportSecurityError);
{% else %}{# if interface_name == 'Window' #}
{# Not 'Window' means it\'s Location. #}
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/BindingSecurity.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698