OLD | NEW |
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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 void FetchBlockedDocWriteScript(ScriptElementBase* element, | 284 void FetchBlockedDocWriteScript(ScriptElementBase* element, |
285 bool is_parser_inserted, | 285 bool is_parser_inserted, |
286 const TextPosition& script_start_position) { | 286 const TextPosition& script_start_position) { |
287 DCHECK(element); | 287 DCHECK(element); |
288 | 288 |
289 ScriptLoader* script_loader = | 289 ScriptLoader* script_loader = |
290 ScriptLoader::Create(element, is_parser_inserted, false, false); | 290 ScriptLoader::Create(element, is_parser_inserted, false, false); |
291 DCHECK(script_loader); | 291 DCHECK(script_loader); |
292 script_loader->SetFetchDocWrittenScriptDeferIdle(); | 292 script_loader->SetFetchDocWrittenScriptDeferIdle(); |
293 script_loader->PrepareScript(script_start_position); | 293 script_loader->PrepareScript(script_start_position); |
| 294 CHECK_EQ(script_loader->GetScriptType(), ScriptType::kClassic); |
294 } | 295 } |
295 | 296 |
296 void EmitWarningForDocWriteScripts(const String& url, Document& document) { | 297 void EmitWarningForDocWriteScripts(const String& url, Document& document) { |
297 String message = | 298 String message = |
298 "The Parser-blocking, cross site (i.e. different eTLD+1) " | 299 "The Parser-blocking, cross site (i.e. different eTLD+1) " |
299 "script, " + | 300 "script, " + |
300 url + | 301 url + |
301 ", invoked via document.write was NOT BLOCKED on this page load, but MAY " | 302 ", invoked via document.write was NOT BLOCKED on this page load, but MAY " |
302 "be blocked by the browser in future page loads with poor network " | 303 "be blocked by the browser in future page loads with poor network " |
303 "connectivity."; | 304 "connectivity."; |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 | 681 |
681 DEFINE_TRACE(HTMLParserScriptRunner) { | 682 DEFINE_TRACE(HTMLParserScriptRunner) { |
682 visitor->Trace(document_); | 683 visitor->Trace(document_); |
683 visitor->Trace(host_); | 684 visitor->Trace(host_); |
684 visitor->Trace(parser_blocking_script_); | 685 visitor->Trace(parser_blocking_script_); |
685 visitor->Trace(scripts_to_execute_after_parsing_); | 686 visitor->Trace(scripts_to_execute_after_parsing_); |
686 PendingScriptClient::Trace(visitor); | 687 PendingScriptClient::Trace(visitor); |
687 } | 688 } |
688 | 689 |
689 } // namespace blink | 690 } // namespace blink |
OLD | NEW |