Bug 150315

Summary: ERROR: Unhandled web process message 'StorageAreaMap:DispatchStorageEvent'
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebKit2Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, commit-queue, darin, esprehn+autocc, gyuyoung.kim, japhet, kling, mcatanzaro
Priority: P2    
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 150362    
Bug Blocks:    
Attachments:
Description Flags
Patch
kling: review+
Updated patch
none
Changed the assert none

Carlos Garcia Campos
Reported 2015-10-18 23:27:40 PDT
This happens a lot in the GTK+ debug bot. 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.
Attachments
Patch (2.31 KB, patch)
2015-10-18 23:31 PDT, Carlos Garcia Campos
kling: review+
Updated patch (21.49 KB, patch)
2015-10-19 01:06 PDT, Carlos Garcia Campos
no flags
Changed the assert (2.78 KB, patch)
2015-10-22 03:08 PDT, Carlos Garcia Campos
no flags
Carlos Garcia Campos
Comment 1 2015-10-18 23:31:08 PDT
Carlos Garcia Campos
Comment 2 2015-10-19 01:06:33 PDT
Created attachment 263455 [details] Updated patch Addressed all review comments.
Carlos Garcia Campos
Comment 3 2015-10-19 01:07:57 PDT
Oops, wrong bug, sorry for the noise.
Andreas Kling
Comment 4 2015-10-19 07:06:52 PDT
Comment on attachment 263445 [details] Patch r=me
Carlos Garcia Campos
Comment 5 2015-10-19 23:21:54 PDT
Alexey Proskuryakov
Comment 6 2015-10-20 08:57:50 PDT
WebKit Commit Bot
Comment 7 2015-10-20 08:59:43 PDT
Re-opened since this is blocked by bug 150362
Carlos Garcia Campos
Comment 8 2015-10-21 01:27:58 PDT
Yes, I didn't take into account that now we can have session storage maps without a listener when the connection is closed and destroyStorageMap() hasn't been called. We could either simply change the ASSERT to something like ASSERT(isSessionStporage() || m_eventListeners.contains(std::make_pair(&connection, storageMapID))); or add checks to processDidCloseConnection() and applicationWillTerminate() in case of session storage to not call removeListener if the listener is not present. Since HashMap handles the case of removing a non exiting item, I think it's simpler and probably more efficient to change the assert. Although, it's true that it wouldn't catch valid cases of session storage maps that should have a listener at that point. What do you guys think?
Carlos Garcia Campos
Comment 9 2015-10-22 03:08:26 PDT
Created attachment 263812 [details] Changed the assert Ok, took the simplest approach and changed the assert. Just cq+ this if you agree with changing the assert.
Andreas Kling
Comment 10 2015-10-22 14:40:18 PDT
Comment on attachment 263812 [details] Changed the assert Sure, this seems fine.
WebKit Commit Bot
Comment 11 2015-10-22 15:25:57 PDT
Comment on attachment 263812 [details] Changed the assert Clearing flags on attachment: 263812 Committed r191481: <http://trac.webkit.org/changeset/191481>
WebKit Commit Bot
Comment 12 2015-10-22 15:26:03 PDT
All reviewed patches have been landed. Closing bug.
Michael Catanzaro
Comment 13 2015-10-24 13:05:42 PDT
*** Bug 149387 has been marked as a duplicate of this bug. ***
Note You need to log in before you can comment on or make changes to this bug.