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

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

Issue 2699153002: Doc.write blocking intervention console messages updated for clarity. (Closed)
Patch Set: Created 3 years, 10 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 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 ", invoked via document.write was NOT BLOCKED on this page load, but MAY " 269 ", invoked via document.write was NOT BLOCKED on this page load, but MAY "
270 "be blocked by the browser in future page loads with poor network " 270 "be blocked by the browser in future page loads with poor network "
271 "connectivity."; 271 "connectivity.";
272 document.addConsoleMessage( 272 document.addConsoleMessage(
273 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message)); 273 ConsoleMessage::create(JSMessageSource, WarningMessageLevel, message));
274 WTFLogAlways("%s", message.utf8().data()); 274 WTFLogAlways("%s", message.utf8().data());
275 } 275 }
276 276
277 void emitErrorForDocWriteScripts(const String& url, Document& document) { 277 void emitErrorForDocWriteScripts(const String& url, Document& document) {
278 String message = 278 String message =
279 "The Parser-blocking, cross site (i.e. different eTLD+1) " 279 "Network request for the parser-blocking, cross site "
280 "script, " + 280 "(i.e. different eTLD+1) script, " +
281 url + 281 url +
282 ", invoked via document.write was BLOCKED by the browser due to poor " 282 ", invoked via document.write was BLOCKED by the browser due to poor "
283 "network connectivity. "; 283 "network connectivity. ";
284 document.addConsoleMessage( 284 document.addConsoleMessage(
285 ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message)); 285 ConsoleMessage::create(JSMessageSource, ErrorMessageLevel, message));
286 WTFLogAlways("%s", message.utf8().data()); 286 WTFLogAlways("%s", message.utf8().data());
287 } 287 }
288 288
289 void HTMLParserScriptRunner::possiblyFetchBlockedDocWriteScript( 289 void HTMLParserScriptRunner::possiblyFetchBlockedDocWriteScript(
290 PendingScript* pendingScript) { 290 PendingScript* pendingScript) {
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
572 572
573 DEFINE_TRACE(HTMLParserScriptRunner) { 573 DEFINE_TRACE(HTMLParserScriptRunner) {
574 visitor->trace(m_document); 574 visitor->trace(m_document);
575 visitor->trace(m_host); 575 visitor->trace(m_host);
576 visitor->trace(m_parserBlockingScript); 576 visitor->trace(m_parserBlockingScript);
577 visitor->trace(m_scriptsToExecuteAfterParsing); 577 visitor->trace(m_scriptsToExecuteAfterParsing);
578 PendingScriptClient::trace(visitor); 578 PendingScriptClient::trace(visitor);
579 } 579 }
580 580
581 } // namespace blink 581 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698