Closed Bug 1262766 Opened 4 years ago Closed 4 years ago

Storage Inspector breaks down when Cache Storage throws a DOM security error

Categories

(DevTools :: Storage Inspector, defect, P1)

defect

Tracking

(firefox48 fixed)

RESOLVED FIXED
Firefox 48
Tracking Status
firefox48 --- fixed

People

(Reporter: jsnajdr, Assigned: jsnajdr)

References

Details

Attachments

(1 file, 2 obsolete files)

Steps to reproduce:
1. Open a private window
2. Go to any page
3. Open Storage Inspector

Cache storage is disabled in private mode, and calling any method on the CacheStorage object (e.g., cache.keys()) will throw a DOM security exception.

Expected result:
The storage inspector expects this error and recovers from it.

Actual result:
The uncaught exception prevents listing the stores from finishing, and the storage UI is not initialized properly. It becomes unusable, complaining about undefined properties all the time.
Assignee: nobody → mratcliffe
Priority: -- → P1
Mike, I'm going to post a patch today, reassigning to me.
Assignee: mratcliffe → jsnajdr
Added a try/catch block when listing the caches for a host. The test is using an "untrusted" iframe which has a Javascript source URL - the CacheStorage is disabled for such iframes and a DOM security error is thrown.
Attachment #8738977 - Flags: review?(mratcliffe)
Comment on attachment 8738977 [details] [diff] [review]
Storage Inspector breaks down when Cache Storage throws a DOM security error

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

r+ on green try.
Attachment #8738977 - Flags: review?(mratcliffe) → review+
Depends on: 1262813
(In reply to Michael Ratcliffe [:miker] [:mratcliffe] from comment #4)
> r+ on green try.

The test started failing after the changes from bug 1237915 arrived to me. Filed that as bug 1262813.
Added a workaround for bug 1262813 until it's properly fixed (or maybe this is the right fix?), try run was green with this new version of the patch.
Attachment #8739784 - Flags: review?(mratcliffe)
Attachment #8738977 - Attachment is obsolete: true
Fixed eslint errors.
Attachment #8739874 - Flags: review?(mratcliffe)
Attachment #8739784 - Attachment is obsolete: true
Attachment #8739784 - Flags: review?(mratcliffe)
Attachment #8739874 - Flags: review?(mratcliffe) → review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/54a802cb5d43
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.