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

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

Issue 2570463005: Retire ThreadState::registerPreFinalizer<T>() (Closed)
Patch Set: Created 4 years 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 m_endWasDelayed(false), 148 m_endWasDelayed(false),
149 m_haveBackgroundParser(false), 149 m_haveBackgroundParser(false),
150 m_tasksWereSuspended(false), 150 m_tasksWereSuspended(false),
151 m_pumpSessionNestingLevel(0), 151 m_pumpSessionNestingLevel(0),
152 m_pumpSpeculationsSessionNestingLevel(0), 152 m_pumpSpeculationsSessionNestingLevel(0),
153 m_isParsingAtLineNumber(false), 153 m_isParsingAtLineNumber(false),
154 m_triedLoadingLinkHeaders(false) { 154 m_triedLoadingLinkHeaders(false) {
155 ASSERT(shouldUseThreading() || (m_token && m_tokenizer)); 155 ASSERT(shouldUseThreading() || (m_token && m_tokenizer));
156 // Threading is not allowed in prefetch mode. 156 // Threading is not allowed in prefetch mode.
157 DCHECK(!document.isPrefetchOnly() || !shouldUseThreading()); 157 DCHECK(!document.isPrefetchOnly() || !shouldUseThreading());
158
159 ThreadState::current()->registerPreFinalizer(this);
160 } 158 }
161 159
162 HTMLDocumentParser::~HTMLDocumentParser() {} 160 HTMLDocumentParser::~HTMLDocumentParser() {}
163 161
164 void HTMLDocumentParser::dispose() { 162 void HTMLDocumentParser::dispose() {
165 // In Oilpan, HTMLDocumentParser can die together with Document, and detach() 163 // In Oilpan, HTMLDocumentParser can die together with Document, and detach()
166 // is not called in this case. 164 // is not called in this case.
167 if (m_haveBackgroundParser) 165 if (m_haveBackgroundParser)
168 stopBackgroundParser(); 166 stopBackgroundParser();
169 } 167 }
(...skipping 1142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 case Asynchronous: 1310 case Asynchronous:
1313 m_loadingTaskRunner->postTask( 1311 m_loadingTaskRunner->postTask(
1314 BLINK_FROM_HERE, 1312 BLINK_FROM_HERE,
1315 WTF::bind(function, std::forward<Ps>(parameters)...)); 1313 WTF::bind(function, std::forward<Ps>(parameters)...));
1316 return; 1314 return;
1317 } 1315 }
1318 NOTREACHED(); 1316 NOTREACHED();
1319 } 1317 }
1320 1318
1321 } // namespace blink 1319 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698