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

Unified Diff: Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp

Issue 916403003: Make dispatchIfAlive ensure the life of its queue. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
« no previous file with comments | « Source/core/dom/custom/CustomElementMicrotaskQueueBase.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp
diff --git a/Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp b/Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp
index a7e6d2642870572efa42492fc3a82f71d1dff259..341b5b39937c358a8e550f79ec643f6a6d3c51c0 100644
--- a/Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp
+++ b/Source/core/dom/custom/CustomElementMicrotaskRunQueue.cpp
@@ -40,8 +40,10 @@ void CustomElementMicrotaskRunQueue::enqueue(HTMLImportLoader* parentLoader, Pas
void CustomElementMicrotaskRunQueue::dispatchIfAlive(WeakPtr<CustomElementMicrotaskRunQueue> self)
{
- if (self.get())
+ if (self.get()) {
+ RefPtrWillBeRawPtr<CustomElementMicrotaskRunQueue> protect(self.get());
self->dispatch();
+ }
}
void CustomElementMicrotaskRunQueue::requestDispatchIfNeeded()
« no previous file with comments | « Source/core/dom/custom/CustomElementMicrotaskQueueBase.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698