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

Unified Diff: Source/bindings/core/v8/ScriptController.cpp

Issue 516273002: Move plugin placeholder style to CSS, and allow it to bypass main world CSP. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: add the actual .css file Created 6 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
Index: Source/bindings/core/v8/ScriptController.cpp
diff --git a/Source/bindings/core/v8/ScriptController.cpp b/Source/bindings/core/v8/ScriptController.cpp
index 30482004680d0ffe285856ea4f2d91cca0fb404e..f4c8860f065ead18c124d5a2eac325f4d26dc22b 100644
--- a/Source/bindings/core/v8/ScriptController.cpp
+++ b/Source/bindings/core/v8/ScriptController.cpp
@@ -96,6 +96,7 @@ ScriptController::ScriptController(LocalFrame* frame)
, m_isolate(v8::Isolate::GetCurrent())
, m_windowProxy(WindowProxy::create(frame, DOMWrapperWorld::mainWorld(), m_isolate))
, m_windowScriptNPObject(0)
+ , m_bypassMainWorldCSP(false)
{
}
@@ -240,6 +241,9 @@ WindowProxy* ScriptController::windowProxy(DOMWrapperWorld& world)
bool ScriptController::shouldBypassMainWorldCSP()
{
+ if (m_bypassMainWorldCSP)
+ return true;
+
v8::Handle<v8::Context> context = m_isolate->GetCurrentContext();
if (context.IsEmpty() || !toDOMWindow(context))
return false;

Powered by Google App Engine
This is Rietveld 408576698