Index: Source/core/svg/graphics/SVGImage.cpp |
diff --git a/Source/core/svg/graphics/SVGImage.cpp b/Source/core/svg/graphics/SVGImage.cpp |
index 63f77b798b68b32676bd20edadb1310669825842..62058ca4639a15aa101a8a53ccac8b6041c3a2ca 100644 |
--- a/Source/core/svg/graphics/SVGImage.cpp |
+++ b/Source/core/svg/graphics/SVGImage.cpp |
@@ -64,6 +64,9 @@ SVGImage::SVGImage(ImageObserver* observer) |
SVGImage::~SVGImage() |
{ |
+ // willBeDestroyed() will fire events but doesn't allow scripts |
+ // to run so we can call it in EventDispatchForbiddenScope scope. |
esprehn
2014/12/18 06:57:30
I would be more specific and call out that unload
|
+ EventDispatchForbiddenScope::AllowUserAgentEvents allowEvents; |
if (m_page) { |
// Store m_page in a local variable, clearing m_page, so that SVGImageChromeClient knows we're destructed. |
OwnPtrWillBeRawPtr<Page> currentPage = m_page.release(); |