| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 m_hasEverBeenSuspended = false; | 46 m_hasEverBeenSuspended = false; |
| 47 #endif | 47 #endif |
| 48 } | 48 } |
| 49 | 49 |
| 50 void ScriptRunner::queueScriptForExecution(ScriptLoader* scriptLoader, | 50 void ScriptRunner::queueScriptForExecution(ScriptLoader* scriptLoader, |
| 51 AsyncExecutionType executionType) { | 51 AsyncExecutionType executionType) { |
| 52 DCHECK(scriptLoader); | 52 DCHECK(scriptLoader); |
| 53 m_document->incrementLoadEventDelayCount(); | 53 m_document->incrementLoadEventDelayCount(); |
| 54 switch (executionType) { | 54 switch (executionType) { |
| 55 case Async: | 55 case Async: |
| 56 m_pendingAsyncScripts.add(scriptLoader); | 56 m_pendingAsyncScripts.insert(scriptLoader); |
| 57 break; | 57 break; |
| 58 | 58 |
| 59 case InOrder: | 59 case InOrder: |
| 60 m_pendingInOrderScripts.append(scriptLoader); | 60 m_pendingInOrderScripts.append(scriptLoader); |
| 61 m_numberOfInOrderScriptsWithPendingNotification++; | 61 m_numberOfInOrderScriptsWithPendingNotification++; |
| 62 break; | 62 break; |
| 63 case None: | 63 case None: |
| 64 NOTREACHED(); | 64 NOTREACHED(); |
| 65 break; | 65 break; |
| 66 } | 66 } |
| (...skipping 175 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 |