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

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

Issue 1389383003: WIP: Introduce CompressibleString Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase onto crrev.com/1564773002 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 if (!scriptLoader->willBeParserExecuted()) 354 if (!scriptLoader->willBeParserExecuted())
355 return; 355 return;
356 356
357 if (scriptLoader->willExecuteWhenDocumentFinishedParsing()) { 357 if (scriptLoader->willExecuteWhenDocumentFinishedParsing()) {
358 requestDeferredScript(script); 358 requestDeferredScript(script);
359 } else if (scriptLoader->readyToBeParserExecuted()) { 359 } else if (scriptLoader->readyToBeParserExecuted()) {
360 if (m_scriptNestingLevel == 1) { 360 if (m_scriptNestingLevel == 1) {
361 m_parserBlockingScript.setElement(script); 361 m_parserBlockingScript.setElement(script);
362 m_parserBlockingScript.setStartingPosition(scriptStartPosition); 362 m_parserBlockingScript.setStartingPosition(scriptStartPosition);
363 } else { 363 } else {
364 ScriptSourceCode sourceCode(script->textContent(), documentURLFo rScriptExecution(m_document), scriptStartPosition); 364 ScriptSourceCode sourceCode(CompressibleString(script->textConte nt().impl()), documentURLForScriptExecution(m_document), scriptStartPosition);
365 scriptLoader->executeScript(sourceCode); 365 scriptLoader->executeScript(sourceCode);
366 } 366 }
367 } else { 367 } else {
368 requestParsingBlockingScript(script); 368 requestParsingBlockingScript(script);
369 } 369 }
370 } 370 }
371 } 371 }
372 372
373 DEFINE_TRACE(HTMLScriptRunner) 373 DEFINE_TRACE(HTMLScriptRunner)
374 { 374 {
375 visitor->trace(m_document); 375 visitor->trace(m_document);
376 visitor->trace(m_host); 376 visitor->trace(m_host);
377 visitor->trace(m_parserBlockingScript); 377 visitor->trace(m_parserBlockingScript);
378 visitor->trace(m_scriptsToExecuteAfterParsing); 378 visitor->trace(m_scriptsToExecuteAfterParsing);
379 } 379 }
380 380
381 } // namespace blink 381 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/frame/Window.idl ('k') | third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698