Closed Bug 1294190 Opened 8 years ago Closed 8 years ago

shim Services disallows observation of a pref

Categories

(DevTools :: Framework, enhancement, P1)

enhancement

Tracking

(firefox51 fixed)

RESOLVED FIXED
Firefox 51
Iteration:
51.1 - Aug 15
Tracking Status
firefox51 --- fixed

People

(Reporter: tromey, Assigned: tromey)

References

Details

(Whiteboard: [reserve-html])

Attachments

(3 files)

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: nobody → ttromey
Status: NEW → ASSIGNED
Iteration: --- → 51.1 - Aug 15
Priority: P2 → P1
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 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 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 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+
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
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: