| 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 1067 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 } | 1078 } |
| 1079 endIfDelayed(); | 1079 endIfDelayed(); |
| 1080 } | 1080 } |
| 1081 | 1081 |
| 1082 void HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan() { | 1082 void HTMLDocumentParser::appendCurrentInputStreamToPreloadScannerAndScan() { |
| 1083 ASSERT(m_preloadScanner); | 1083 ASSERT(m_preloadScanner); |
| 1084 m_preloadScanner->appendToEnd(m_input.current()); | 1084 m_preloadScanner->appendToEnd(m_input.current()); |
| 1085 scanAndPreload(m_preloadScanner.get()); | 1085 scanAndPreload(m_preloadScanner.get()); |
| 1086 } | 1086 } |
| 1087 | 1087 |
| 1088 void HTMLDocumentParser::notifyScriptLoaded(Resource* cachedResource) { | 1088 void HTMLDocumentParser::notifyScriptLoaded(PendingScript* pendingScript) { |
| 1089 ASSERT(m_scriptRunner); | 1089 ASSERT(m_scriptRunner); |
| 1090 ASSERT(!isExecutingScript()); | 1090 ASSERT(!isExecutingScript()); |
| 1091 | 1091 |
| 1092 if (isStopped()) { | 1092 if (isStopped()) { |
| 1093 return; | 1093 return; |
| 1094 } | 1094 } |
| 1095 | 1095 |
| 1096 if (isStopping()) { | 1096 if (isStopping()) { |
| 1097 attemptToRunDeferredScriptsAndEnd(); | 1097 attemptToRunDeferredScriptsAndEnd(); |
| 1098 return; | 1098 return; |
| 1099 } | 1099 } |
| 1100 | 1100 |
| 1101 m_scriptRunner->executeScriptsWaitingForLoad(cachedResource); | 1101 m_scriptRunner->executeScriptsWaitingForLoad(pendingScript); |
| 1102 if (!isWaitingForScripts()) | 1102 if (!isWaitingForScripts()) |
| 1103 resumeParsingAfterScriptExecution(); | 1103 resumeParsingAfterScriptExecution(); |
| 1104 } | 1104 } |
| 1105 | 1105 |
| 1106 void HTMLDocumentParser::executeScriptsWaitingForResources() { | 1106 void HTMLDocumentParser::executeScriptsWaitingForResources() { |
| 1107 DCHECK(document()->isScriptExecutionReady()); | 1107 DCHECK(document()->isScriptExecutionReady()); |
| 1108 | 1108 |
| 1109 // Document only calls this when the Document owns the DocumentParser so this | 1109 // Document only calls this when the Document owns the DocumentParser so this |
| 1110 // will not be called in the DocumentFragment case. | 1110 // will not be called in the DocumentFragment case. |
| 1111 DCHECK(m_scriptRunner); | 1111 DCHECK(m_scriptRunner); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1312 case Asynchronous: | 1312 case Asynchronous: |
| 1313 m_loadingTaskRunner->postTask( | 1313 m_loadingTaskRunner->postTask( |
| 1314 BLINK_FROM_HERE, | 1314 BLINK_FROM_HERE, |
| 1315 WTF::bind(function, std::forward<Ps>(parameters)...)); | 1315 WTF::bind(function, std::forward<Ps>(parameters)...)); |
| 1316 return; | 1316 return; |
| 1317 } | 1317 } |
| 1318 NOTREACHED(); | 1318 NOTREACHED(); |
| 1319 } | 1319 } |
| 1320 | 1320 |
| 1321 } // namespace blink | 1321 } // namespace blink |
| OLD | NEW |