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

Side by Side Diff: Source/core/dom/custom/CustomElementMicrotaskImportStep.h

Issue 296703009: Oilpan: move custom element objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compilation issue pointed out by clang Created 6 years, 7 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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 * 7 *
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 14 matching lines...) Expand all
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef CustomElementMicrotaskImportStep_h 31 #ifndef CustomElementMicrotaskImportStep_h
32 #define CustomElementMicrotaskImportStep_h 32 #define CustomElementMicrotaskImportStep_h
33 33
34 #include "core/dom/custom/CustomElementMicrotaskStep.h" 34 #include "core/dom/custom/CustomElementMicrotaskStep.h"
35 #include "platform/heap/Handle.h"
35 #include "wtf/Noncopyable.h" 36 #include "wtf/Noncopyable.h"
36 #include "wtf/PassOwnPtr.h" 37 #include "wtf/PassOwnPtr.h"
37 #include "wtf/PassRefPtr.h" 38 #include "wtf/PassRefPtr.h"
38 #include "wtf/RefPtr.h" 39 #include "wtf/RefPtr.h"
39 #include "wtf/WeakPtr.h" 40 #include "wtf/WeakPtr.h"
40 41
41 namespace WebCore { 42 namespace WebCore {
42 43
43 class CustomElementMicrotaskQueue; 44 class CustomElementMicrotaskQueue;
44 class HTMLImportChild; 45 class HTMLImportChild;
45 46
46 // Processes the Custom Elements in an HTML Import. This is a 47 // Processes the Custom Elements in an HTML Import. This is a
47 // composite step which processes the Custom Elements created by 48 // composite step which processes the Custom Elements created by
48 // parsing the import, and its sub-imports. 49 // parsing the import, and its sub-imports.
49 // 50 //
50 // This step blocks further Custom Element microtask processing if its 51 // This step blocks further Custom Element microtask processing if its
51 // import isn't "ready" (finished parsing and running script.) 52 // import isn't "ready" (finished parsing and running script.)
52 class CustomElementMicrotaskImportStep : public CustomElementMicrotaskStep { 53 class CustomElementMicrotaskImportStep : public CustomElementMicrotaskStep {
53 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskImportStep); 54 WTF_MAKE_NONCOPYABLE(CustomElementMicrotaskImportStep);
54 public: 55 public:
55 static PassOwnPtr<CustomElementMicrotaskImportStep> create(HTMLImportChild*) ; 56 static PassOwnPtrWillBeRawPtr<CustomElementMicrotaskImportStep> create(HTMLI mportChild*);
56 virtual ~CustomElementMicrotaskImportStep(); 57 virtual ~CustomElementMicrotaskImportStep();
57 58
58 // API for HTML Imports 59 // API for HTML Imports
59 void parentWasChanged(); 60 void parentWasChanged();
60 void importDidFinishLoading(); 61 void importDidFinishLoading();
61 WeakPtr<CustomElementMicrotaskImportStep> weakPtr() { return m_weakFactory.c reateWeakPtr(); } 62 WeakPtr<CustomElementMicrotaskImportStep> weakPtr() { return m_weakFactory.c reateWeakPtr(); }
62 63
64 virtual void trace(Visitor*) OVERRIDE;
65
63 private: 66 private:
64 CustomElementMicrotaskImportStep(HTMLImportChild*); 67 explicit CustomElementMicrotaskImportStep(HTMLImportChild*);
65 68
66 void didUpgradeAllCustomElements(); 69 void didUpgradeAllCustomElements();
67 bool shouldWaitForImport() const; 70 bool shouldWaitForImport() const;
68 bool shouldStopProcessing() const; 71 bool shouldStopProcessing() const;
69 72
70 // CustomElementMicrotaskStep 73 // CustomElementMicrotaskStep
71 virtual Result process() OVERRIDE FINAL; 74 virtual Result process() OVERRIDE FINAL;
72 virtual bool needsProcessOrStop() const OVERRIDE FINAL; 75 virtual bool needsProcessOrStop() const OVERRIDE FINAL;
73 76
74 #if !defined(NDEBUG) 77 #if !defined(NDEBUG)
75 virtual void show(unsigned indent) OVERRIDE; 78 virtual void show(unsigned indent) OVERRIDE;
76 #endif 79 #endif
77 WeakPtr<HTMLImportChild> m_import; 80 WeakPtr<HTMLImportChild> m_import;
78 RefPtr<CustomElementMicrotaskQueue> m_queue; 81 RefPtrWillBeMember<CustomElementMicrotaskQueue> m_queue;
79 WeakPtrFactory<CustomElementMicrotaskImportStep> m_weakFactory; 82 WeakPtrFactory<CustomElementMicrotaskImportStep> m_weakFactory;
80 }; 83 };
81 84
82 } 85 }
83 86
84 #endif // CustomElementMicrotaskImportStep_h 87 #endif // CustomElementMicrotaskImportStep_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698