| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 for (size_t i = 0; i < m_asyncScriptsToExecuteSoon.size(); ++i) { | 88 for (size_t i = 0; i < m_asyncScriptsToExecuteSoon.size(); ++i) { |
| 89 postTask(BLINK_FROM_HERE); | 89 postTask(BLINK_FROM_HERE); |
| 90 } | 90 } |
| 91 for (size_t i = 0; i < m_inOrderScriptsToExecuteSoon.size(); ++i) { | 91 for (size_t i = 0; i < m_inOrderScriptsToExecuteSoon.size(); ++i) { |
| 92 postTask(BLINK_FROM_HERE); | 92 postTask(BLINK_FROM_HERE); |
| 93 } | 93 } |
| 94 } | 94 } |
| 95 | 95 |
| 96 void ScriptRunner::scheduleReadyInOrderScripts() { | 96 void ScriptRunner::scheduleReadyInOrderScripts() { |
| 97 while (!m_pendingInOrderScripts.isEmpty() && | 97 while (!m_pendingInOrderScripts.isEmpty() && |
| 98 m_pendingInOrderScripts.first()->isReady()) { | 98 m_pendingInOrderScripts.front()->isReady()) { |
| 99 // A ScriptLoader that failed is responsible for cancelling itself | 99 // A ScriptLoader that failed is responsible for cancelling itself |
| 100 // notifyScriptLoadError(); it continues this draining of ready scripts. | 100 // notifyScriptLoadError(); it continues this draining of ready scripts. |
| 101 if (m_pendingInOrderScripts.first()->errorOccurred()) | 101 if (m_pendingInOrderScripts.front()->errorOccurred()) |
| 102 break; | 102 break; |
| 103 m_inOrderScriptsToExecuteSoon.push_back( | 103 m_inOrderScriptsToExecuteSoon.push_back( |
| 104 m_pendingInOrderScripts.takeFirst()); | 104 m_pendingInOrderScripts.takeFirst()); |
| 105 postTask(BLINK_FROM_HERE); | 105 postTask(BLINK_FROM_HERE); |
| 106 } | 106 } |
| 107 } | 107 } |
| 108 | 108 |
| 109 void ScriptRunner::notifyScriptReady(ScriptLoader* scriptLoader, | 109 void ScriptRunner::notifyScriptReady(ScriptLoader* scriptLoader, |
| 110 AsyncExecutionType executionType) { | 110 AsyncExecutionType executionType) { |
| 111 SECURITY_CHECK(scriptLoader); | 111 SECURITY_CHECK(scriptLoader); |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 | 242 |
| 243 DEFINE_TRACE(ScriptRunner) { | 243 DEFINE_TRACE(ScriptRunner) { |
| 244 visitor->trace(m_document); | 244 visitor->trace(m_document); |
| 245 visitor->trace(m_pendingInOrderScripts); | 245 visitor->trace(m_pendingInOrderScripts); |
| 246 visitor->trace(m_pendingAsyncScripts); | 246 visitor->trace(m_pendingAsyncScripts); |
| 247 visitor->trace(m_asyncScriptsToExecuteSoon); | 247 visitor->trace(m_asyncScriptsToExecuteSoon); |
| 248 visitor->trace(m_inOrderScriptsToExecuteSoon); | 248 visitor->trace(m_inOrderScriptsToExecuteSoon); |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace blink | 251 } // namespace blink |
| OLD | NEW |