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

Side by Side Diff: third_party/WebKit/Source/core/dom/ScriptRunner.cpp

Issue 2550373005: Make WebTaskRunner ThreadSafeRefCounted (Closed)
Patch Set: +DISALLOW_COPY_AND_ASSIGN for win build fix Created 3 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2010 Google, 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 20 matching lines...) Expand all
31 #include "core/dom/TaskRunnerHelper.h" 31 #include "core/dom/TaskRunnerHelper.h"
32 #include "platform/heap/Handle.h" 32 #include "platform/heap/Handle.h"
33 #include "public/platform/Platform.h" 33 #include "public/platform/Platform.h"
34 #include "public/platform/WebScheduler.h" 34 #include "public/platform/WebScheduler.h"
35 #include "public/platform/WebThread.h" 35 #include "public/platform/WebThread.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 ScriptRunner::ScriptRunner(Document* document) 39 ScriptRunner::ScriptRunner(Document* document)
40 : m_document(document), 40 : m_document(document),
41 m_taskRunner( 41 m_taskRunner(TaskRunnerHelper::get(TaskType::Networking, document)),
42 TaskRunnerHelper::get(TaskType::Networking, document)->clone()),
43 m_numberOfInOrderScriptsWithPendingNotification(0), 42 m_numberOfInOrderScriptsWithPendingNotification(0),
44 m_isSuspended(false) { 43 m_isSuspended(false) {
45 DCHECK(document); 44 DCHECK(document);
46 #ifndef NDEBUG 45 #ifndef NDEBUG
47 m_hasEverBeenSuspended = false; 46 m_hasEverBeenSuspended = false;
48 #endif 47 #endif
49 } 48 }
50 49
51 void ScriptRunner::queueScriptForExecution(ScriptLoader* scriptLoader, 50 void ScriptRunner::queueScriptForExecution(ScriptLoader* scriptLoader,
52 AsyncExecutionType executionType) { 51 AsyncExecutionType executionType) {
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 242
244 DEFINE_TRACE(ScriptRunner) { 243 DEFINE_TRACE(ScriptRunner) {
245 visitor->trace(m_document); 244 visitor->trace(m_document);
246 visitor->trace(m_pendingInOrderScripts); 245 visitor->trace(m_pendingInOrderScripts);
247 visitor->trace(m_pendingAsyncScripts); 246 visitor->trace(m_pendingAsyncScripts);
248 visitor->trace(m_asyncScriptsToExecuteSoon); 247 visitor->trace(m_asyncScriptsToExecuteSoon);
249 visitor->trace(m_inOrderScriptsToExecuteSoon); 248 visitor->trace(m_inOrderScriptsToExecuteSoon);
250 } 249 }
251 250
252 } // namespace blink 251 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/ScriptRunner.h ('k') | third_party/WebKit/Source/core/dom/TaskRunnerHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698