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

Unified Diff: Source/web/WebLocalFrameImpl.cpp

Issue 854453003: Revert of Revert of Reland factor out window proxy management portions of ScriptController. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 5 years, 11 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/v8.gypi ('k') | no next file » | 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 054d85d2d4248bce2b4b8ffbfebecd3d0af9b719..b2810a241a4528b615bdadbeedf4b89227d506fd 100644
--- a/Source/web/WebLocalFrameImpl.cpp
+++ b/Source/web/WebLocalFrameImpl.cpp
@@ -153,6 +153,7 @@
#include "modules/push_messaging/PushController.h"
#include "modules/screen_orientation/ScreenOrientationController.h"
#include "modules/speech/SpeechRecognitionController.h"
+#include "platform/ScriptForbiddenScope.h"
#include "platform/TraceEvent.h"
#include "platform/UserGestureIndicator.h"
#include "platform/clipboard/ClipboardUtilities.h"
@@ -707,7 +708,7 @@ void WebLocalFrameImpl::dispatchUnloadEvent()
NPObject* WebLocalFrameImpl::windowObject() const
{
- if (!frame())
+ if (!frame() || ScriptForbiddenScope::isScriptForbidden())
return 0;
return frame()->script().windowScriptNPObject();
}
« no previous file with comments | « Source/bindings/core/v8/v8.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698