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

Unified Diff: Source/core/dom/ChildListMutationScope.h

Issue 236653002: Oilpan: move mutation observers to the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased + explicitly dispose() mutation observer registrations always (non-Oilpan also.) Created 6 years, 8 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/ChildListMutationScope.h
diff --git a/Source/core/dom/ChildListMutationScope.h b/Source/core/dom/ChildListMutationScope.h
index d847d826a6d7a8591d23f3a654adffca344d35f1..e0aa7396a61631268af08fb11b0f37635f5bf1e7 100644
--- a/Source/core/dom/ChildListMutationScope.h
+++ b/Source/core/dom/ChildListMutationScope.h
@@ -34,6 +34,7 @@
#include "core/dom/Document.h"
#include "core/dom/MutationObserver.h"
#include "core/dom/Node.h"
+#include "platform/heap/Handle.h"
#include "wtf/Noncopyable.h"
#include "wtf/OwnPtr.h"
#include "wtf/RefCounted.h"
@@ -43,7 +44,7 @@ namespace WebCore {
class MutationObserverInterestGroup;
// ChildListMutationAccumulator is not meant to be used directly; ChildListMutationScope is the public interface.
-class ChildListMutationAccumulator : public RefCounted<ChildListMutationAccumulator> {
+class ChildListMutationAccumulator FINAL : public RefCounted<ChildListMutationAccumulator> {
public:
static PassRefPtr<ChildListMutationAccumulator> getOrCreate(Node&);
~ChildListMutationAccumulator();
@@ -54,7 +55,7 @@ public:
bool hasObservers() const { return m_observers; }
private:
- ChildListMutationAccumulator(PassRefPtr<Node>, PassOwnPtr<MutationObserverInterestGroup>);
+ ChildListMutationAccumulator(PassRefPtr<Node>, PassOwnPtrWillBeRawPtr<MutationObserverInterestGroup>);
void enqueueMutationRecord();
bool isEmpty();
@@ -69,11 +70,12 @@ private:
RefPtr<Node> m_nextSibling;
Node* m_lastAdded;
- OwnPtr<MutationObserverInterestGroup> m_observers;
+ OwnPtrWillBePersistent<MutationObserverInterestGroup> m_observers;
};
-class ChildListMutationScope {
+class ChildListMutationScope FINAL {
WTF_MAKE_NONCOPYABLE(ChildListMutationScope);
+ STACK_ALLOCATED();
public:
explicit ChildListMutationScope(Node& target)
{

Powered by Google App Engine
This is Rietveld 408576698