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

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

Issue 1402933002: Revert "Post loading tasks on the appropriate WebFrameScheduler's queue." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge Created 5 years, 2 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 inline double SpeculationsPumpSession::elapsedTime() const 75 inline double SpeculationsPumpSession::elapsedTime() const
76 { 76 {
77 return currentTime() - m_startTime; 77 return currentTime() - m_startTime;
78 } 78 }
79 79
80 void SpeculationsPumpSession::addedElementTokens(size_t count) 80 void SpeculationsPumpSession::addedElementTokens(size_t count)
81 { 81 {
82 m_processedElementTokens += count; 82 m_processedElementTokens += count;
83 } 83 }
84 84
85 HTMLParserScheduler::HTMLParserScheduler(HTMLDocumentParser* parser, WebTaskRunn er* loadingTaskRunner) 85 HTMLParserScheduler::HTMLParserScheduler(HTMLDocumentParser* parser)
86 : m_parser(parser) 86 : m_parser(parser)
87 , m_loadingTaskRunner(adoptPtr(loadingTaskRunner->clone())) 87 , m_loadingTaskRunner(Platform::current()->currentThread()->scheduler()->loa dingTaskRunner())
88 , m_cancellableContinueParse(CancellableTaskFactory::create(this, &HTMLParse rScheduler::continueParsing)) 88 , m_cancellableContinueParse(CancellableTaskFactory::create(this, &HTMLParse rScheduler::continueParsing))
89 , m_isSuspendedWithActiveTimer(false) 89 , m_isSuspendedWithActiveTimer(false)
90 { 90 {
91 } 91 }
92 92
93 HTMLParserScheduler::~HTMLParserScheduler() 93 HTMLParserScheduler::~HTMLParserScheduler()
94 { 94 {
95 } 95 }
96 96
97 void HTMLParserScheduler::scheduleForResume() 97 void HTMLParserScheduler::scheduleForResume()
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 ASSERT(!m_cancellableContinueParse->isPending()); 164 ASSERT(!m_cancellableContinueParse->isPending());
165 m_isSuspendedWithActiveTimer = true; 165 m_isSuspendedWithActiveTimer = true;
166 } 166 }
167 167
168 void HTMLParserScheduler::continueParsing() 168 void HTMLParserScheduler::continueParsing()
169 { 169 {
170 m_parser->resumeParsingAfterYield(); 170 m_parser->resumeParsingAfterYield();
171 } 171 }
172 172
173 } 173 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698