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

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

Issue 1115553002: Removing blink::prefix (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 7 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 if (!scriptLoader->executeScript(sourceCode, &compilationFinishTime) ) { 155 if (!scriptLoader->executeScript(sourceCode, &compilationFinishTime) ) {
156 scriptLoader->dispatchErrorEvent(); 156 scriptLoader->dispatchErrorEvent();
157 } else { 157 } else {
158 element->dispatchEvent(createScriptLoadEvent()); 158 element->dispatchEvent(createScriptLoadEvent());
159 } 159 }
160 } 160 }
161 } 161 }
162 // The exact value doesn't matter; valid time stamps are much bigger than th is value. 162 // The exact value doesn't matter; valid time stamps are much bigger than th is value.
163 const double epsilon = 1; 163 const double epsilon = 1;
164 if (pendingScriptType == PendingScript::ParsingBlocking && !m_parserBlocking ScriptAlreadyLoaded && compilationFinishTime > epsilon && loadFinishTime > epsil on) { 164 if (pendingScriptType == PendingScript::ParsingBlocking && !m_parserBlocking ScriptAlreadyLoaded && compilationFinishTime > epsilon && loadFinishTime > epsil on) {
165 blink::Platform::current()->histogramCustomCounts("WebCore.Scripts.Parsi ngBlocking.TimeBetweenLoadedAndCompiled", (compilationFinishTime - loadFinishTim e) * 1000, 0, 10000, 50); 165 Platform::current()->histogramCustomCounts("WebCore.Scripts.ParsingBlock ing.TimeBetweenLoadedAndCompiled", (compilationFinishTime - loadFinishTime) * 10 00, 0, 10000, 50);
166 } 166 }
167 167
168 ASSERT(!isExecutingScript()); 168 ASSERT(!isExecutingScript());
169 } 169 }
170 170
171 void HTMLScriptRunner::stopWatchingResourceForLoad(Resource* resource) 171 void HTMLScriptRunner::stopWatchingResourceForLoad(Resource* resource)
172 { 172 {
173 if (m_parserBlockingScript.resource() == resource) { 173 if (m_parserBlockingScript.resource() == resource) {
174 m_parserBlockingScript.stopWatchingForLoad(this); 174 m_parserBlockingScript.stopWatchingForLoad(this);
175 m_parserBlockingScript.releaseElementAndClear(); 175 m_parserBlockingScript.releaseElementAndClear();
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 } 364 }
365 365
366 DEFINE_TRACE(HTMLScriptRunner) 366 DEFINE_TRACE(HTMLScriptRunner)
367 { 367 {
368 visitor->trace(m_document); 368 visitor->trace(m_document);
369 visitor->trace(m_host); 369 visitor->trace(m_host);
370 visitor->trace(m_parserBlockingScript); 370 visitor->trace(m_parserBlockingScript);
371 visitor->trace(m_scriptsToExecuteAfterParsing); 371 visitor->trace(m_scriptsToExecuteAfterParsing);
372 } 372 }
373 373
374 } 374 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLResourcePreloader.cpp ('k') | Source/core/html/shadow/DateTimeFieldElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698