Closed Bug 681870 Opened 13 years ago Closed 13 years ago

IndexedDB: Prompts can crash when multiple windows are open

Categories

(Core :: Storage: IndexedDB, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

()

VERIFIED FIXED
Tracking Status
firefox7 --- fixed
firefox8 --- fixed

People

(Reporter: bent.mozilla, Assigned: sicking)

Details

(Keywords: verified-aurora, verified-beta)

Attachments

(1 file)

Sicking figured out our phantom prompt crash today, and will attach a patch shortly.
Attached patch Patch to fixSplinter Review
Attachment #555659 - Flags: review?(bent.mozilla)
Attachment #555659 - Flags: review?(bent.mozilla) → review+
Comment on attachment 555659 [details] [diff] [review]
Patch to fix

This fixes a pretty nasty bug in our indexedDB code. The result is that we end up crashing in case the user has multiple windows open when a indexedDB database is created.

The risk is very low as the fix is very simple. It also only affects indexedDB code, so worst case it shouldn't affect many sites as indexedDB isn't widely used yet.
Attachment #555659 - Flags: approval1.9.2.21?
Attachment #555659 - Flags: approval-mozilla-beta?
Attachment #555659 - Flags: approval-mozilla-aurora?
http://hg.mozilla.org/mozilla-central/rev/458f82155cad
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
Comment on attachment 555659 [details] [diff] [review]
Patch to fix

Approved for Beta (Update 7) and Aurora (Update 8).  Please check it in as soon as possible.

Also clearing the 1.9.2.21 flag as we didn't include this before Firefox 4.
Attachment #555659 - Flags: approval1.9.2.21?
Attachment #555659 - Flags: approval-mozilla-beta?
Attachment #555659 - Flags: approval-mozilla-beta+
Attachment #555659 - Flags: approval-mozilla-aurora?
Attachment #555659 - Flags: approval-mozilla-aurora+
Can anyone please help me with some STR/guidelines I can use to verify this fix?
(In reply to Ioana Budnar [QA] from comment #7)
> Can anyone please help me with some STR/guidelines I can use to verify this
> fix?

The only way we were able to reproduce this was to open two browser windows (not tabs, but windows), and point one to a site that uses IndexedDB but had never been granted permission before. Initiating IndexedDB usage then would trigger a prompt, sometimes in both windows, and clicking Allow in both prompts would cause a crash. IndexedDB should only ever produce a prompt in one window.
(In reply to ben turner [:bent] from comment #8)
> ... and point one to a site that uses IndexedDB

One such site is http://davidflanagan.com/demos/zipcodes.html
Verified fixed on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0) Gecko/20100101 Firefox/7.0
Build ID: 20110902161802

STR:
1. Open 2 Fx windows.
2. Load http://davidflanagan.com/demos/zipcodes.html in both windows.
3. Input a zip code in one of the windows (or both).
4. Click on the Allow button in the prompt.
The prompt with the Allow button only appears in one of the windows. Firefox works fine after clicking the Allow button.
Status: RESOLVED → VERIFIED
QA tracking; still needs verification on Firefox 8.
Keywords: verified-beta
Whiteboard: [qa+]
Verified fixed on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0a2) Gecko/20110911 Firefox/8.0a2 
Build ID: 20110911042006
Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:9.0a1) Gecko/20110911 Firefox/9.0a1
Build ID: 20110911030845

STR:
1. Open 2 Fx windows.
2. Load http://davidflanagan.com/demos/zipcodes.html in both windows.
3. Input a zip code in one of the windows (or both).
4. Click on the Allow button in the prompt.
The prompt with the Allow button only appears in one of the windows. Firefox works fine after clicking the Allow button.
Keywords: verified-aurora
Whiteboard: [qa+]
Component: DOM → DOM: IndexedDB
Target Milestone: mozilla9 → ---
Version: Trunk → unspecified
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: