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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 , m_loadingTaskRunner(adoptPtr(loadingTaskRunner->clone())) | 87 , m_loadingTaskRunner(adoptPtr(loadingTaskRunner->clone())) |
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 DEFINE_TRACE(HTMLParserScheduler) |
| 98 { |
| 99 visitor->trace(m_parser); |
| 100 } |
| 101 |
97 void HTMLParserScheduler::scheduleForResume() | 102 void HTMLParserScheduler::scheduleForResume() |
98 { | 103 { |
99 ASSERT(!m_isSuspendedWithActiveTimer); | 104 ASSERT(!m_isSuspendedWithActiveTimer); |
100 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, m_cancellableContinueParse->c
ancelAndCreate()); | 105 m_loadingTaskRunner->postTask(BLINK_FROM_HERE, m_cancellableContinueParse->c
ancelAndCreate()); |
101 } | 106 } |
102 | 107 |
103 void HTMLParserScheduler::suspend() | 108 void HTMLParserScheduler::suspend() |
104 { | 109 { |
105 ASSERT(!m_isSuspendedWithActiveTimer); | 110 ASSERT(!m_isSuspendedWithActiveTimer); |
106 if (!m_cancellableContinueParse->isPending()) | 111 if (!m_cancellableContinueParse->isPending()) |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 ASSERT(!m_cancellableContinueParse->isPending()); | 169 ASSERT(!m_cancellableContinueParse->isPending()); |
165 m_isSuspendedWithActiveTimer = true; | 170 m_isSuspendedWithActiveTimer = true; |
166 } | 171 } |
167 | 172 |
168 void HTMLParserScheduler::continueParsing() | 173 void HTMLParserScheduler::continueParsing() |
169 { | 174 { |
170 m_parser->resumeParsingAfterYield(); | 175 m_parser->resumeParsingAfterYield(); |
171 } | 176 } |
172 | 177 |
173 } | 178 } |
OLD | NEW |