Title: [191571] releases/WebKitGTK/webkit-2.10/Source/WebKit2
- Revision
- 191571
- Author
- [email protected]
- Date
- 2015-10-26 01:37:20 -0700 (Mon, 26 Oct 2015)
Log Message
Merge r191481 - ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
https://bugs.webkit.org/show_bug.cgi?id=150315
Patch by Carlos Garcia Campos <[email protected]> on 2015-10-22
Reviewed by Andreas Kling.
It was introduced in r184930, that keeps the session storage area
maps alive in the UI process when they are destroyed by the web
process. The problem is that we also keep the listeners, so that
events are also dispatched to the listeners of destroyed areas,
and the message handlers were removed in the web process.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::createTransientLocalStorageMap): Add a
listener for the new storage map ID when the map is reused.
(WebKit::StorageManager::destroyStorageMap): Always remove
listeners of destroyed maps.
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog (191570 => 191571)
--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog 2015-10-26 08:36:15 UTC (rev 191570)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/ChangeLog 2015-10-26 08:37:20 UTC (rev 191571)
@@ -1,3 +1,22 @@
+2015-10-22 Carlos Garcia Campos <[email protected]>
+
+ ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
+ https://bugs.webkit.org/show_bug.cgi?id=150315
+
+ Reviewed by Andreas Kling.
+
+ It was introduced in r184930, that keeps the session storage area
+ maps alive in the UI process when they are destroyed by the web
+ process. The problem is that we also keep the listeners, so that
+ events are also dispatched to the listeners of destroyed areas,
+ and the message handlers were removed in the web process.
+
+ * UIProcess/Storage/StorageManager.cpp:
+ (WebKit::StorageManager::createTransientLocalStorageMap): Add a
+ listener for the new storage map ID when the map is reused.
+ (WebKit::StorageManager::destroyStorageMap): Always remove
+ listeners of destroyed maps.
+
2015-10-22 Ryosuke Niwa <[email protected]>
REGRESSION (r181972): Scroll position changes to top of youtube page when switching tabs
Modified: releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/Storage/StorageManager.cpp (191570 => 191571)
--- releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/Storage/StorageManager.cpp 2015-10-26 08:36:15 UTC (rev 191570)
+++ releases/WebKitGTK/webkit-2.10/Source/WebKit2/UIProcess/Storage/StorageManager.cpp 2015-10-26 08:37:20 UTC (rev 191571)
@@ -199,7 +199,7 @@
void StorageManager::StorageArea::removeListener(IPC::Connection& connection, uint64_t storageMapID)
{
- ASSERT(m_eventListeners.contains(std::make_pair(&connection, storageMapID)));
+ ASSERT(isSessionStorage() || m_eventListeners.contains(std::make_pair(&connection, storageMapID)));
m_eventListeners.remove(std::make_pair(&connection, storageMapID));
}
@@ -736,6 +736,7 @@
continue;
if (!origin->isSameSchemeHostPort(&area->securityOrigin()))
continue;
+ area->addListener(connection, storageMapID);
m_storageAreasByConnection.remove(it);
m_storageAreasByConnection.add({ &connection, storageMapID }, WTF::move(area));
return;
@@ -796,11 +797,12 @@
return;
}
+ it->value->removeListener(connection, storageMapID);
+
// Don't remove session storage maps. The web process may reconnect and expect the data to still be around.
if (it->value->isSessionStorage())
return;
- it->value->removeListener(connection, storageMapID);
m_storageAreasByConnection.remove(connectionAndStorageMapIDPair);
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes