Commit Graph
36 Commits
Author SHA1 Message Date
Nicolas Chevobbe adffa997c1 Bug 1698260 - [devtools] Fix autocomplete for Infinity. r=devtools-reviewers,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D204478
2024-03-15 05:59:56 +00:00
Nicolas Chevobbe 5a608228ab Bug 1872689 - [devtools] Prepare codebase for eslint-plugin-react update. r=devtools-reviewers,ochameau.
Updating eslint-plugin-react to 7.33.2 raises new eslint errors.
A few component needed to have their proptypes fixed (or added).
JSPropertyProvider was considered as a react component by the plugin,
I guess because it is a function starting with an uppercase letter.
Since it is a bit unusual to have such thing, I renamed it slightly
to make it look more like a function.

Differential Revision: https://phabricator.services.mozilla.com/D197596
2024-01-04 16:06:08 +00:00
Joel Maher cac31d18e3 Bug 1859873 - batch 13 xpcshell.ini -> .toml. r=aryx,devtools-reviewers,profiler-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194161
2023-11-21 12:32:50 +00:00
Nicolas Chevobbe 328e6ba0a9 Bug 1835680 - [devtools] Use proxy target when walking up prototype chain for autocomplete. r=devtools-reviewers,jdescottes.
In the JSPropertyProvider, we are walking up the prototype to retrieve properties.
For proxies with `getPrototypeOf` trap, this means that we were returning erroneous
values, as the prototype chain of the proxy isn't altered by the trap.
Worse, it could lead to infinite loop if the trap was setting a circular reference.

To avoid this, when dealing with a proxy, we retrieve the prototype of the proxy
target.

Test cases are added to ensure we don't regress this.

Differential Revision: https://phabricator.services.mozilla.com/D179640
2023-06-01 15:30:18 +00:00
Stanca Serban ebb32fa89e Backed out changeset 2f0f9d27fb0d (bug 1835680) for causing mochitests failures in test_jsterm_autocomplete.html. CLOSED TREE 2023-06-01 12:09:17 +03:00
Nicolas Chevobbe 73f79879ed Bug 1835680 - [devtools] Use proxy target when walking up prototype chain for autocomplete. r=devtools-reviewers,jdescottes.
In the JSPropertyProvider, we are walking up the prototype to retrieve properties.
For proxies with `getPrototypeOf` trap, this means that we were returning erroneous
values, as the prototype chain of the proxy isn't altered by the trap.
Worse, it could lead to infinite loop if the trap was setting a circular reference.

To avoid this, when dealing with a proxy, we retrieve the prototype of the proxy
target.

Test cases are added to ensure we don't regress this.

Differential Revision: https://phabricator.services.mozilla.com/D179640
2023-06-01 08:38:35 +00:00
Julian Descottes d5638c413b Bug 1788777 - [devtools] Group all network-observer related modules in a single folder r=ochameau,Sasha
This patch is only moving all network observer files in the same folder.
For webdriver reviewers, we could update our phabricator herald rule to be added as reviewers for changes in this folder?

Differential Revision: https://phabricator.services.mozilla.com/D160241
2022-11-08 20:27:50 +00:00
Julian Descottes d947f89f30 Bug 1788762 - Migrate devtools network observer to an ES module r=ochameau
This is a very basic migration from commonjs modules to ESM for all modules related to network observation.
A few classes have been introduced instead of prototype-based classes, but otherwise the code remains mostly untouched.

We can followup to introduce private fields and methods if there's interest?

Differential Revision: https://phabricator.services.mozilla.com/D156968
2022-10-17 19:56:18 +00:00
Alexandre Poirot bde84f5b65 Bug 1793604 - [devtools] Convert Loader.jsm to ESM. r=perftest-reviewers,geckoview-reviewers,preferences-reviewers,owlish,kshampur,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D158582
2022-10-14 12:19:42 +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
Alexandre Poirot a3b72117bf Bug 1793575 - [devtools] Convert jsdebugger.jsm to jsdebugger.sys.mjs. r=Honza,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D158571
2022-10-06 14:21:22 +00:00
Ted Campbell 7eb7d39c99 Bug 1790912 - Use globalThis instead of this with jsdebugger.jsm. r=jandem,ochameau
Use 'globalThis' instead of 'this' when trying to attach a debugger to the
current global to avoid subtle footguns with the varied definitions of 'this'.
The debugger interface needs a true GlobalObject so this is much clearer. In
particular, this is a problem in test_nativewrappers.js when the test runs in
strict mode since the 'this' in the test function is no long implicitly the
global.

Differential Revision: https://phabricator.services.mozilla.com/D157544
2022-09-25 09:03:33 +00:00
Alexandre Poirot 0f32f335e3 Bug 1789201 - [devtools] Expose Services as a global to all DevTools modules. r=perftest-reviewers,nchevobbe,julienw,AlexandruIonescu
This will help transition to ES Modules as this symbol is exposed to them.

$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests

Differential Revision: https://phabricator.services.mozilla.com/D156401
2022-09-09 07:22:51 +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
Dana Keeler bcf86d718f Bug 1608307 - remove redundant flags parameters from nsISiteSecurityService r=jschanck,necko-reviewers,kershaw
Before this patch, nsISiteSecurityService APIs took "flags" parameters that
differentiated private contexts from not private contexts. However, these
parameters were redundant with respect to origin attributes, which led to some
confusion for consumers of these APIs. This patch removes these parameters in
favor of using origin attributes.

Differential Revision: https://phabricator.services.mozilla.com/D142901
2022-04-06 17:37:23 +00:00
Julian Descottes 06eecdcdcf Bug 1741369 - [devtools] Import devtools require in head.js for some xpcshell test suites r=ochameau
Depends on D131218

Differential Revision: https://phabricator.services.mozilla.com/D131329
2021-11-17 12:43:27 +00:00
Julian Descottes 06b42b006a Bug 1741369 - [devtools] Update paths to loader files in devtools/ r=ochameau
Depends on D131216

Differential Revision: https://phabricator.services.mozilla.com/D131217
2021-11-17 12:43:26 +00:00
wartmanm 4ac01f9a1a Bug 1658238 - Autocomplete source-mapped variable names r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D87117
2021-10-19 11:40:09 +00:00
Tom Ritter d0bad1e4d0 Bug 1723204: Update tests to prevent crashes r=ckerschb,jdescottes,robwu
This is most commonly as a result of CU.evalInSandbox which
allows an arbitrary filename but when omitted will default
to the filename of the test, which is a filesystem path
and thus is disallowed.

Differential Revision: https://phabricator.services.mozilla.com/D122246
2021-08-24 14:57:44 +00:00
Brindusan Cristian e7884e8ff1 Backed out 4 changesets (bug 1724220, bug 1723204) for causing cpp non-unified bustages in TestSmartCrashTrimmer.cpp.
CLOSED TREE

Backed out changeset 0dab9553a2a8 (bug 1724220)
Backed out changeset df236c937895 (bug 1723204)
Backed out changeset 4a20d1832cf4 (bug 1723204)
Backed out changeset d7e4042af76c (bug 1723204)
2021-08-24 15:33:32 +03:00
Tom Ritter 08be7d3ceb Bug 1723204: Update tests to prevent crashes r=ckerschb,jdescottes,robwu
This is most commonly as a result of CU.evalInSandbox which
allows an arbitrary filename but when omitted will default
to the filename of the test, which is a filesystem path
and thus is disallowed.

Differential Revision: https://phabricator.services.mozilla.com/D122246
2021-08-24 11:20:44 +00:00
Dana Keeler b58a544f0e Bug 1712983 - memoize decoded certificates in devtools to avoid unnecessary work r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D118555
2021-07-19 20:15:49 +00:00
Dana Keeler fbb74a1e99 Bug 1688703 - reuse certviewer utility files in devtools r=johannh,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D106340
2021-04-21 17:48:21 +00:00
Brindusan Cristian 314bcd62ac Backed out changeset 7c3c130fc7df (bug 1688703) for bc leaks. CLOSED TREE 2021-03-20 03:59:04 +02:00
Dana Keeler 2ad22e8127 Bug 1688703 - reuse certviewer utility files in devtools r=johannh,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D106340
2021-03-19 21:44:16 +00:00
Kaique da Silva ed87229163 Bug 1681897 - [devtools] Implemented the defer on test r=Honza
Differential Revision: https://phabricator.services.mozilla.com/D100588
2021-01-04 11:17:18 +00:00
Nicolas Chevobbe 127eee3955 Bug 1680684 - [devtools] Fix handling of escaped characters for console autocomplete. r=bomsy.
The analyzeInputString function tried to handle escape characters in strings,
by having a dedicated ESCAPE state.
Unfortunately, when in ESCAPE state, the code will always re-assign the NORMAL state.
So if at some point the string was terminated, the code would assume we were entering
a string state again.
In the end, this would cause the autocomplete to fail, because the JSPropertyProvider
would think that it was passed an unterminated string literal.
This is fixed by introducing quote-specific escape state, so we know which state to get
back in once the escape character is consumed.

A few test cases are added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D98754
2020-12-08 16:31:27 +00:00
Kage a5572a4b1c Bug 1633511 Added tests. r=bomsy
Differential Revision: https://phabricator.services.mozilla.com/D74234
2020-05-08 16:18:15 +00:00
Aman Verma ec1d69a20a Bug 1616306 - Merge splitInputAtLastPropertyAccess into analyzeInputString, r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D63917
2020-03-18 10:43:34 +00:00
Ed Lee 361cbdb4a5 Bug 1620556 - Automatic code fixes for Prettier 1.19.1 upgrade. r=Standard8,remote-protocol-reviewers,marionette-reviewers,webcompat-reviewers,perftest-reviewers,sparky,whimboo,denschub
Differential Revision: https://phabricator.services.mozilla.com/D66128
2020-03-13 23:38:52 +00:00
Mark Banner d375cfec54 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D65703
2020-03-07 10:09:44 +00:00
Nicolas Chevobbe 75dec20673 Bug 1614914 - Fix TypeError in JsPropertyProvider for debugger keyword. r=Honza.
A check is added, as well as a test to ensure everything
is okay.

Differential Revision: https://phabricator.services.mozilla.com/D62599
2020-02-13 10:58:52 +00:00
Nicolas Chevobbe c28309643e Bug 1594009 - Add optional chaining support for console autocomplete. r=Honza.
The JsPropertyProvider parser is modified to accept optional chaining
syntax.

Differential Revision: https://phabricator.services.mozilla.com/D60654
2020-02-11 14:29:09 +00:00
Alexandre Poirot e4582cd9a0 Bug 1609716 - Unify xpcshell test folders in devtools. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D60160
2020-01-20 13:56:04 +00:00
Cosmin Sabou eb2d2dd49c Backed out changeset ccd058375096 (bug 1609716) for devtools failures on browser_device_custom_remove. CLOSED TREE 2020-01-20 18:11:34 +02:00
Alexandre Poirot f2e7460a19 Bug 1609716 - Unify xpcshell test folders in devtools. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D60160
2020-01-20 13:56:04 +00:00