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

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: haraken's review Created 5 years 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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 if (!scriptLoader->willBeParserExecuted()) 355 if (!scriptLoader->willBeParserExecuted())
356 return; 356 return;
357 357
358 if (scriptLoader->willExecuteWhenDocumentFinishedParsing()) { 358 if (scriptLoader->willExecuteWhenDocumentFinishedParsing()) {
359 requestDeferredScript(script); 359 requestDeferredScript(script);
360 } else if (scriptLoader->readyToBeParserExecuted()) { 360 } else if (scriptLoader->readyToBeParserExecuted()) {
361 if (m_scriptNestingLevel == 1) { 361 if (m_scriptNestingLevel == 1) {
362 m_parserBlockingScript.setElement(script); 362 m_parserBlockingScript.setElement(script);
363 m_parserBlockingScript.setStartingPosition(scriptStartPosition); 363 m_parserBlockingScript.setStartingPosition(scriptStartPosition);
364 } else { 364 } else {
365 ScriptSourceCode sourceCode(script->textContent(), documentURLFo rScriptExecution(m_document), scriptStartPosition); 365 ScriptSourceCode sourceCode(CompressibleString(script->textConte nt().impl()), documentURLForScriptExecution(m_document), scriptStartPosition);
366 scriptLoader->executeScript(sourceCode); 366 scriptLoader->executeScript(sourceCode);
367 } 367 }
368 } else { 368 } else {
369 requestParsingBlockingScript(script); 369 requestParsingBlockingScript(script);
370 } 370 }
371 } 371 }
372 } 372 }
373 373
374 DEFINE_TRACE(HTMLScriptRunner) 374 DEFINE_TRACE(HTMLScriptRunner)
375 { 375 {
376 visitor->trace(m_document); 376 visitor->trace(m_document);
377 visitor->trace(m_host); 377 visitor->trace(m_host);
378 visitor->trace(m_parserBlockingScript); 378 visitor->trace(m_parserBlockingScript);
379 visitor->trace(m_scriptsToExecuteAfterParsing); 379 visitor->trace(m_scriptsToExecuteAfterParsing);
380 } 380 }
381 381
382 } // namespace blink 382 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698