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

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

Issue 2209283002: Fix HTMLDocumentParser::stopBackgroundParser crash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 class HTMLDocument; 62 class HTMLDocument;
63 class HTMLParserScheduler; 63 class HTMLParserScheduler;
64 class HTMLResourcePreloader; 64 class HTMLResourcePreloader;
65 class HTMLScriptRunner; 65 class HTMLScriptRunner;
66 class HTMLTreeBuilder; 66 class HTMLTreeBuilder;
67 class PumpSession; 67 class PumpSession;
68 class TokenizedChunkQueue; 68 class TokenizedChunkQueue;
69 69
70 class HTMLDocumentParser : public ScriptableDocumentParser, private HTMLScriptR unnerHost { 70 class HTMLDocumentParser : public ScriptableDocumentParser, private HTMLScriptR unnerHost {
71 USING_GARBAGE_COLLECTED_MIXIN(HTMLDocumentParser); 71 USING_GARBAGE_COLLECTED_MIXIN(HTMLDocumentParser);
72 USING_PRE_FINALIZER(HTMLDocumentParser, dispose);
72 public: 73 public:
73 static HTMLDocumentParser* create(HTMLDocument& document, ParserSynchronizat ionPolicy backgroundParsingPolicy) 74 static HTMLDocumentParser* create(HTMLDocument& document, ParserSynchronizat ionPolicy backgroundParsingPolicy)
74 { 75 {
75 return new HTMLDocumentParser(document, backgroundParsingPolicy); 76 return new HTMLDocumentParser(document, backgroundParsingPolicy);
76 } 77 }
77 ~HTMLDocumentParser() override; 78 ~HTMLDocumentParser() override;
78 DECLARE_VIRTUAL_TRACE(); 79 DECLARE_VIRTUAL_TRACE();
79 80
81 // TODO(alexclarke): Remove when background parser goes away.
82 void dispose();
83
80 // Exposed for HTMLParserScheduler 84 // Exposed for HTMLParserScheduler
81 void resumeParsingAfterYield(); 85 void resumeParsingAfterYield();
82 86
83 static void parseDocumentFragment(const String&, DocumentFragment*, Element* contextElement, ParserContentPolicy = AllowScriptingContent); 87 static void parseDocumentFragment(const String&, DocumentFragment*, Element* contextElement, ParserContentPolicy = AllowScriptingContent);
84 88
85 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); } 89 HTMLTokenizer* tokenizer() const { return m_tokenizer.get(); }
86 90
87 TextPosition textPosition() const final; 91 TextPosition textPosition() const final;
88 bool isParsingAtLineNumber() const final; 92 bool isParsingAtLineNumber() const final;
89 OrdinalNumber lineNumber() const final; 93 OrdinalNumber lineNumber() const final;
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 bool m_tasksWereSuspended; 236 bool m_tasksWereSuspended;
233 unsigned m_pumpSessionNestingLevel; 237 unsigned m_pumpSessionNestingLevel;
234 unsigned m_pumpSpeculationsSessionNestingLevel; 238 unsigned m_pumpSpeculationsSessionNestingLevel;
235 bool m_isParsingAtLineNumber; 239 bool m_isParsingAtLineNumber;
236 bool m_triedLoadingLinkHeaders; 240 bool m_triedLoadingLinkHeaders;
237 }; 241 };
238 242
239 } // namespace blink 243 } // namespace blink
240 244
241 #endif 245 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/html/parser/HTMLDocumentParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698