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