Bug 37120 - ASSERT close()ing the same StorageAreaImpl twice when using multiple PageGroups
Summary: ASSERT close()ing the same StorageAreaImpl twice when using multiple PageGroups
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2010-04-05 15:40 PDT by Brady Eidson
Modified: 2010-04-05 15:57 PDT (History)
0 users

See Also:


Attachments
Early return instead of ASSERT (1.26 KB, patch)
2010-04-05 15:44 PDT, Brady Eidson
oliver: review+
beidson: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2010-04-05 15:40:39 PDT
ASSERT close()ing the same StorageAreaImpl twice when using multiple PageGroups

If you use multiple PageGroups and point them both to the same path for LocalStorage, you can get an ASSERT closing the same storage area twice:
    ASSERT(!m_isShutdown);
#0	0x102938f3e in WebCore::StorageNamespaceImpl::close at StorageNamespaceImpl.cpp:122
#1	0x102740fc5 in WebCore::PageGroup::closeLocalStorage at PageGroup.cpp:106
#2	0x101adf881 in +[WebView _applicationWillTerminate] at WebView.mm:2482

I've traced through what happens when you *do* try to close it twice, and it appears there's no ill effects.  But it actually ends up trying to do synchronous I/O just to support the second close, which is a waste.

The ASSERT is invalid - we thought this case shouldn't happen, but it clearly can.  It should just be an early return instead.

In radar as <rdar://problem/7828420>
Comment 1 Brady Eidson 2010-04-05 15:44:44 PDT
Created attachment 52583 [details]
Early return instead of ASSERT
Comment 2 Oliver Hunt 2010-04-05 15:52:01 PDT
Comment on attachment 52583 [details]
Early return instead of ASSERT

r=me
Comment 3 Brady Eidson 2010-04-05 15:57:24 PDT
http://trac.webkit.org/changeset/57099