Title: [214801] releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog
- Revision
- 214801
- Author
- carlo...@webkit.org
- Date
- 2017-04-03 09:46:21 -0700 (Mon, 03 Apr 2017)
Log Message
Merge r214392 - media/restore-from-page-cache.html causes NoEventDispatchAssertion::isEventAllowedInMainThread() assertion failure
https://bugs.webkit.org/show_bug.cgi?id=170087
<rdar://problem/31254822>
Reviewed by Simon Fraser.
Reduce the scope of code that should never dispatch DOM events so as to allow updating contents size
after restoring a page from the page cache.
In r214014 we instantiate a NoEventDispatchAssertion in FrameLoader::commitProvisionalLoad()
around the call to CachedPage::restore() to assert when a DOM event is dispatched during
page restoration as such events can cause re-entrancy into the page cache. As it turns out
it is sufficient to ensure that no DOM events are dispatched after restoring all cached frames
as opposed to after CachedPage::restore() returns.
Also rename Document::enqueue{Pageshow, Popstate}Event() to dispatch{Pageshow, Popstate}Event(),
respectively, since they synchronously dispatch events :(. We hope in the future to make them
asynchronously dispatch events.
* dom/Document.cpp:
(WebCore::Document::implicitClose): Update for renaming.
(WebCore::Document::statePopped): Ditto.
(WebCore::Document::dispatchPageshowEvent): Renamed; formerly named enqueuePageshowEvent().
(WebCore::Document::dispatchPopstateEvent): Renamed; formerly named enqueuePopstateEvent().
(WebCore::Document::enqueuePageshowEvent): Deleted.
(WebCore::Document::enqueuePopstateEvent): Deleted.
* dom/Document.h:
* history/CachedPage.cpp:
(WebCore::firePageShowAndPopStateEvents): Moved logic from FrameLoader::didRestoreFromCachedPage() to here.
(WebCore::CachedPage::restore): Modified to call firePageShowAndPopStateEvents().
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::commitProvisionalLoad): Removed use of NoEventDispatchAssertion RAII object. We
will instantiate it in CachedPage::restore() with a smaller scope.
(WebCore::FrameLoader::didRestoreFromCachedPage): Deleted; moved logic from here to WebCore::firePageShowAndPopStateEvents().
* loader/FrameLoader.h:
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (214800 => 214801)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-04-03 16:22:16 UTC (rev 214800)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-04-03 16:46:21 UTC (rev 214801)
@@ -1,3 +1,41 @@
+2017-03-24 Daniel Bates <daba...@apple.com>
+
+ media/restore-from-page-cache.html causes NoEventDispatchAssertion::isEventAllowedInMainThread() assertion failure
+ https://bugs.webkit.org/show_bug.cgi?id=170087
+ <rdar://problem/31254822>
+
+ Reviewed by Simon Fraser.
+
+ Reduce the scope of code that should never dispatch DOM events so as to allow updating contents size
+ after restoring a page from the page cache.
+
+ In r214014 we instantiate a NoEventDispatchAssertion in FrameLoader::commitProvisionalLoad()
+ around the call to CachedPage::restore() to assert when a DOM event is dispatched during
+ page restoration as such events can cause re-entrancy into the page cache. As it turns out
+ it is sufficient to ensure that no DOM events are dispatched after restoring all cached frames
+ as opposed to after CachedPage::restore() returns.
+
+ Also rename Document::enqueue{Pageshow, Popstate}Event() to dispatch{Pageshow, Popstate}Event(),
+ respectively, since they synchronously dispatch events :(. We hope in the future to make them
+ asynchronously dispatch events.
+
+ * dom/Document.cpp:
+ (WebCore::Document::implicitClose): Update for renaming.
+ (WebCore::Document::statePopped): Ditto.
+ (WebCore::Document::dispatchPageshowEvent): Renamed; formerly named enqueuePageshowEvent().
+ (WebCore::Document::dispatchPopstateEvent): Renamed; formerly named enqueuePopstateEvent().
+ (WebCore::Document::enqueuePageshowEvent): Deleted.
+ (WebCore::Document::enqueuePopstateEvent): Deleted.
+ * dom/Document.h:
+ * history/CachedPage.cpp:
+ (WebCore::firePageShowAndPopStateEvents): Moved logic from FrameLoader::didRestoreFromCachedPage() to here.
+ (WebCore::CachedPage::restore): Modified to call firePageShowAndPopStateEvents().
+ * loader/FrameLoader.cpp:
+ (WebCore::FrameLoader::commitProvisionalLoad): Removed use of NoEventDispatchAssertion RAII object. We
+ will instantiate it in CachedPage::restore() with a smaller scope.
+ (WebCore::FrameLoader::didRestoreFromCachedPage): Deleted; moved logic from here to WebCore::firePageShowAndPopStateEvents().
+ * loader/FrameLoader.h:
+
2017-03-24 Brady Eidson <beid...@apple.com>
A null compound index value crashes the Databases process.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes