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

Unified Diff: third_party/WebKit/Source/core/html/HTMLStyleElement.cpp

Issue 1554903002: EventSender<T> singletons are better off on the Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove no-op cancelEvent()s Created 4 years, 12 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: third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
index f462570303d8c8fcf921bbb55ab212fbdfcaf899..28e9b3b173e45f83e5840042eb1cdfdbd36b9471 100644
--- a/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLStyleElement.cpp
@@ -36,8 +36,8 @@ using namespace HTMLNames;
static StyleEventSender& styleLoadEventSender()
{
- DEFINE_STATIC_LOCAL(StyleEventSender, sharedLoadEventSender, (EventTypeNames::load));
- return sharedLoadEventSender;
+ DEFINE_STATIC_LOCAL(OwnPtrWillBePersistent<StyleEventSender>, sharedLoadEventSender, (StyleEventSender::create(EventTypeNames::load)));
+ return *sharedLoadEventSender;
}
inline HTMLStyleElement::HTMLStyleElement(Document& document, bool createdByParser)
@@ -52,9 +52,9 @@ HTMLStyleElement::~HTMLStyleElement()
{
#if !ENABLE(OILPAN)
StyleElement::clearDocumentData(document(), this);
-#endif
styleLoadEventSender().cancelEvent(this);
+#endif
}
PassRefPtrWillBeRawPtr<HTMLStyleElement> HTMLStyleElement::create(Document& document, bool createdByParser)
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLStyleElement.h ('k') | third_party/WebKit/Source/core/loader/ImageLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698