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

Side by Side Diff: Source/core/html/parser/HTMLParserScheduler.h

Issue 1306413003: Make classes and structures in core/html fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | « Source/core/html/parser/HTMLParserOptions.h ('k') | Source/core/html/parser/HTMLParserThread.h » ('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 10 matching lines...) Expand all
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */ 24 */
25 25
26 #ifndef HTMLParserScheduler_h 26 #ifndef HTMLParserScheduler_h
27 #define HTMLParserScheduler_h 27 #define HTMLParserScheduler_h
28 28
29 #include "core/html/parser/NestingLevelIncrementer.h" 29 #include "core/html/parser/NestingLevelIncrementer.h"
30 #include "platform/scheduler/CancellableTaskFactory.h" 30 #include "platform/scheduler/CancellableTaskFactory.h"
31 #include "wtf/Allocator.h"
31 #include "wtf/PassOwnPtr.h" 32 #include "wtf/PassOwnPtr.h"
32 #include "wtf/RefPtr.h" 33 #include "wtf/RefPtr.h"
33 34
34 namespace blink { 35 namespace blink {
35 36
36 class Document; 37 class Document;
37 class HTMLDocumentParser; 38 class HTMLDocumentParser;
38 39
39 class ActiveParserSession : public NestingLevelIncrementer { 40 class ActiveParserSession : public NestingLevelIncrementer {
40 STACK_ALLOCATED(); 41 STACK_ALLOCATED();
41 public: 42 public:
42 ActiveParserSession(unsigned& nestingLevel, Document*); 43 ActiveParserSession(unsigned& nestingLevel, Document*);
43 ~ActiveParserSession(); 44 ~ActiveParserSession();
44 45
45 private: 46 private:
46 RefPtrWillBeMember<Document> m_document; 47 RefPtrWillBeMember<Document> m_document;
47 }; 48 };
48 49
49 class PumpSession : public ActiveParserSession { 50 class PumpSession : public ActiveParserSession {
50 STACK_ALLOCATED(); 51 STACK_ALLOCATED();
51 public: 52 public:
52 PumpSession(unsigned& nestingLevel, Document*); 53 PumpSession(unsigned& nestingLevel, Document*);
53 ~PumpSession(); 54 ~PumpSession();
54 }; 55 };
55 56
56 class SpeculationsPumpSession : public ActiveParserSession { 57 class SpeculationsPumpSession : public ActiveParserSession {
58 STACK_ALLOCATED();
57 public: 59 public:
58 SpeculationsPumpSession(unsigned& nestingLevel, Document*); 60 SpeculationsPumpSession(unsigned& nestingLevel, Document*);
59 ~SpeculationsPumpSession(); 61 ~SpeculationsPumpSession();
60 62
61 double elapsedTime() const; 63 double elapsedTime() const;
62 void addedElementTokens(size_t count); 64 void addedElementTokens(size_t count);
63 size_t processedElementTokens() const { return m_processedElementTokens; } 65 size_t processedElementTokens() const { return m_processedElementTokens; }
64 66
65 private: 67 private:
66 double m_startTime; 68 double m_startTime;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 105
104 HTMLDocumentParser* m_parser; 106 HTMLDocumentParser* m_parser;
105 107
106 CancellableTaskFactory m_cancellableContinueParse; 108 CancellableTaskFactory m_cancellableContinueParse;
107 bool m_isSuspendedWithActiveTimer; 109 bool m_isSuspendedWithActiveTimer;
108 }; 110 };
109 111
110 } 112 }
111 113
112 #endif 114 #endif
OLDNEW
« no previous file with comments | « Source/core/html/parser/HTMLParserOptions.h ('k') | Source/core/html/parser/HTMLParserThread.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698