Closed Bug 1193308 Opened 9 years ago Closed 9 years ago

Clean up storage inspector code

Categories

(DevTools :: Storage Inspector, defect)

defect
Not set
normal

Tracking

(firefox43 fixed)

RESOLVED FIXED
Firefox 43
Tracking Status
firefox43 --- fixed

People

(Reporter: ntim, Assigned: ntim)

References

Details

Attachments

(1 file, 1 obsolete file)

A lot of function waterfalls in there.
Bug 1193308 - Clean up storage inspector code. r=mratcliffe
Comment on attachment 8646393 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

This does a bunch of early returns, and moves out some update logic to their own functions.
Attachment #8646393 - Flags: review?(mratcliffe)
Assignee: nobody → ntim.bugs
Status: NEW → ASSIGNED
Attachment #8646393 - Attachment description: MozReview Request: Bug 1193308 - Clean up storage inspector code. r=mratcliffe → MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe
Attachment #8646393 - Flags: review?(mratcliffe)
Comment on attachment 8646393 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

Bug 1193308 - Clean up storage inspector code. r?mratcliffe
Comment on attachment 8646393 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

Unified devtools loaders. Requesting feedback from jryans and ochameau for that part.
Attachment #8646393 - Flags: review?(mratcliffe)
Attachment #8646393 - Flags: feedback?(poirot.alex)
Attachment #8646393 - Flags: feedback?(jryans)
Comment on attachment 8646393 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

https://reviewboard.mozilla.org/r/15731/#review14161

Just looked at the file headers and it looks good.

::: browser/devtools/storage/ui.js:15
(Diff revision 2)
>    () => require("devtools/shared/widgets/TableWidget").TableWidget);

For these too, you can do:
loader.lazyRequireGetter(this, "TableWidget", "devtools/shared/widgets/TableWidget", true);
// the last `true` argument tells to use destructuring in order to take the `TableWidget` attribute and put it in a `TableWidget` attribute on `this`
Attachment #8646393 - Flags: review+
(In reply to Alexandre Poirot [:ochameau] from comment #5)
> Comment on attachment 8646393 [details]
> For these too, you can do:

s/too/two/
Comment on attachment 8646393 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

Come on mozReview don't make me r+ when I was just asked for feedback!
Attachment #8646393 - Flags: review+
Attachment #8646393 - Flags: feedback?(poirot.alex)
Attachment #8646393 - Flags: feedback+
Comment on attachment 8646393 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

What Alex said. :)
Attachment #8646393 - Flags: feedback?(jryans) → feedback+
Comment on attachment 8646393 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

Bug 1193308 - Clean up storage inspector code. r?mratcliffe
Attachment #8646393 - Flags: review?(mratcliffe)
Attachment #8646393 - Flags: feedback+
Comment on attachment 8646393 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

Alex, thanks for the tip ! Applied it to the patch.
Attachment #8646393 - Flags: review?(mratcliffe)
Attachment #8646393 - Flags: review?(mratcliffe)
Comment on attachment 8646393 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

Bug 1193308 - Clean up storage inspector code. r?mratcliffe
Comment on attachment 8646393 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

Some more loader changes based on Alex's tip.
Attachment #8646393 - Flags: review?(mratcliffe)
@ntim: Sorry it took me so long to get to this but we needed to land the E10S tests quickly.

Can you rebase the patch and then I will review it?
Flags: needinfo?(ntim.bugs)
Attachment #8646393 - Attachment is obsolete: true
Attachment #8646393 - Flags: review?(mratcliffe)
Bug 1193308 - Clean up storage inspector code. r?mratcliffe
Comment on attachment 8653447 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

I don't know if this was properly rebased (I think it was), but all the tests were passing after rebasing.
Flags: needinfo?(ntim.bugs)
Attachment #8653447 - Flags: review?(mratcliffe)
Comment on attachment 8653447 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

https://reviewboard.mozilla.org/r/17467/#review16183

r+ with theese nits addressed.

We should wait for a green try too (including E10S):
https://treeherder.mozilla.org/#/jobs?repo=try&revision=cc715fbf3621

::: browser/devtools/storage/panel.js:10
(Diff revision 1)
> +const Services = require("Services");

We no longer need to require Services in this file.

::: browser/devtools/storage/panel.js:11
(Diff revision 1)
> +const promise = require("promise");

Only native promises are used in this file. There is no need for this require.

::: browser/devtools/storage/ui.js:9
(Diff revision 1)
> -const STORAGE_STRINGS = "chrome://browser/locale/devtools/storage.properties";
> +const Services = require("Services");

We no longer need to require Services in this file.

::: browser/devtools/storage/ui.js:353
(Diff revision 1)
> -            } catch(ex) {
> +          } catch(ex) {}

Our ESLint configuration disallows empty blocks. Please re-add the "// Do Nothing" comment.
Attachment #8653447 - Flags: review?(mratcliffe) → review+
Comment on attachment 8653447 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

Bug 1193308 - Clean up storage inspector code. r?mratcliffe
Attachment #8653447 - Flags: review+ → review?(mratcliffe)
Attachment #8653447 - Flags: review?(mratcliffe) → review+
Attachment #8653447 - Flags: review+ → review?(mratcliffe)
Comment on attachment 8653447 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

Bug 1193308 - Clean up storage inspector code. r?mratcliffe
Comment on attachment 8653447 [details]
MozReview Request: Bug 1193308 - Clean up storage inspector code. r?mratcliffe

Damn it Mozreview !
Attachment #8653447 - Flags: review?(mratcliffe) → review+
Try pushes in Comment 16 & 17. The failures seem unrelated to this patch.
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Blocks: 1194190
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: