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

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

Issue 2826213003: Don't lower priority for scripts inserted by doc.write (Closed)
Patch Set: Added layout test Created 3 years, 8 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) 2013 Google, Inc. All Rights Reserved. 2 * Copyright (C) 2013 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 std::move(config), std::move(loading_task_runner)); 93 std::move(config), std::move(loading_task_runner));
94 return background_parser->weak_factory_.CreateWeakPtr(); 94 return background_parser->weak_factory_.CreateWeakPtr();
95 } 95 }
96 96
97 void BackgroundHTMLParser::Init( 97 void BackgroundHTMLParser::Init(
98 const KURL& document_url, 98 const KURL& document_url,
99 std::unique_ptr<CachedDocumentParameters> cached_document_parameters, 99 std::unique_ptr<CachedDocumentParameters> cached_document_parameters,
100 const MediaValuesCached::MediaValuesCachedData& media_values_cached_data) { 100 const MediaValuesCached::MediaValuesCachedData& media_values_cached_data) {
101 preload_scanner_.reset(new TokenPreloadScanner( 101 preload_scanner_.reset(new TokenPreloadScanner(
102 document_url, std::move(cached_document_parameters), 102 document_url, std::move(cached_document_parameters),
103 media_values_cached_data)); 103 media_values_cached_data, TokenPreloadScanner::kMainDocumentScanner));
104 } 104 }
105 105
106 BackgroundHTMLParser::Configuration::Configuration() 106 BackgroundHTMLParser::Configuration::Configuration()
107 : outstanding_token_limit(kDefaultOutstandingTokenLimit), 107 : outstanding_token_limit(kDefaultOutstandingTokenLimit),
108 pending_token_limit(kDefaultPendingTokenLimit), 108 pending_token_limit(kDefaultPendingTokenLimit),
109 should_coalesce_chunks(false) {} 109 should_coalesce_chunks(false) {}
110 110
111 BackgroundHTMLParser::BackgroundHTMLParser( 111 BackgroundHTMLParser::BackgroundHTMLParser(
112 std::unique_ptr<Configuration> config, 112 std::unique_ptr<Configuration> config,
113 RefPtr<WebTaskRunner> loading_task_runner) 113 RefPtr<WebTaskRunner> loading_task_runner)
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 if (IsMainThread()) { 379 if (IsMainThread()) {
380 (*WTF::Bind(function, std::forward<Ps>(parameters)...))(); 380 (*WTF::Bind(function, std::forward<Ps>(parameters)...))();
381 } else { 381 } else {
382 loading_task_runner_->PostTask( 382 loading_task_runner_->PostTask(
383 BLINK_FROM_HERE, 383 BLINK_FROM_HERE,
384 CrossThreadBind(function, std::forward<Ps>(parameters)...)); 384 CrossThreadBind(function, std::forward<Ps>(parameters)...));
385 } 385 }
386 } 386 }
387 387
388 } // namespace blink 388 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698