Closed Bug 1605854 Opened 5 years ago Closed 5 years ago

Fix some Firefox tests that use uneval/toSource

Categories

(Core :: JavaScript Engine, task, P2)

task

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: evilpie, Assigned: evilpie)

References

Details

Attachments

(10 files)

We want to disable uneval and Object.prototype.toSource code. To start we only plan on disabling both functions for non-chrome/content scripts, so I am only fixing those tests here.

Assignee: nobody → evilpies

I am making good progress getting linux64 green. Fixing js/xpconnect/tests/chrome/test_xrayToJS.xhtml is going to be a bit of work, because it uses toSource quite a bit. I am not sure yet what is causing the failure in devtools/client/dom/test/browser_dom_array.js, but it must be somewhere in the devtools code outside the test.

83 files changed, 290 insertions(+), 291 deletions(-)

Priority: -- → P2

For test browser_net_prefs-reload.js, I am not sure about this change firstValue/currentValue seems to be different types numbers, strings, objects.
toString is maybe not the best way to compare those values.

Keywords: leave-open
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/e2341c647b1a Remove uneval/toSource from WebExtension tests. r=zombie
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/6e2cc12a8428 Fix JS test that uses toSource unconditionally r=jandem
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/a1487e1518de Remove uneval/toSource from devtools tests. r=jlast
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/dc16892ca752 Remove uneval/toSource from devtools tests. r=jlast
Flags: needinfo?(evilpies)

I am not sure we should really remove toSource from Codegen.py, but I wanted to make sure to follow the test comment.

Using JSON.stringify in dom/tests/mochitest/chrome/test_clonewrapper.xhtml might not be the best solution, because
the testObject contains ImageData objects.

Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ceab48d53ff1 Remove toSource from indexedDB tests r=dom-workers-and-storage-reviewers,asuth

Because toSource is available to chrome code, we need to adjust some parts where toSource is missing because of content contexts.
We can remove most these changes when we remove toSource everywhere.

Regressions: 1607001
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/cb045f399867 Remove toSource from ServiceWorker tests. r=baku
Attachment #9118610 - Attachment description: Bug 1605854 - Fix xrayToJS test to work with conditional toSource. r?bzbarsky → Bug 1605854 - Fix xrayToJS test to work with conditional toSource. r?bzbarsky
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/0845f6adc577 Fix xrayToJS test to work with conditional toSource. r=bzbarsky
No longer regressions: 1607001
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/20ee58e41fa4 Remove uneval/toSource from DOM tests. r=smaug
Regressions: 1607233
Regressions: 1607348
No longer regressions: 1607348
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ea16475d26ba Remove uneval/toSource from CORS tests. r=baku
Keywords: leave-open
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/6942ba9ec310 Remove toSource from fission tests. r=kmag,botond
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/a905ce83ffdb Fix remaining tests using uneval/toSource r=mccr8,bzbarsky
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/1856b9f3a157 Remove uneval/toSource from CORS tests. r=baku

I replaced a single use of toSource with JSON.stringify in test_fetch_cors_sw_reroute.html.

Flags: needinfo?(evilpies)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: