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

Unified Diff: Source/core/dom/custom/CustomElementScheduler.h

Issue 296703009: Oilpan: move custom element objects to the heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Use LinkedHashSet for ElementSet instead. 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/dom/custom/CustomElementScheduler.h
diff --git a/Source/core/dom/custom/CustomElementScheduler.h b/Source/core/dom/custom/CustomElementScheduler.h
index b17b875fc697efc11273fb078621dfe6e23f1c3c..e128004ca70586ad46e2f7eeeeb82779dffc7115 100644
--- a/Source/core/dom/custom/CustomElementScheduler.h
+++ b/Source/core/dom/custom/CustomElementScheduler.h
@@ -33,6 +33,7 @@
#include "core/dom/custom/CustomElementCallbackQueue.h"
#include "core/dom/custom/CustomElementLifecycleCallbacks.h"
+#include "platform/heap/Handle.h"
#include "wtf/HashMap.h"
#include "wtf/OwnPtr.h"
#include "wtf/PassRefPtr.h"
@@ -45,24 +46,26 @@ class CustomElementMicrotaskImportStep;
class Element;
class HTMLImportChild;
-class CustomElementScheduler {
+class CustomElementScheduler FINAL : public NoBaseWillBeGarbageCollectedFinalized<CustomElementScheduler> {
public:
- static void scheduleCallback(PassRefPtr<CustomElementLifecycleCallbacks>, PassRefPtr<Element>, CustomElementLifecycleCallbacks::CallbackType);
- static void scheduleAttributeChangedCallback(PassRefPtr<CustomElementLifecycleCallbacks>, PassRefPtr<Element>, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue);
+ static void scheduleCallback(PassRefPtr<CustomElementLifecycleCallbacks>, PassRefPtrWillBeRawPtr<Element>, CustomElementLifecycleCallbacks::CallbackType);
+ static void scheduleAttributeChangedCallback(PassRefPtr<CustomElementLifecycleCallbacks>, PassRefPtrWillBeRawPtr<Element>, const AtomicString& name, const AtomicString& oldValue, const AtomicString& newValue);
- static void resolveOrScheduleResolution(PassRefPtr<CustomElementRegistrationContext>, PassRefPtr<Element>, const CustomElementDescriptor&);
+ static void resolveOrScheduleResolution(PassRefPtrWillBeRawPtr<CustomElementRegistrationContext>, PassRefPtrWillBeRawPtr<Element>, const CustomElementDescriptor&);
static CustomElementMicrotaskImportStep* scheduleImport(HTMLImportChild*);
static void microtaskDispatcherDidFinish();
static void callbackDispatcherDidFinish();
+ void trace(Visitor*);
+
private:
CustomElementScheduler() { }
static CustomElementScheduler& instance();
- CustomElementCallbackQueue& ensureCallbackQueue(PassRefPtr<Element>);
- CustomElementCallbackQueue& schedule(PassRefPtr<Element>);
+ CustomElementCallbackQueue& ensureCallbackQueue(PassRefPtrWillBeRawPtr<Element>);
+ CustomElementCallbackQueue& schedule(PassRefPtrWillBeRawPtr<Element>);
// FIXME: Consider moving the element's callback queue to
// ElementRareData. Then the scheduler can become completely
@@ -71,7 +74,7 @@ private:
// The element -> callback queue map is populated by the scheduler
// and owns the lifetimes of the CustomElementCallbackQueues.
- typedef HashMap<Element*, OwnPtr<CustomElementCallbackQueue> > ElementCallbackQueueMap;
+ typedef WillBeHeapHashMap<RawPtrWillBeMember<Element>, OwnPtrWillBeMember<CustomElementCallbackQueue> > ElementCallbackQueueMap;
ElementCallbackQueueMap m_elementCallbackQueueMap;
};

Powered by Google App Engine
This is Rietveld 408576698