Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Side by Side Diff: third_party/WebKit/Source/core/html/parser/HTMLScriptRunner.cpp

Issue 1583263002: Experimental CompressibleString UMA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adopt lazy-initializing way Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 if (!scriptLoader->willBeParserExecuted()) 350 if (!scriptLoader->willBeParserExecuted())
351 return; 351 return;
352 352
353 if (scriptLoader->willExecuteWhenDocumentFinishedParsing()) { 353 if (scriptLoader->willExecuteWhenDocumentFinishedParsing()) {
354 requestDeferredScript(script); 354 requestDeferredScript(script);
355 } else if (scriptLoader->readyToBeParserExecuted()) { 355 } else if (scriptLoader->readyToBeParserExecuted()) {
356 if (m_scriptNestingLevel == 1) { 356 if (m_scriptNestingLevel == 1) {
357 m_parserBlockingScript->setElement(script); 357 m_parserBlockingScript->setElement(script);
358 m_parserBlockingScript->setStartingPosition(scriptStartPosition) ; 358 m_parserBlockingScript->setStartingPosition(scriptStartPosition) ;
359 } else { 359 } else {
360 ScriptSourceCode sourceCode(script->textContent(), documentURLFo rScriptExecution(m_document), scriptStartPosition); 360 ScriptSourceCode sourceCode(CompressibleString(script->textConte nt().impl()), documentURLForScriptExecution(m_document), scriptStartPosition);
361 scriptLoader->executeScript(sourceCode); 361 scriptLoader->executeScript(sourceCode);
362 } 362 }
363 } else { 363 } else {
364 requestParsingBlockingScript(script); 364 requestParsingBlockingScript(script);
365 } 365 }
366 } 366 }
367 } 367 }
368 368
369 DEFINE_TRACE(HTMLScriptRunner) 369 DEFINE_TRACE(HTMLScriptRunner)
370 { 370 {
371 visitor->trace(m_document); 371 visitor->trace(m_document);
372 visitor->trace(m_host); 372 visitor->trace(m_host);
373 visitor->trace(m_parserBlockingScript); 373 visitor->trace(m_parserBlockingScript);
374 visitor->trace(m_scriptsToExecuteAfterParsing); 374 visitor->trace(m_scriptsToExecuteAfterParsing);
375 } 375 }
376 376
377 } // namespace blink 377 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698