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

Side by Side Diff: third_party/WebKit/Source/core/frame/DOMTimer.cpp

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: mac fix Created 4 years 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 if (!executionContext) 174 if (!executionContext)
175 return; 175 return;
176 176
177 executionContext->timers()->setTimerNestingLevel(0); 177 executionContext->timers()->setTimerNestingLevel(0);
178 // Eagerly unregister as ExecutionContext observer. 178 // Eagerly unregister as ExecutionContext observer.
179 clearContext(); 179 clearContext();
180 // Eagerly clear out |action|'s resources. 180 // Eagerly clear out |action|'s resources.
181 action->dispose(); 181 action->dispose();
182 } 182 }
183 183
184 WebTaskRunner* DOMTimer::timerTaskRunner() const { 184 RefPtr<WebTaskRunner> DOMTimer::timerTaskRunner() const {
185 return getExecutionContext()->timers()->timerTaskRunner(); 185 return getExecutionContext()->timers()->timerTaskRunner();
186 } 186 }
187 187
188 DEFINE_TRACE(DOMTimer) { 188 DEFINE_TRACE(DOMTimer) {
189 visitor->trace(m_action); 189 visitor->trace(m_action);
190 SuspendableTimer::trace(visitor); 190 SuspendableTimer::trace(visitor);
191 } 191 }
192 192
193 } // namespace blink 193 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698