shim Services disallows observation of a pref

RESOLVED FIXED in Firefox 51

Status

enhancement
P1
normal
RESOLVED FIXED
3 years ago
11 months ago

People

(Reporter: tromey, Assigned: tromey)

Tracking

unspecified
Firefox 51
Dependency tree / graph
Bug Flags:
qe-verify -

Firefox Tracking Flags

(firefox51 fixed)

Details

(Whiteboard: [reserve-html])

Attachments

(3 attachments)

(Assignee)

Description

3 years ago
event-emitter does:

    Services.prefs.addObserver("devtools.dump.emit", {

but the shim Services rejects this.
This has to be fixed.  Maybe just removing the exception is enough.
Flags: qe-verify-
Priority: -- → P2
Whiteboard: [devtools-html] → [reserve-html]
(Assignee)

Updated

3 years ago
Assignee: nobody → ttromey
Status: NEW → ASSIGNED
Iteration: --- → 51.1 - Aug 15
Priority: P2 → P1
(Assignee)

Comment 1

3 years ago
It also came up that the shim tries to read all the items in localstorage;
but this is too eager, as a tool might reasonably use localstorage for something else.
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)
Comment hidden (mozreview-request)

Comment 5

3 years ago
mozreview-review
Comment on attachment 8779875 [details]
Bug 1294190 - prefix local storage keys used by prefs;

https://reviewboard.mozilla.org/r/70790/#review68370

LGTM!
Attachment #8779875 - Flags: review?(gtatum) → review+

Comment 6

3 years ago
mozreview-review
Comment on attachment 8779873 [details]
Bug 1294190 - fix latent problems in test_service_prefs.html;

https://reviewboard.mozilla.org/r/70786/#review68372

Nice catch.
Attachment #8779873 - Flags: review?(gtatum) → review+

Comment 7

3 years ago
mozreview-review
Comment on attachment 8779874 [details]
Bug 1294190 - allow observation of a preference in shim prefs;

https://reviewboard.mozilla.org/r/70788/#review68356

Everything looks good on my end, thanks.

::: devtools/client/shared/shim/test/test_service_prefs.html:206
(Diff revision 1)
>      "somestring": true
>    }, "removeObserver worked");
>  
> +  clearNotificationList();
> +  branch0.addObserver("devtools.branch1.somestring", observer, false);
> +  Services.prefs.setCharPref("devtools.branch1.somestring", "northern shoveler");

Nice choice of animal.
Attachment #8779874 - Flags: review?(gtatum) → review+

Comment 8

3 years ago
Pushed by ttromey@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/3370d5a24a15
fix latent problems in test_service_prefs.html; r=gregtatum
https://hg.mozilla.org/integration/autoland/rev/975288a373b8
allow observation of a preference in shim prefs; r=gregtatum
https://hg.mozilla.org/integration/autoland/rev/7605d95cd9df
prefix local storage keys used by prefs; r=gregtatum

Comment 9

3 years ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/3370d5a24a15
https://hg.mozilla.org/mozilla-central/rev/975288a373b8
https://hg.mozilla.org/mozilla-central/rev/7605d95cd9df
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 51

Updated

11 months ago
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.