| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |