| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 NOTREACHED(); | 135 NOTREACHED(); |
| 136 break; | 136 break; |
| 137 } | 137 } |
| 138 } | 138 } |
| 139 | 139 |
| 140 bool ScriptRunner::removePendingInOrderScript(ScriptLoader* scriptLoader) { | 140 bool ScriptRunner::removePendingInOrderScript(ScriptLoader* scriptLoader) { |
| 141 auto it = std::find(m_pendingInOrderScripts.begin(), | 141 auto it = std::find(m_pendingInOrderScripts.begin(), |
| 142 m_pendingInOrderScripts.end(), scriptLoader); | 142 m_pendingInOrderScripts.end(), scriptLoader); |
| 143 if (it == m_pendingInOrderScripts.end()) | 143 if (it == m_pendingInOrderScripts.end()) |
| 144 return false; | 144 return false; |
| 145 m_pendingInOrderScripts.remove(it); | 145 m_pendingInOrderScripts.erase(it); |
| 146 SECURITY_CHECK(m_numberOfInOrderScriptsWithPendingNotification > 0); | 146 SECURITY_CHECK(m_numberOfInOrderScriptsWithPendingNotification > 0); |
| 147 m_numberOfInOrderScriptsWithPendingNotification--; | 147 m_numberOfInOrderScriptsWithPendingNotification--; |
| 148 return true; | 148 return true; |
| 149 } | 149 } |
| 150 | 150 |
| 151 void ScriptRunner::notifyScriptLoadError(ScriptLoader* scriptLoader, | 151 void ScriptRunner::notifyScriptLoadError(ScriptLoader* scriptLoader, |
| 152 AsyncExecutionType executionType) { | 152 AsyncExecutionType executionType) { |
| 153 switch (executionType) { | 153 switch (executionType) { |
| 154 case Async: { | 154 case Async: { |
| 155 // See notifyScriptReady() comment. | 155 // See notifyScriptReady() comment. |
| (...skipping 86 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 |