Closed Bug 1489844 Opened 6 years ago Closed 6 years ago

Port DOMPrefs to StaticPrefs

Categories

(Core :: DOM: Core & HTML, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: baku, Assigned: baku)

References

Details

Attachments

(27 files, 18 obsolete files)

3.78 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
7.75 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
3.92 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
3.37 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
4.18 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
3.24 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
3.11 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
5.56 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
5.25 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
11.74 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
5.99 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
6.30 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
3.83 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
5.20 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
6.02 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
8.38 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
5.38 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
4.80 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
8.39 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
4.04 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
5.97 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
12.38 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
5.46 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
9.87 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
5.04 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
4.24 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
6.81 KB, patch
ehsan.akhgari
: review+
Details | Diff | Splinter Review
DOMPrefs was implemented before StaticPrefs and it does similar things: atomic boolean/uint32_t static prefs. It's time to remove it and switch to StaticPrefs.
Attachment #9007554 - Flags: review?(ehsan)
Attached patch part 2 - dom.caches.enabled (obsolete) — Splinter Review
Attachment #9007555 - Flags: review?(ehsan)
Attachment #9007556 - Flags: review?(ehsan)
Attachment #9007557 - Flags: review?(ehsan)
Attachment #9007558 - Flags: review?(ehsan)
Attachment #9007559 - Flags: review?(ehsan)
Attachment #9007561 - Flags: review?(ehsan)
Attachment #9007563 - Flags: review?(ehsan)
Attachment #9007564 - Flags: review?(ehsan)
Attached patch part 12 - dom.push.enabled (obsolete) — Splinter Review
Attachment #9007565 - Flags: review?(ehsan)
Attached patch part 13 - dom.streams.enabled (obsolete) — Splinter Review
Attachment #9007566 - Flags: review?(ehsan)
Attachment #9007567 - Flags: review?(ehsan)
Attachment #9007568 - Flags: review?(ehsan)
Attached patch part 16 - dom.netinfo.enabled (obsolete) — Splinter Review
Attachment #9007569 - Flags: review?(ehsan)
Attachment #9007570 - Flags: review?(ehsan)
Attachment #9007571 - Flags: review?(ehsan)
Attachment #9007573 - Flags: review?(ehsan)
Attachment #9007574 - Flags: review?(ehsan)
Attachment #9007575 - Flags: review?(ehsan)
Attachment #9007578 - Flags: review?(ehsan)
Attachment #9007579 - Flags: review?(ehsan)
Comment on attachment 9007554 [details] [diff] [review]
part 1 - canvas_imagebitmap_extensions_enabled

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

::: dom/webidl/ImageBitmap.webidl
@@ +402,5 @@
>  
>  typedef sequence<ChannelPixelLayout> ImagePixelLayout;
>  
>  partial interface ImageBitmap {
> +    [Throws, Func="mozilla::dom::DOMPrefs::canvas_imagebitmap_extensions_enabled"]

Couldn't we use StaticPrefs here directly?  (Could happen in a follow-up).

::: modules/libpref/init/StaticPrefList.h
@@ +204,5 @@
>  
> +VARCACHE_PREF(
> +  "canvas.imagebitmap_extensions.enabled",
> +   canvas_imagebitmap_extensions_enabled,
> +  RelaxedAtomicBool, false

You need to remove this from all.js too.
Attachment #9007554 - Flags: review?(ehsan) → review-
Comment on attachment 9007555 [details] [diff] [review]
part 2 - dom.caches.enabled

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

r- on the rest also I guess since it seems you have forgotten about all.js?

(And if possible please use StaticPrefs directly in the IDL -- might require including the header somewhere like BindingDeclarations.h?

::: modules/libpref/init/StaticPrefList.h
@@ +210,5 @@
>  
> +VARCACHE_PREF(
> +  "dom.caches.enabled",
> +   dom_caches_enabled,
> +  RelaxedAtomicBool, false

Ditto, this should be removed from all.js as well.  It also has the wrong default value here (should be true).
Attachment #9007555 - Flags: review?(ehsan) → review-
(Not gonna go and change all of these flags...) :-)
Attachment #9007554 - Attachment is obsolete: true
Attachment #9007596 - Flags: review?(ehsan)
Attachment #9007555 - Attachment is obsolete: true
Attachment #9007597 - Flags: review?(ehsan)
Attachment #9007557 - Attachment is obsolete: true
Attachment #9007557 - Flags: review?(ehsan)
Attachment #9007598 - Flags: review?(ehsan)
Attachment #9007558 - Attachment is obsolete: true
Attachment #9007558 - Flags: review?(ehsan)
Attachment #9007599 - Flags: review?(ehsan)
Attachment #9007559 - Attachment is obsolete: true
Attachment #9007559 - Flags: review?(ehsan)
Attachment #9007600 - Flags: review?(ehsan)
Attachment #9007560 - Attachment is obsolete: true
Attachment #9007560 - Flags: review?(ehsan)
Attachment #9007601 - Flags: review?(ehsan)
Attachment #9007561 - Attachment is obsolete: true
Attachment #9007561 - Flags: review?(ehsan)
Attachment #9007602 - Flags: review?(ehsan)
Attachment #9007563 - Attachment is obsolete: true
Attachment #9007563 - Flags: review?(ehsan)
Attachment #9007603 - Flags: review?(ehsan)
Attachment #9007564 - Attachment is obsolete: true
Attachment #9007564 - Flags: review?(ehsan)
Attachment #9007604 - Flags: review?(ehsan)
Attachment #9007565 - Attachment is obsolete: true
Attachment #9007565 - Flags: review?(ehsan)
Attachment #9007605 - Flags: review?(ehsan)
Attachment #9007566 - Attachment is obsolete: true
Attachment #9007566 - Flags: review?(ehsan)
Attachment #9007606 - Flags: review?(ehsan)
Attachment #9007567 - Attachment is obsolete: true
Attachment #9007567 - Flags: review?(ehsan)
Attachment #9007607 - Flags: review?(ehsan)
Attachment #9007568 - Attachment is obsolete: true
Attachment #9007568 - Flags: review?(ehsan)
Attachment #9007608 - Flags: review?(ehsan)
Attachment #9007569 - Attachment is obsolete: true
Attachment #9007569 - Flags: review?(ehsan)
Attachment #9007609 - Flags: review?(ehsan)
Attachment #9007571 - Attachment is obsolete: true
Attachment #9007571 - Flags: review?(ehsan)
Attachment #9007610 - Flags: review?(ehsan)
Attachment #9007574 - Attachment is obsolete: true
Attachment #9007574 - Flags: review?(ehsan)
Attachment #9007611 - Flags: review?(ehsan)
Attachment #9007575 - Attachment is obsolete: true
Attachment #9007575 - Flags: review?(ehsan)
Attachment #9007612 - Flags: review?(ehsan)
I don't see why this pref should be sticky.
Attachment #9007579 - Attachment is obsolete: true
Attachment #9007579 - Flags: review?(ehsan)
Attachment #9007613 - Flags: review?(ehsan)
Attachment #9007596 - Flags: review?(ehsan) → review+
Attachment #9007597 - Flags: review?(ehsan) → review+
Attachment #9007556 - Flags: review?(ehsan) → review+
Attachment #9007598 - Flags: review?(ehsan) → review+
Attachment #9007599 - Flags: review?(ehsan) → review+
Attachment #9007600 - Flags: review?(ehsan) → review+
Attachment #9007601 - Flags: review?(ehsan) → review+
Attachment #9007602 - Flags: review?(ehsan) → review+
Attachment #9007562 - Flags: review?(ehsan) → review+
Attachment #9007603 - Flags: review?(ehsan) → review+
Attachment #9007604 - Flags: review?(ehsan) → review+
Attachment #9007605 - Flags: review?(ehsan) → review+
Attachment #9007606 - Flags: review?(ehsan) → review+
Attachment #9007607 - Flags: review?(ehsan) → review+
Attachment #9007608 - Flags: review?(ehsan) → review+
Attachment #9007609 - Flags: review?(ehsan) → review+
Attachment #9007570 - Flags: review?(ehsan) → review+
Attachment #9007610 - Flags: review?(ehsan) → review+
Attachment #9007572 - Flags: review?(ehsan) → review+
Attachment #9007573 - Flags: review?(ehsan) → review+
Attachment #9007611 - Flags: review?(ehsan) → review+
Attachment #9007612 - Flags: review?(ehsan) → review+
Attachment #9007576 - Flags: review?(ehsan) → review+
Attachment #9007577 - Flags: review?(ehsan) → review+
Attachment #9007578 - Flags: review?(ehsan) → review+
Comment on attachment 9007613 [details] [diff] [review]
part 26 - browser_dom_window_dump_enabled

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

Please don't forget fixing the mistake below when landing!

::: modules/libpref/init/StaticPrefList.h
@@ +362,5 @@
>  
> +#ifdef MOZILLA_OFFICIAL
> +# define PREF_VALUE false
> +#else
> +# define PREF_VALUE false

true
Attachment #9007613 - Flags: review?(ehsan) → review+
Attachment #9007581 - Flags: review?(ehsan) → review+
Pushed by amarchesini@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/589772c6b052
Port DOMPrefs to StaticPrefs - part 1 - canvas_imagebitmap_extensions_enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/87f024490b34
Port DOMPrefs to StaticPrefs - part 2 - dom.caches.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/b94e1eb738f1
Port DOMPrefs to StaticPrefs - part 3 - dom.caches.testing.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/3a46ec274800
Port DOMPrefs to StaticPrefs - part 4 - dom.performance.enable_user_timing_logging, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/377121279020
Port DOMPrefs to StaticPrefs - part 5 - dom.webnotifications.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/b30b3c307822
Port DOMPrefs to StaticPrefs - part 6 - dom.webnotifications.serviceworker.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/937ab9053565
Port DOMPrefs to StaticPrefs - part 7 - dom.webnotifications.requireinteraction.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/0048f0e46b90
Port DOMPrefs to StaticPrefs - part 8 - dom.serviceWorkers.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/a9ecbbbd6400
Port DOMPrefs to StaticPrefs - part 9 - dom.serviceWorkers.testing.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/63618c3a43c5
Port DOMPrefs to StaticPrefs - part 10 - dom.storageManager.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/ea499874e44b
Port DOMPrefs to StaticPrefs - part 11 - dom.promise_rejection_events.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/db3870aa56f1
Port DOMPrefs to StaticPrefs - part 12 - dom.push.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/76b43cfad8fb
Port DOMPrefs to StaticPrefs - part 13 - dom.streams.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/c83792e6432e
Port DOMPrefs to StaticPrefs - part 14 - gfx.offscreencanvas.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/00b8d8e43988
Port DOMPrefs to StaticPrefs - part 15 - dom.webkitBlink.dirPicker.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/243b32892e21
Port DOMPrefs to StaticPrefs - part 16 - dom.netinfo.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/e3353251357e
Port DOMPrefs to StaticPrefs - part 17 - dom.fetchObserver.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/fd1b12a94fc9
Port DOMPrefs to StaticPrefs - part 18 - privacy.resistFingerprinting, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/c236c5795ee6
Port DOMPrefs to StaticPrefs - part 19 - privacy.resistFingerprinting.autoDeclineNoUserInputCanvasPrompts, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/7795b505153b
Port DOMPrefs to StaticPrefs - part 20 - devtools.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/868224db2728
Port DOMPrefs to StaticPrefs - part 21 - dom.enable_performance_observer, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/0af2e4b5ecfb
Port DOMPrefs to StaticPrefs - part 22 - dom.indexedDB.storageOption.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/2ae8ba9d4036
Port DOMPrefs to StaticPrefs - part 23 - dom.script_loader.binast_encoding.enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/f2ad5d5fab77
Port DOMPrefs to StaticPrefs - part 24 - dom_performance_enable_scheduler_timing, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/e7a1326ad53e
Port DOMPrefs to StaticPrefs - part 25 - Renaming macros, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/2d219572a965
Port DOMPrefs to StaticPrefs - part 26 - browser_dom_window_dump_enabled, r=ehsan
https://hg.mozilla.org/integration/mozilla-inbound/rev/b0bf04a1cbbf
Port DOMPrefs to StaticPrefs - part 27 - dom.worker.canceling.timeoutMilliseconds, r=ehsan
https://hg.mozilla.org/mozilla-central/rev/589772c6b052
https://hg.mozilla.org/mozilla-central/rev/87f024490b34
https://hg.mozilla.org/mozilla-central/rev/b94e1eb738f1
https://hg.mozilla.org/mozilla-central/rev/3a46ec274800
https://hg.mozilla.org/mozilla-central/rev/377121279020
https://hg.mozilla.org/mozilla-central/rev/b30b3c307822
https://hg.mozilla.org/mozilla-central/rev/937ab9053565
https://hg.mozilla.org/mozilla-central/rev/0048f0e46b90
https://hg.mozilla.org/mozilla-central/rev/a9ecbbbd6400
https://hg.mozilla.org/mozilla-central/rev/63618c3a43c5
https://hg.mozilla.org/mozilla-central/rev/ea499874e44b
https://hg.mozilla.org/mozilla-central/rev/db3870aa56f1
https://hg.mozilla.org/mozilla-central/rev/76b43cfad8fb
https://hg.mozilla.org/mozilla-central/rev/c83792e6432e
https://hg.mozilla.org/mozilla-central/rev/00b8d8e43988
https://hg.mozilla.org/mozilla-central/rev/243b32892e21
https://hg.mozilla.org/mozilla-central/rev/e3353251357e
https://hg.mozilla.org/mozilla-central/rev/fd1b12a94fc9
https://hg.mozilla.org/mozilla-central/rev/c236c5795ee6
https://hg.mozilla.org/mozilla-central/rev/7795b505153b
https://hg.mozilla.org/mozilla-central/rev/868224db2728
https://hg.mozilla.org/mozilla-central/rev/0af2e4b5ecfb
https://hg.mozilla.org/mozilla-central/rev/2ae8ba9d4036
https://hg.mozilla.org/mozilla-central/rev/f2ad5d5fab77
https://hg.mozilla.org/mozilla-central/rev/e7a1326ad53e
https://hg.mozilla.org/mozilla-central/rev/2d219572a965
https://hg.mozilla.org/mozilla-central/rev/b0bf04a1cbbf
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Depends on: 1490412
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: