Commit Graph
42 Commits
Author SHA1 Message Date
Daniel Minor 33f8aa3859 Bug 1896390 - Add getter for Iterator.constructor to eager-ecma-allowlist.js; r=nchevobbe,devtools-reviewers,arai
Differential Revision: https://phabricator.services.mozilla.com/D218124
2024-08-07 03:47:53 +00:00
Tooru Fujisawa baeed2172d Bug 1881359 - Part 2: Use DebuggerObject.prototype.isSameNativeWithJitInfo in eager evaluation to support methods with GenericMethod native function. r=nchevobbe,devtools-reviewers
This reverts a part of bug Bug 1815381 change.

Differential Revision: https://phabricator.services.mozilla.com/D203058
2024-03-01 12:37:39 +00:00
Alexandre Poirot 2f676c75ba Bug 1876297 - [devtools] Only force overiding local scope variables for frontend commands relying on console commands. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
We should probably expose new RDP methods to prevent relying on console evaluations for this.
We would still have some potential issues if the evaluated method is about a JS symbol
whose name is the console command.

Differential Revision: https://phabricator.services.mozilla.com/D200167
2024-02-02 12:41:00 +00:00
Tom Marble 6c1231e2e8 Bug 1853244 - convert .ini manifests to .toml: batch 6 {caps,devtools,dom}/**/browser.ini r=jmaher,media-playback-reviewers,devtools-reviewers,profiler-reviewers,alwu,nchevobbe,canaltinova
Differential Revision: https://phabricator.services.mozilla.com/D188856
2023-09-22 20:42:14 +00:00
Alexandre Poirot 70f3c31950 Bug 1835629 - [devtools] Prevent pausing and showing source of any internal devtools evaluation. r=devtools-reviewers,devtools-backward-compat-reviewers,nchevobbe
This aligns all features in DevTools frontend currently evaluating some JavaScript code:
console input, eager evaluation, watch expression, log breakpoint, conditional breakpoint, inline preview, preview tooltips,
console "store as global", inspector "store as temp variable", DOM panel "window" retrieval,...

Except the console evaluation input, none of the many features evaluating code should:
* trigger any type of breakpoint via the evaluated code,
* evaluated sources should not be shown in the debugger.

This has been done by adding a `disableBreaks` argument to the web console actor evaluation method.
This mimic CDP's existing argument and disable trigerring any type of breakpoint,
while also avoiding instantiating Debugger.Source for the evaluated source.

Differential Revision: https://phabricator.services.mozilla.com/D180094
2023-06-29 19:41:46 +00:00
Tim Chevalier f71c412cf6 Bug 1811057 - Ship Change Array by Copy Feature r=mgaudet,devtools-reviewers,peterv CLOSED TREE
Set the `--enable-change-array-by-copy` shell flag and the
`javascript.options.experimental.enable_change_array_by_copy` pref to true
by default in all builds.

Remove the `--enable-change-array-by-copy` build flag from `js/moz.configure`
and make all code previously guarded by `#ifdef ENABLE_CHANGE_ARRAY_BY_COPY`
compile unconditionally.

Remove `change-array-by-copy` from testing build configurations (non262
and jit-test tests are no longer guarded with
`getBuildConfiguration()['change-array-by-copy']`

Remove all code from test config files that sets
`javascript.options.experimental.enable_change_array_by_copy`; only
`StaticPrefList.yaml` should set this pref.

Fix non262 unscopables test that apparently wasn't running before to use
the correct names for change-array-by-copy methods

Remove the `TypedArray` property from `gPrototypeProperties` in
`test_xrayToJS.xhtml`, as this property was written but never read.

Differential Revision: https://phabricator.services.mozilla.com/D174699
2023-05-25 21:25:13 +00:00
Cristian Tuns 759b8d3a4b Backed out changeset f49b182be8f3 (bug 1811057) for causing conflicts with merge back, will reland. 2023-05-25 20:34:44 -04:00
Tim Chevalier 6692280097 Bug 1811057 - Ship Change Array by Copy Feature r=mgaudet,devtools-reviewers,peterv
Set the `--enable-change-array-by-copy` shell flag and the
`javascript.options.experimental.enable_change_array_by_copy` pref to true
by default in all builds.

Remove the `--enable-change-array-by-copy` build flag from `js/moz.configure`
and make all code previously guarded by `#ifdef ENABLE_CHANGE_ARRAY_BY_COPY`
compile unconditionally.

Remove `change-array-by-copy` from testing build configurations (non262
and jit-test tests are no longer guarded with
`getBuildConfiguration()['change-array-by-copy']`

Remove all code from test config files that sets
`javascript.options.experimental.enable_change_array_by_copy`; only
`StaticPrefList.yaml` should set this pref.

Fix non262 unscopables test that apparently wasn't running before to use
the correct names for change-array-by-copy methods

Remove the `TypedArray` property from `gPrototypeProperties` in
`test_xrayToJS.xhtml`, as this property was written but never read.

Differential Revision: https://phabricator.services.mozilla.com/D174699
2023-05-25 21:25:13 +00:00
Sandor Molnar 85d269acf7 Backed out changeset cb6db65172c6 (bug 1811057) for causing browser-time failures. CLOSED TREE 2023-05-24 09:14:11 +03:00
Tim Chevalier 7a47f1452f Bug 1811057 - Ship Change Array by Copy Feature r=mgaudet,devtools-reviewers,peterv
Set the `--enable-change-array-by-copy` shell flag and the
`javascript.options.experimental.enable_change_array_by_copy` pref to true
by default in all builds.

Remove the `--enable-change-array-by-copy` build flag from `js/moz.configure`
and make all code previously guarded by `#ifdef ENABLE_CHANGE_ARRAY_BY_COPY`
compile unconditionally.

Remove `change-array-by-copy` from testing build configurations (non262
and jit-test tests are no longer guarded with
`getBuildConfiguration()['change-array-by-copy']`

Remove all code from test config files that sets
`javascript.options.experimental.enable_change_array_by_copy`; only
`StaticPrefList.yaml` should set this pref.

Fix non262 unscopables test that apparently wasn't running before to use
the correct names for change-array-by-copy methods

Remove the `TypedArray` property from `gPrototypeProperties` in
`test_xrayToJS.xhtml`, as this property was written but never read.

Differential Revision: https://phabricator.services.mozilla.com/D174699
2023-05-23 22:01:18 +00:00
Mark Banner 91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Tooru Fujisawa 216d567fc2 Bug 1815381 - Part 4: Add tests with random native getters. r=nchevobbe,devtools-reviewers,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D175092
2023-05-12 06:21:41 +00:00
Tooru Fujisawa 627f6ac339 Bug 1815381 - Part 1: Use DebuggerObject.prototype.isNativeGetterWithJitInfo in eager evaluation. r=nchevobbe,devtools-reviewers,ochameau
Treat all DOM getters eagerly-evaluateable.
Also rename `nativeHasNoSideEffects` to `nativeIsEagerlyEvaluateable`, given
the function does not guarantee purely no-side-effect, but simply guarantee
it's eagerly evaluateable, which has no notable side effect.

This does not require the preparation for explicit allowlist, and this is
available also in worker.

Differential Revision: https://phabricator.services.mozilla.com/D175089
2023-05-12 06:21:41 +00:00
Tooru Fujisawa 636cec5820 Bug 1827310 - Part 4: Add Intl.Locale.prototype.* getters to eager evaluation allowlist. r=nchevobbe,devtools-reviewers
Depends on D175084

Differential Revision: https://phabricator.services.mozilla.com/D175085
2023-04-14 00:18:12 +00:00
Tooru Fujisawa 01ee798150 Bug 1827310 - Part 3: Add RegExp static properties to eager evaluation allowlist. r=nchevobbe,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D175084
2023-04-14 00:18:12 +00:00
Tooru Fujisawa d0a78c8128 Bug 1827310 - Part 2: Add Function.prototype.{arguments,caller} to eager evaluation allowlist. r=nchevobbe,devtools-reviewers
Depends on D175082

Differential Revision: https://phabricator.services.mozilla.com/D175083
2023-04-14 00:18:11 +00:00
Tooru Fujisawa 7e9bd05a96 Bug 1827310 - Part 1: Add Error.prototype.stack to eager evaluation allowlist. r=nchevobbe,devtools-reviewers
Depends on D175081

Differential Revision: https://phabricator.services.mozilla.com/D175082
2023-04-14 00:18:11 +00:00
Nicolas Chevobbe 471e2f2383 Bug 1815903 - [devtools] Allow eager evaluation of change array by copy methods. r=arai.
Differential Revision: https://phabricator.services.mozilla.com/D169454
2023-02-13 08:00:22 +00:00
Tooru Fujisawa f1a6d08a15 Bug 1815152 - Treat await inside async function effectful in eager evaluation. r=jandem,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D169307
2023-02-10 11:20:20 +00:00
Tooru Fujisawa 4534dfc9c6 Bug 1815689 - Test window.scheduler.constructor.name only when available. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D169281
2023-02-09 06:01:22 +00:00
Tooru Fujisawa 3181141ef0 Bug 1806598 - Part 8: Add testcases. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168342
2023-02-07 07:36:17 +00:00
Sandor Molnar 190b92321c Backed out 11 changesets (bug 1806598, bug 1812905, bug 1812540) for causing dt failures in devtools/client/webconsole/test/browser/browser_console_evaluation_context_selector.js CLOSED TREE
Backed out changeset 3b0e28b20def (bug 1812540)
Backed out changeset 810ed5832764 (bug 1812540)
Backed out changeset 9e042da8472f (bug 1806598)
Backed out changeset ab04e3122f20 (bug 1806598)
Backed out changeset f97c01add0a5 (bug 1806598)
Backed out changeset de9d04dc5014 (bug 1806598)
Backed out changeset 3808fc5bf528 (bug 1806598)
Backed out changeset 9be2509e8540 (bug 1806598)
Backed out changeset 3fc6c5d9d620 (bug 1806598)
Backed out changeset 297a91be123b (bug 1806598)
Backed out changeset 24cc5069faf3 (bug 1812905)
2023-02-06 07:19:51 +02:00
Tooru Fujisawa 918a315b7e Bug 1806598 - Part 8: Add testcases. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D168342
2023-02-06 03:42:37 +00:00
Mark Banner b3474f4614 Bug 1812977 - Remove now unnecessary import-globals-from statements in devtools. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D168071
2023-01-30 19:33:38 +00:00
Nicolas Chevobbe 02aa0ddba0 Bug 1807107 - [devtools] Handle SpreadExpression in parseErrorOutput. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D166101
2023-01-06 14:37:52 +00:00
Iulian Moraru 6ee9bf5d4d Backed out changeset 0f93af740dc0 (bug 1807107) for causing dt failures on browser_jsterm_autocomplete_null.js related to Expression. CLOSED TREE 2023-01-06 11:09:01 +02:00
Nicolas Chevobbe 72f467800d Bug 1807107 - [devtools] Handle SpreadExpression in parseErrorOutput. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D166101
2023-01-06 07:59:58 +00:00
Tooru Fujisawa 4a61ce1a54 Bug 1797736 - Part 3: Add testcase for eager evaluation with InitAliasedLexical with hops == 0. r=nchevobbe
Depends on D161018

Differential Revision: https://phabricator.services.mozilla.com/D161019
2022-12-13 09:41:47 +00:00
Alexandre Poirot 07e6ce0083 Bug 1792848 - [devtools] Use absolute URLs to import modules in devtools/shared. r=Honza,devtools-backward-compat-reviewers,bomsy
Differential Revision: https://phabricator.services.mozilla.com/D158643
2022-10-12 15:56:22 +00:00
Tooru Fujisawa b9b1e67bd7 Bug 1781061 - Part 10: Add eager evaluation test for reused iterator. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D153450
2022-08-04 06:41:18 +00:00
Tooru Fujisawa 2e6e2e36be Bug 1781061 - Part 9: Add eager evaluation test for crafted iterable. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D153162
2022-08-04 06:41:18 +00:00
Mark Banner 6d03c63e2d Bug 1330099 - Enable object-shorthand eslint rule. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D153567
2022-08-03 14:57:05 +00:00
Mark Banner 1e3410cbdd Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Tooru Fujisawa ab67d108c4 Bug 1732543 - Part 2: Add eager evaluation testcase. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D152350
2022-07-26 02:37:51 +00:00
Tooru Fujisawa d20fe5c479 Bug 1609432 - Part 6: Add eager evaluation testcase. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D152348
2022-07-26 02:37:51 +00:00
Alexandre Poirot 19baca5a9b Bug 1571708 - [devtools] Inline WebConsoleUI.getWebconsoleFront into autocomplete code. r=jdescottes
This was the only callsite.
I also aligned to what was done in ScriptCommand.execute, which is the reference.

Differential Revision: https://phabricator.services.mozilla.com/D143040
2022-04-11 11:07:56 +00:00
Nicolas Chevobbe 615c42c826 Bug 1730148 - [devtools] Handle onTargetSelected in DOM panel. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D130332
2021-11-10 14:51:05 +00:00
Cristian Tuns f0b1f0f677 Backed out 5 changesets (bug 1738915, bug 1739061, bug 1730148) for causing mochitest failures on browser_resources_document_events.js CLOSED TREE DONTBUILD
Backed out changeset 24c1a120bb77 (bug 1739061)
Backed out changeset eb9953fd3252 (bug 1738915)
Backed out changeset 9bd72db885eb (bug 1730148)
Backed out changeset 819078e24fa6 (bug 1730148)
Backed out changeset a0e706688adc (bug 1730148)
2021-11-10 07:07:57 -05:00
Nicolas Chevobbe 1c6908d31f Bug 1730148 - [devtools] Handle onTargetSelected in DOM panel. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D130332
2021-11-10 10:44:51 +00:00
Nicolas Chevobbe 1478b6d44d Bug 1719160 - [devtools] Fix checkValue commands test helper. r=jdescottes.
We weren't checking properly undefined value, which was hiding issues in
some tests.
The helpers are fixed and a few test modified to make them pass.

Differential Revision: https://phabricator.services.mozilla.com/D119096
2021-07-06 05:03:47 +00:00
Nicolas Chevobbe 47081cbc29 Bug 1712739 - [devtools] Fold custom WebConsoleFront#evaluateJSAsync method into scriptCommand#execute. r=ochameau.
Tests that were using `evaluateJSAsync` are updated, either by using the new command,
or by awaiting for the `evaluationResult` event.
A couple chrome tests were moved to devtools/shared/commands/js/tests/ and turned
into browser tests, and some of them were completely removed as we tested the
features in mochitests as well.

Differential Revision: https://phabricator.services.mozilla.com/D116248
2021-06-02 13:15:06 +00:00
Nicolas Chevobbe 51ae13fc7b Bug 1712739 - [devtools] Add a script command with an execute method. r=jdescottes.
This method is meant to replace the direct usage
of webconsoleFront.evaluateJSAsync.
The WebConsoleCommands file is removed, and all
client calls to evaluateJSAsync are migrated to
the new method. Callsites are simplified when
possible, and some test are refactored to switch
to spawned task to retrieve content page information.

Differential Revision: https://phabricator.services.mozilla.com/D116242
2021-06-02 13:15:06 +00:00