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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 HTMLParserScriptRunner::HTMLParserScriptRunner( | 152 HTMLParserScriptRunner::HTMLParserScriptRunner( |
153 HTMLParserReentryPermit* reentryPermit, | 153 HTMLParserReentryPermit* reentryPermit, |
154 Document* document, | 154 Document* document, |
155 HTMLParserScriptRunnerHost* host) | 155 HTMLParserScriptRunnerHost* host) |
156 : m_reentryPermit(reentryPermit), | 156 : m_reentryPermit(reentryPermit), |
157 m_document(document), | 157 m_document(document), |
158 m_host(host), | 158 m_host(host), |
159 m_parserBlockingScript(PendingScript::create(nullptr, nullptr)) { | 159 m_parserBlockingScript(PendingScript::create(nullptr, nullptr)) { |
160 DCHECK(m_host); | 160 DCHECK(m_host); |
161 ThreadState::current()->registerPreFinalizer(this); | |
162 } | 161 } |
163 | 162 |
164 HTMLParserScriptRunner::~HTMLParserScriptRunner() { | 163 HTMLParserScriptRunner::~HTMLParserScriptRunner() { |
165 // Verify that detach() has been called. | 164 // Verify that detach() has been called. |
166 DCHECK(!m_document); | 165 DCHECK(!m_document); |
167 } | 166 } |
168 | 167 |
169 void HTMLParserScriptRunner::detach() { | 168 void HTMLParserScriptRunner::detach() { |
170 if (!m_document) | 169 if (!m_document) |
171 return; | 170 return; |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
527 | 526 |
528 DEFINE_TRACE(HTMLParserScriptRunner) { | 527 DEFINE_TRACE(HTMLParserScriptRunner) { |
529 visitor->trace(m_document); | 528 visitor->trace(m_document); |
530 visitor->trace(m_host); | 529 visitor->trace(m_host); |
531 visitor->trace(m_parserBlockingScript); | 530 visitor->trace(m_parserBlockingScript); |
532 visitor->trace(m_scriptsToExecuteAfterParsing); | 531 visitor->trace(m_scriptsToExecuteAfterParsing); |
533 ScriptResourceClient::trace(visitor); | 532 ScriptResourceClient::trace(visitor); |
534 } | 533 } |
535 | 534 |
536 } // namespace blink | 535 } // namespace blink |
OLD | NEW |