Implement about:config pref for SAB+Atomics and code to manipulate the JS engine in response to changes

RESOLVED FIXED in Firefox 46

Status

()

defect
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: lth, Assigned: lth)

Tracking

(Blocks 1 bug)

unspecified
mozilla46
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox46 fixed)

Details

Attachments

(4 attachments)

See bug 1231335.  We need a suitable about:config name, it needs to be added to whatever holds those names, and when the value changes we need to call the new JS engine API to change the state of that pref.

(JS engine is not the right category for this bug.)
See ReloadPrefsCallback() in js/xpconnect/src/XPCJSRuntime.cpp, for one thing.
The name shall be "javascript.options.shared-memory".
Or rather "javascript.options.shared_memory", according to the culture.
Connect a new about:config flag to the JS engine.  See bug 1231335 for the engine functionality.
Attachment #8702493 - Flags: review?(mrbkap)
Assignee: nobody → lhansen
Status: NEW → ASSIGNED
Enable shared memory functionality in dedicated workers (only).
Attachment #8702494 - Flags: review?(khuey)
Add a new option "javascript.options.shared_memory".
Attachment #8702495 - Flags: review?(benjamin)
Attachment #8702493 - Flags: review?(mrbkap) → review+
Comment on attachment 8702494 [details] [diff] [review]
bug1231337-part2-workers.patch

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

I assume it's expected that only new globals will be affected by a change in the preference, and not existing ones?

I also assume you actually do want this only for dedicated workers?
Attachment #8702494 - Flags: review?(khuey) → review+
(In reply to Kyle Huey [:khuey] (khuey@mozilla.com) from comment #8)
> Comment on attachment 8702494 [details] [diff] [review]
> bug1231337-part2-workers.patch
> 
> Review of attachment 8702494 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I assume it's expected that only new globals will be affected by a change in
> the preference, and not existing ones?
> 
> I also assume you actually do want this only for dedicated workers?

Yes and yes.
Attachment #8702495 - Flags: review?(benjamin) → review?(jmuizelaar)
Comment on attachment 8702495 [details] [diff] [review]
bug1231337-part3-about_config.patch

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

The only reason I come up as suggested reviewer for about:config is that I've reviewed a lot of graphics pref changes/additions. However, this seems fine. You should send an email to dev-platform letting people know that this is being turned on in Nightly only.
Attachment #8702495 - Flags: review?(jmuizelaar) → review+
A companion change to the one you reviewed previously, fallout from Waldo's refactoring of the compartment settings.
Attachment #8704644 - Flags: review?(mrbkap)
Attachment #8704644 - Flags: review?(mrbkap) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/fc166d042b6f39f91f613fb59ac51e7f7ba9482d
Bug 1231337 - part 1, hook SAB+Atomics runtime enablement into xpconnect. r=mrbkap

https://hg.mozilla.org/integration/mozilla-inbound/rev/4356bac66a3e5017a38e885028fff7620db84311
Bug 1231337 - part 2, conditionally enable shared memory for dedicated workers. r=khuey

https://hg.mozilla.org/integration/mozilla-inbound/rev/52655e7005b6b224522cdd61c3e47094d0745871
Bug 1231337 - part 3, add javascript.options.shared_memory to about:config. r=jmuizelaar

https://hg.mozilla.org/integration/mozilla-inbound/rev/6346790559d1a5de9bd0632a6b009bd2f691e290
Bug 1231337 - part 4, conditionally enable shared memory for ipc testshell. r=mrbkap
Jukka, with this change it will (eventually) be possible to enable shared memory on Aurora, DevEd, Beta, and Release by flipping javascript.options.shared_memory to true.  The feature will still be enabled by default on Nightly.

(Will announce this to dev-platform as soon as I know the patch has stuck.)
Flags: needinfo?(jujjyl)
Thanks Lars for the heads up, this is superb!
Flags: needinfo?(jujjyl)
You need to log in before you can comment on or make changes to this bug.