Closed Bug 1928122 Opened 1 year ago Closed 1 year ago

Add setPrefValue in the JS shell

Categories

(Core :: JavaScript Engine, task, P3)

task

Tracking

()

RESOLVED FIXED
134 Branch
Tracking Status
firefox134 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

Details

Attachments

(1 file)

From talking with Christian, we're hoping to be able to do some differential testing of wasm lazy tiering/inlining and that requires runtime flipping of prefs. We have a getPrefValue, but no setPrefValue. I think it should be possible to support this in the JS shell.

Adds a setPrefValue that mirrors the getPrefValue function. It is only
available in the JS shell because the browser has its own way of setting
a pref.

I had to either define this builtin away from all the other JS pref functions
in js.cpp, or else move all the JS pref functions up in the file so this
builtin can be used in shell_functions. I chose to move them all up, but
I'm fine the other way.

I also renamed the functions from JSPref to just Pref to match the name of
the builtin, but again I can go the other way too.

Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/f92139bc6d0f Add setPrefValue to JS shell. r=jandem

Unrelated test got added to the commit when I was fixing a review comment.

Flags: needinfo?(rhunt)
Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/e865540c089e Add setPrefValue to JS shell. r=jandem
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 134 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: