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

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

Issue 2843013002: Revert of Don't lower priority for scripts inserted by doc.write (Closed)
Patch Set: Created 3 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) 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));
104 TokenPreloadScanner::ScannerType::kMainDocument));
105 } 104 }
106 105
107 BackgroundHTMLParser::Configuration::Configuration() 106 BackgroundHTMLParser::Configuration::Configuration()
108 : outstanding_token_limit(kDefaultOutstandingTokenLimit), 107 : outstanding_token_limit(kDefaultOutstandingTokenLimit),
109 pending_token_limit(kDefaultPendingTokenLimit), 108 pending_token_limit(kDefaultPendingTokenLimit),
110 should_coalesce_chunks(false) {} 109 should_coalesce_chunks(false) {}
111 110
112 BackgroundHTMLParser::BackgroundHTMLParser( 111 BackgroundHTMLParser::BackgroundHTMLParser(
113 std::unique_ptr<Configuration> config, 112 std::unique_ptr<Configuration> config,
114 RefPtr<WebTaskRunner> loading_task_runner) 113 RefPtr<WebTaskRunner> loading_task_runner)
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 if (IsMainThread()) { 379 if (IsMainThread()) {
381 (*WTF::Bind(function, std::forward<Ps>(parameters)...))(); 380 (*WTF::Bind(function, std::forward<Ps>(parameters)...))();
382 } else { 381 } else {
383 loading_task_runner_->PostTask( 382 loading_task_runner_->PostTask(
384 BLINK_FROM_HERE, 383 BLINK_FROM_HERE,
385 CrossThreadBind(function, std::forward<Ps>(parameters)...)); 384 CrossThreadBind(function, std::forward<Ps>(parameters)...));
386 } 385 }
387 } 386 }
388 387
389 } // namespace blink 388 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698