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

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

Issue 2702213004: Add security checks to scheduled actions (Closed)
Patch Set: updates 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 d595c27a9d873db21245f146d9e65754015b0b50..ba4232ef62ab4ba376ffb57b022cecbe8d6932a5 100644
--- a/third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp
+++ b/third_party/WebKit/Source/core/frame/DOMWindowTimers.cpp
@@ -85,8 +85,8 @@ int setTimeout(ScriptState* scriptState,
// be done using the scheduler instead.
V8GCForContextDispose::instance().notifyIdle();
}
- ScheduledAction* action =
- ScheduledAction::create(scriptState, handler, arguments);
+ ScheduledAction* action = ScheduledAction::create(
+ scriptState, executionContext, handler, arguments);
return DOMTimer::install(executionContext, action, timeout, true);
}
@@ -107,7 +107,8 @@ int setTimeout(ScriptState* scriptState,
// be done using the scheduler instead.
V8GCForContextDispose::instance().notifyIdle();
}
- ScheduledAction* action = ScheduledAction::create(scriptState, handler);
+ ScheduledAction* action =
+ ScheduledAction::create(scriptState, executionContext, handler);
return DOMTimer::install(executionContext, action, timeout, true);
}
@@ -119,8 +120,8 @@ int setInterval(ScriptState* scriptState,
ExecutionContext* executionContext = eventTarget.getExecutionContext();
if (!isAllowed(scriptState, executionContext, false))
return 0;
- ScheduledAction* action =
- ScheduledAction::create(scriptState, handler, arguments);
+ ScheduledAction* action = ScheduledAction::create(
+ scriptState, executionContext, handler, arguments);
return DOMTimer::install(executionContext, action, timeout, false);
}
@@ -136,7 +137,8 @@ int setInterval(ScriptState* scriptState,
// perfomance issue.
if (handler.isEmpty())
return 0;
- ScheduledAction* action = ScheduledAction::create(scriptState, handler);
+ ScheduledAction* action =
+ ScheduledAction::create(scriptState, executionContext, handler);
return DOMTimer::install(executionContext, action, timeout, false);
}
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/ScheduledAction.cpp ('k') | third_party/WebKit/Source/core/testing/Internals.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698