| 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 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 for (auto& chunk : pendingChunks) { | 379 for (auto& chunk : pendingChunks) { |
| 380 for (auto& index : chunk->likelyDocumentWriteScriptIndices) { | 380 for (auto& index : chunk->likelyDocumentWriteScriptIndices) { |
| 381 const CompactHTMLToken& token = chunk->tokens->at(index); | 381 const CompactHTMLToken& token = chunk->tokens->at(index); |
| 382 ASSERT(token.type() == HTMLToken::TokenType::Character); | 382 ASSERT(token.type() == HTMLToken::TokenType::Character); |
| 383 evaluateAndPreloadScriptForDocumentWrite(token.data()); | 383 evaluateAndPreloadScriptForDocumentWrite(token.data()); |
| 384 } | 384 } |
| 385 } | 385 } |
| 386 } | 386 } |
| 387 | 387 |
| 388 for (auto& chunk : pendingChunks) | 388 for (auto& chunk : pendingChunks) |
| 389 m_speculations.append(std::move(chunk)); | 389 m_speculations.push_back(std::move(chunk)); |
| 390 | 390 |
| 391 if (!isPaused() && !isScheduledForResume()) { | 391 if (!isPaused() && !isScheduledForResume()) { |
| 392 if (m_tasksWereSuspended) | 392 if (m_tasksWereSuspended) |
| 393 m_parserScheduler->forceResumeAfterYield(); | 393 m_parserScheduler->forceResumeAfterYield(); |
| 394 else | 394 else |
| 395 m_parserScheduler->scheduleForResume(); | 395 m_parserScheduler->scheduleForResume(); |
| 396 } | 396 } |
| 397 } | 397 } |
| 398 | 398 |
| 399 void HTMLDocumentParser::didReceiveEncodingDataFromBackgroundParser( | 399 void HTMLDocumentParser::didReceiveEncodingDataFromBackgroundParser( |
| (...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 successHistogram.count(duration); | 1320 successHistogram.count(duration); |
| 1321 } else { | 1321 } else { |
| 1322 DEFINE_STATIC_LOCAL( | 1322 DEFINE_STATIC_LOCAL( |
| 1323 CustomCountHistogram, failureHistogram, | 1323 CustomCountHistogram, failureHistogram, |
| 1324 ("PreloadScanner.DocumentWrite.ExecutionTime.Failure", 1, 10000, 50)); | 1324 ("PreloadScanner.DocumentWrite.ExecutionTime.Failure", 1, 10000, 50)); |
| 1325 failureHistogram.count(duration); | 1325 failureHistogram.count(duration); |
| 1326 } | 1326 } |
| 1327 } | 1327 } |
| 1328 | 1328 |
| 1329 } // namespace blink | 1329 } // namespace blink |
| OLD | NEW |