Closed Bug 1245615 Opened 8 years ago Closed 8 years ago

Intermittent browser_storage_dynamic_windows.js | A promise chain failed to handle a rejection: - at resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/storage.js:1025 - TypeError: this.hostVsStores is null

Categories

(DevTools :: Storage Inspector, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
Firefox 47
Tracking Status
firefox47 --- fixed

People

(Reporter: KWierso, Assigned: ochameau)

References

Details

(Keywords: intermittent-failure)

Attachments

(2 files)

I'll look into this. I thought I got rid of this one. I've seen it appear is some try runs of bug 1003860, but seemed to be fixed with additional changes.
Assignee: nobody → poirot.alex
Flags: needinfo?(poirot.alex)
Attached patch patch v1Splinter Review
Nullify hostVsStores only after event unregistration to prevent exceptions.

Hum. I may have fixed one intermittent before landing bug 1003860.
But it looks like there is another similar one.

I already fixed the scenario where onWindowReady was called *early*
and hostVsStores wasn't already set. (by setting hostVsStores in prepopulate function)
But it looks like onWindowReady may also be called late, after hostVsStores is nullified.
Comment on attachment 8715750 [details] [diff] [review]
patch v1

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

Looks like it does fix this intermittent, per last try push.
See comment 4 about this modification.
Attachment #8715750 - Flags: review?(mratcliffe)
Attachment #8715750 - Flags: review?(mratcliffe) → review+
https://hg.mozilla.org/integration/fx-team/rev/0d49792ec539b466c2489718ba785c202036cdef
Bug 1245615 - Nullify hostVsStores only after event unregistration to prevent exceptions. r=mratcliffe
https://hg.mozilla.org/mozilla-central/rev/0d49792ec539
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 47
Alas, not actually fixed.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Ok. I think that's it.
populateStoresForHost is async and yield on "caches.open()".
I can easily imagine that it last long enough to finish after destroy() is called...

So instead of nullifying the maps, just clear them.
We are going to have some left over if the test mix up things,
but at this we won't have this race exception...
Comment on attachment 8719808 [details] [diff] [review]
Just clear hostVsStores map as some async code may still use them.

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

Wasn't able to reproduce it on try.
Just got one failure, but on indexeddb:
  TypeError: this.storageActor is null
This is a similar issue, where onWindowReady most likely also last long enough to overlap call to destroy.
But I don't want to keep reference to storageActor.
It would be better for this one to ensure the test to wait for some additional event,
but I don't know which one. The test already waits for storage-update, which, I imagine is fired after the window-ready?
Attachment #8719808 - Flags: review?(mratcliffe)
Comment on attachment 8719808 [details] [diff] [review]
Just clear hostVsStores map as some async code may still use them.

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

Awesome, I was just looking into this.

stores-update can be triggered at any time by e.g. cookie observers.

I think that the best approach would be to set batchTimer to only emit stores-update after window-ready in storage.js::update().

Not sure how we should handle that though.

Can you log a bug for the indexeddb issue... at least this bug fixes the original issue.
Attachment #8719808 - Flags: review?(mratcliffe) → review+
See Also: → 1248929
https://hg.mozilla.org/integration/fx-team/rev/c3b3d8650c05dc992c3a6ecb853094ba590044f5
Bug 1245615 - Just clear hostVsStores map as some async code may still use them. r=mratcliffe
https://hg.mozilla.org/mozilla-central/rev/c3b3d8650c05
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: