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

Unified Diff: third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp

Issue 2713413002: Blink bindings: use v8 to enforce method call access checks (Closed)
Patch Set: Restore comment Created 3 years, 10 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: third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp
diff --git a/third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp b/third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp
index ba4232ef62ab4ba376ffb57b022cecbe8d6932a5..aeef8217f0134e24772c6491660eb6f7c1c6158c 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp
@@ -49,6 +49,8 @@ static bool isAllowed(ScriptState* scriptState,
bool isEval) {
if (executionContext->isDocument()) {
Document* document = static_cast<Document*>(executionContext);
+ if (!document->frame())
+ return false;
if (isEval &&
!document->contentSecurityPolicy()->allowEval(
scriptState, ContentSecurityPolicy::SendReport,

Powered by Google App Engine
This is Rietveld 408576698