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) |