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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 1235463006: Export BindingSecurity checks via WebFrame (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 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 | « Source/bindings/core/v8/BindingSecurity.h ('k') | public/web/WebFrame.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/WebLocalFrameImpl.cpp
diff --git a/Source/web/WebLocalFrameImpl.cpp b/Source/web/WebLocalFrameImpl.cpp
index 02c239e5269994f4437674fb7456c484e56fdd65..224d445e24820954ef1276705fde3a125d594447 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -85,6 +85,7 @@
#include "config.h"
#include "web/WebLocalFrameImpl.h"
+#include "bindings/core/v8/BindingSecurity.h"
#include "bindings/core/v8/DOMWrapperWorld.h"
#include "bindings/core/v8/ExceptionState.h"
#include "bindings/core/v8/ExceptionStatePlaceholder.h"
@@ -199,6 +200,7 @@
#include "public/web/WebHistoryItem.h"
#include "public/web/WebIconURL.h"
#include "public/web/WebInputElement.h"
+#include "public/web/WebKit.h"
#include "public/web/WebNode.h"
#include "public/web/WebPerformance.h"
#include "public/web/WebPlugin.h"
@@ -947,6 +949,11 @@ v8::Local<v8::Context> WebLocalFrameImpl::mainWorldScriptContext() const
return scriptState->context();
}
+bool WebFrame::scriptCanAccess(WebFrame* target)
+{
+ return BindingSecurity::shouldAllowAccessToFrame(mainThreadIsolate(), toCoreFrame(target), DoNotReportSecurityError);
+}
+
void WebLocalFrameImpl::reload(bool ignoreCache)
{
// TODO(clamy): Remove this function once RenderFrame calls load for all
« no previous file with comments | « Source/bindings/core/v8/BindingSecurity.h ('k') | public/web/WebFrame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698