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

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

Issue 1372343002: Crash fix: Avoid using stale HTMLToken after tree construction (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add TODO about mutation 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 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 Element* contextElement() const { ASSERT(m_fragment); return m_contextEl ementStackItem->element(); } 200 Element* contextElement() const { ASSERT(m_fragment); return m_contextEl ementStackItem->element(); }
201 HTMLStackItem* contextElementStackItem() const { ASSERT(m_fragment); ret urn m_contextElementStackItem.get(); } 201 HTMLStackItem* contextElementStackItem() const { ASSERT(m_fragment); ret urn m_contextElementStackItem.get(); }
202 202
203 DECLARE_TRACE(); 203 DECLARE_TRACE();
204 204
205 private: 205 private:
206 RawPtrWillBeMember<DocumentFragment> m_fragment; 206 RawPtrWillBeMember<DocumentFragment> m_fragment;
207 RefPtrWillBeMember<HTMLStackItem> m_contextElementStackItem; 207 RefPtrWillBeMember<HTMLStackItem> m_contextElementStackItem;
208 }; 208 };
209 209
210 // https://html.spec.whatwg.org/#frameset-ok-flag
210 bool m_framesetOk; 211 bool m_framesetOk;
211 #if ENABLE(ASSERT) 212 #if ENABLE(ASSERT)
212 bool m_isAttached; 213 bool m_isAttached;
213 #endif 214 #endif
214 FragmentParsingContext m_fragmentContext; 215 FragmentParsingContext m_fragmentContext;
215 HTMLConstructionSite m_tree; 216 HTMLConstructionSite m_tree;
216 217
217 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html# insertion-mode 218 // http://www.whatwg.org/specs/web-apps/current-work/multipage/parsing.html# insertion-mode
218 InsertionMode m_insertionMode; 219 InsertionMode m_insertionMode;
219 220
(...skipping 13 matching lines...) Expand all
233 234
234 RefPtrWillBeMember<Element> m_scriptToProcess; // <script> tag which needs p rocessing before resuming the parser. 235 RefPtrWillBeMember<Element> m_scriptToProcess; // <script> tag which needs p rocessing before resuming the parser.
235 TextPosition m_scriptToProcessStartPosition; // Starting line number of the script tag needing processing. 236 TextPosition m_scriptToProcessStartPosition; // Starting line number of the script tag needing processing.
236 237
237 HTMLParserOptions m_options; 238 HTMLParserOptions m_options;
238 }; 239 };
239 240
240 } 241 }
241 242
242 #endif 243 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698