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

Unified Diff: third_party/WebKit/WebCore/page/DOMTimer.cpp

Issue 20076: WebKit merge 40500:40539 [WebKit side] (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 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/WebCore/page/DOMTimer.cpp
===================================================================
--- third_party/WebKit/WebCore/page/DOMTimer.cpp (revision 9118)
+++ third_party/WebKit/WebCore/page/DOMTimer.cpp (working copy)
@@ -27,7 +27,6 @@
#include "config.h"
#include "DOMTimer.h"
-#include "Document.h"
#include "ScheduledAction.h"
#include "ScriptExecutionContext.h"
#include <wtf/HashSet.h>
@@ -58,10 +57,7 @@
m_nestingLevel = timerNestingLevel + 1;
- // FIXME: Move the timeout map and API to ScriptExecutionContext to be able
- // to create timeouts from Workers.
- ASSERT(scriptExecutionContext() && scriptExecutionContext()->isDocument());
- static_cast<Document*>(scriptExecutionContext())->addTimeout(m_timeoutId, this);
+ scriptExecutionContext()->addTimeout(m_timeoutId, this);
double intervalMilliseconds = max(oneMillisecond, timeout * oneMillisecond);
@@ -79,8 +75,7 @@
DOMTimer::~DOMTimer()
{
if (scriptExecutionContext()) {
- ASSERT(scriptExecutionContext()->isDocument());
- static_cast<Document*>(scriptExecutionContext())->removeTimeout(m_timeoutId);
+ scriptExecutionContext()->removeTimeout(m_timeoutId);
}
}
@@ -100,8 +95,7 @@
// respectively
if (timeoutId <= 0)
return;
- ASSERT(context && context->isDocument());
- delete static_cast<Document*>(context)->findTimeout(timeoutId);
+ delete context->findTimeout(timeoutId);
}
void DOMTimer::fired()
« no previous file with comments | « third_party/WebKit/WebCore/loader/archive/cf/LegacyWebArchive.cpp ('k') | third_party/WebKit/WebCore/page/DragController.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698