Last Comment Bug 755767 - Shut down indexedDB on profile-before-change
: Shut down indexedDB on profile-before-change
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: IndexedDB (show other bugs)
: unspecified
: All All
: -- normal (vote)
: mozilla16
Assigned To: Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
:
: Hsin-Yi Tsai [:hsinyi]
Mentors:
Depends on:
Blocks: 726378
  Show dependency treegraph
 
Reported: 2012-05-16 08:31 PDT by Ben Turner (not reading bugmail, use the needinfo flag!)
Modified: 2012-06-07 10:46 PDT (History)
3 users (show)
khuey: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch (1.74 KB, patch)
2012-06-04 14:44 PDT, Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary)
bent.mozilla: review+
Details | Diff | Splinter Review

Description Ben Turner (not reading bugmail, use the needinfo flag!) 2012-05-16 08:31:23 PDT
We shut everything down at xpcom-shutdown currently and that's too late. We rely on the profile directory (and we want to support fast _exit()) so we should use profile-before-change.
Comment 1 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-06-04 14:44:09 PDT
Created attachment 629935 [details] [diff] [review]
Patch

I wrote this last week.  It appears to just work.
Comment 2 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-06-04 14:50:18 PDT
Comment on attachment 629935 [details] [diff] [review]
Patch

Review of attachment 629935 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/indexedDB/IndexedDatabaseManager.cpp
@@ +238,5 @@
>      nsCOMPtr<nsIObserverService> obs = GetObserverService();
>      NS_ENSURE_TRUE(obs, nsnull);
>  
>      // We need this callback to know when to shut down all our threads.
> +    rv = obs->AddObserver(instance, "profile-before-change", false);

Nit: Let's use a #define
Comment 3 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2012-06-07 10:46:17 PDT
https://hg.mozilla.org/mozilla-central/rev/0099fbd7c5f3

Note You need to log in before you can comment on or make changes to this bug.