Commit Graph

91 Commits

Author SHA1 Message Date
Julian Descottes
03cdcd7b0a Bug 1593921 - Use eslint-disable-next-line to disable complexity checks in DevTools r=pbro
Using next-line is less error prone for refactorings than wrapping methods with enable/disable blocks.

Differential Revision: https://phabricator.services.mozilla.com/D51782
2019-11-05 14:29:04 +00:00
Nicolas Chevobbe
26e426cf26 Bug 1592550 - Allow saveAs util function to be passed an array of filters. r=Honza.
A new parameter is added, and it expect an array
of filter objects (which contain a pattern and
a label properties), which are going to be used
by the save file dialog.

Depends on D51070

Differential Revision: https://phabricator.services.mozilla.com/D51078
2019-11-01 09:26:18 +00:00
Brian Hackett
9681436950 Bug 1581418 - Include more properties when logging objects, r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D45961
2019-09-16 22:48:15 +00:00
Mihai Alexandru Michis
6f60ffd32e Backed out changeset ece44b8f51e4 (bug 1581418) for causing xpcshell failures. 2019-09-17 06:17:05 +03:00
Brian Hackett
1c379ffddb Bug 1581418 - Include more properties when logging objects, r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D45961
2019-09-16 22:48:15 +00:00
Daisuke Akatsuka
d07b98214f Bug 1572933: Introduce an attribute to raise the cache priority. r=pbro,mayhemer
For now, when we turn on `disable cache` switch in DevTools[1], web page loads
the contents without using the cache. Furthermore, DevTools as well comes to
load the contents DevTools inspects without using the cache. And, if the loaded
contents from the web page and DevTools was different, becomes impossible to
inspect the content correctly.
Thus, in order to make DevTools refer the same content the web page loaded,
makes DevTools load the contents inspecting from the cache at first, no matter
if disables the switch or not.

When turns on disable cache in DevTools, `LOAD_BYPASS_CACHE` flag is set into
`loadFlags` in the `docshell`.[2] The other hand, the content DevTools inspects
is loaded from a channel DevTools creates with `LOAD_FROM_CACHE` flag.[3]
However, because this channel is belong to same `loadGroup` of the `docshell`,
`LOAD_BYPASS_CACHE` is inherited and is choosen even if `LOAD_FROM_CACHE` is set.
Thus, in this patch, we introduce an attribute `preferCacheLoadOverBypass`
which raises the priority for `LOAD_FROM_CACHE` above `LOAD_BYPASS_CACHE` and
`LOAD_BYPASS_LOCAL_CACHE`.

[1] https://developer.mozilla.org/en-US/docs/Tools/Settings#Advanced_settings
[2] https://searchfox.org/mozilla-central/source/devtools/server/actors/targets/browsing-context.js#1227
[3] https://searchfox.org/mozilla-central/source/devtools/shared/DevToolsUtils.js#542-544

Differential Revision: https://phabricator.services.mozilla.com/D44626
2019-09-09 00:57:05 +00:00
Brian Hackett
7f05f2e657 Bug 1572596 Part 3 - Resurrect any sources missing from the debuggee source URLs when attaching the debugger, r=loganfsmyth.
Depends on D41683

Differential Revision: https://phabricator.services.mozilla.com/D41684
2019-08-22 00:12:56 +00:00
Gijs Kruitbosch
3614343935 Bug 1571342 - unify save paths for console and netmonitor and fix the latter to not do docshell loads, r=Honza,nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D41858
2019-08-16 11:13:24 +00:00
Oriol Brufau
ab7fb91fef Bug 1544175 - Prevent devtools from accessing CPOWs. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D38803
2019-07-29 22:16:49 +00:00
Alexandre Poirot
4cc4a20117 Bug 1543023 - Use ChromeUtils.import only with one argument in all /devtools/ r=jdescottes
ChromeUtils.import still support a second argument as it used to do
when it was Components.utils.import. But this is deprecated and we should
instead always use the returned value.

Differential Revision: https://phabricator.services.mozilla.com/D37708
2019-07-11 17:08:20 +00:00
Jonathan Kingston
32524b62e2 Bug 1560455 - rename CodebasePrincipal to ContentPrincipal. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D35504
2019-07-08 16:37:45 +00:00
Victor Porof
435f7b056d Bug 1561435 - Format remaining devtools/, a=automatic-formatting, CLOSED TREE
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35894
2019-07-05 11:29:32 +02:00
Jefry Lagrange
ead0aa8e6c Bug 1517728 - Export Console content to file. .
Add a context menu entry to export the console output to a file.
We group the 2 export entries into a submenu.

Differential Revision: https://phabricator.services.mozilla.com/D22158
2019-06-28 08:28:53 +00:00
Brian Hackett
342b6cb26e Bug 1544170 Part 4 - Don't infinitely recurse in newChannelForURL on failure, r=loganfsmyth.
Differential Revision: https://phabricator.services.mozilla.com/D27411
2019-04-12 16:37:00 -10:00
Andreea Pavel
e340ca7708 Merge mozilla-inbound to mozilla-central. a=merge 2019-04-19 00:36:23 +03:00
Julian Descottes
6356118d38 Bug 1544749 - Add shared helper to retrieve the top window r=bgrins
Some classes in DevTools will not have an easy way to get access to the toolbox.
However they might still want to use the topmost chrome window.
Extract the logic from toolbox.js to a shared helper.

Differential Revision: https://phabricator.services.mozilla.com/D27672
2019-04-18 09:06:32 +00:00
Brian Hackett
d24792ca12 Bug 1533202 Part 2 - Enumerate WeakMap/WeakSet entries in workers, r=loganfsmyth.
Differential Revision: https://phabricator.services.mozilla.com/D27610
2019-04-15 12:05:38 -10:00
sakshaat
8b67bd2a1d Bug 1517483 - Get rid of nsIScriptSecurityManager::IsSystemPrincipal r=bzbarsky
Replaced instances of callers in both C++ and JS files to query the state from the principal directly.

Differential Revision: https://phabricator.services.mozilla.com/D22532
2019-03-24 20:36:25 +00:00
Brian Hackett
3e0acf8334 Bug 1522244 - Fix previewing in worker threads for several builtin classes, r=lsmyth. 2019-03-03 07:05:07 -10:00
Daniel Varga
012ac9cb9d Backed out changeset 4047bcadec73 (bug 1522244) for mochitest failure at devtools/client/debugger/new/test/mochitest/browser_dbg-worker-scopes.js a=backout 2019-03-02 00:01:01 +02:00
Brian Hackett
ed97797436 Bug 1522244 - Fix previewing in worker threads for several builtin classes, r=lsmyth. 2019-02-28 06:24:46 -10:00
Nicolas Chevobbe
102c0df3de Bug 1529497 - Remove promise and defer usage in devtools/shared/DevToolsUtils.js; r=yulia.
The `yieldingEach` is moved into the only file that
is using it, in canvas debugger, and is not migrated
as the panel will be removed in a few months.

Differential Revision: https://phabricator.services.mozilla.com/D20641
2019-02-27 13:28:16 +00:00
Nicolas Chevobbe
ccc695e796 Bug 1505393 - Add better handling of unsafe getters in JsPropertyProvider; r=bgrins.
This patch adds two things to JsPropertyProvider:
- when provided an input which try to access an unsafe
getter properties, the function will indicate that an
unsafe getter should be invoked, with its name.
- a new boolean argument that when set to true would
invoke any unsafe getter that might be in the expression
to be completed.

For simplicity sake, the function only warns the user
of the presence of an unsafe getter when it's the last
property of the expression:

`object.myGetter.` will return that `myGetter` should be invoked
`object.myGetter.a.b.` will not (because then, a and b could
also be getters, and it's getting complex to handle both in
the function itself as in the UI).

Tests are added to ensure this works as expected.

Differential Revision: https://phabricator.services.mozilla.com/D11170
2018-11-08 15:47:53 +00:00
Mark Banner
3d6aaad3f5 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389
2018-10-19 12:55:39 +00:00
Boris Zbarsky
c3b43a0bda Bug 1446940 part 3. Stop getting docshells from windows via getInterface in devtools. r=bgrins 2018-08-01 13:07:10 -04:00
Julian Descottes
82711b9a8f Bug 1454696 - Run eslint --fix for prefer-const;r=yulia
MozReview-Commit-ID: F6xUXCgdRE4
2018-06-01 12:36:09 +02:00
Greg Tatum
a0d41348c4 Bug 1454000 - Add documentation for DevTools flags and their logging behavior; r=jryans
MozReview-Commit-ID: EU5OsfXXY6Q
2018-04-13 10:46:46 -05:00
Nika Layzell
f614b85fbe Bug 1443379 - Stop pretending cacheKey can be anything other than uint32_t, r=smaug 2018-04-10 17:49:46 -04:00
Michael Ratcliffe
34e6287300 Bug 1440609 - Uncouple DEBUG_JS_MODULES and DEBUG in devtools code r=jryans
MozReview-Commit-ID: 6qiu3D5eYyn
2018-03-13 12:49:39 +00:00
J. Ryan Stinnett
8d1c817851 Bug 1443081 - Apply spacing via eslint --fix for DevTools. r=jdescottes
MozReview-Commit-ID: 2RVNt140Zte
2018-03-12 13:44:41 -05:00
Alexandre Poirot
13e5d4f0f5 Bug 1434374 - Auto-rewrite Cu.import into ChromeUtils.import or require calls. r=jdescottes
MozReview-Commit-ID: 7YyLu5q23Hs
2018-02-07 01:37:36 -08:00
Alexandre Poirot
36be948d0f Bug 1434374 - Replace usages of Cu.import in modules (where ChromeUtils isn't defined) r=jdescottes
MozReview-Commit-ID: 8kw2H4R2VIZ
2018-02-05 08:43:50 -08:00
Ben Kelly
c0f39bd441 Bug 1231211 P19 Make DevToolsUtils.newChannelForURL() set the loadingNode so that the SW controller is set on the channel. r=jryans 2018-01-23 10:38:54 -05:00
Alexandre Poirot
96ccd9af97 Bug 1408708 - Fetch stylesheet content via stylesheet window instead of top level content window. r=pbro
MozReview-Commit-ID: AKXQLNAwy8t
2017-12-07 08:22:43 -05:00
Oriol Brufau
9342329bc4 Bug 1403536 - Protect all protocol request methods against unsafe objects r=ochameau
MozReview-Commit-ID: 4fDaap9QCdF
2017-10-18 04:38:13 +02:00
Narcis Beleuzu
63affa5582 Backed out changeset 9fb71b0692a6 (bug 1403536) for devtools-chrome failures on browser_console_dead_objects.js r=backout on a CLOSED TREE 2017-12-01 00:41:09 +02:00
Oriol Brufau
88965e0661 Bug 1403536 - Protect all protocol request methods against unsafe objects r=ochameau
MozReview-Commit-ID: 4fDaap9QCdF
2017-10-18 04:38:13 +02:00
Bogdan Tara
fae5eda0ef Backed out 1 changesets (bug 1403536) for failing ES Linting tests on /builds/worker/checkouts/gecko/devtools/server/tests/unit/test_objectgrips-21.js r=backout on a CLOSED TREE
Backed out changeset 897f029f8ef6 (bug 1403536)
2017-11-29 23:37:15 +02:00
Oriol Brufau
51b1162e7d Bug 1403536 - Protect all protocol request methods against unsafe objects r=ochameau
MozReview-Commit-ID: 4fDaap9QCdF
2017-10-18 04:38:13 +02:00
Oriol Brufau
1cf70ea491 Bug 1406660 - Remove all wrappers when checking if a getter is safe. r=jimb
MozReview-Commit-ID: KcTGDuwqFYu
2017-10-07 18:27:29 +02:00
Oriol Brufau
710cbf1623 Bug 1390701 - Let devtools consider system principal proxy objects to be unsafe. r=jimb 2017-08-24 06:38:00 -04:00
Brian Grinstead
8548dee1e0 Bug 1382833 - Don't throw when dealing with CPOWs in the Object Actor;r=jimb
MozReview-Commit-ID: CaIS2IpaQme
2017-07-26 11:22:56 -07:00
Andrew McCreight
3ab27444cb Bug 1365767 - Stop bootlegging TextEncoder and TextDecoder from osfile.jsm in devtools. r=jryans
MozReview-Commit-ID: DI4OqSGdzgl
2017-05-17 13:52:39 -07:00
Florian Queze
ddf0cda8da Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Sebastian Hengst
4cd95d4a02 Backed out changeset 18d45aa984d6 (bug 1355161) 2017-04-14 23:39:23 +02:00
Florian Queze
35cd8ba883 Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00
Sebastian Hengst
c6d9ef3e98 Backed out changeset 6bc38f188ef2 (bug 1330099) for devtools failures. r=backout 2017-01-11 23:21:56 +01:00
Tim Nguyen
548b6bdbef Bug 1330099 - Enable object-shorthand eslint rule. r=jryans
MozReview-Commit-ID: 3wA25rfznBv
2017-01-11 21:22:15 +00:00
Florian Quèze
361ec85a2e Bug 1329182 - remove trailing newURI null parameters in devtools/, r=jaws. 2017-01-09 20:27:26 +01:00
Jared Wein
21fc75d491 Bug 1326479 - Fix 'indent' eslint errors now that eslint scans multiline array and object definitions. r=Gijs
MozReview-Commit-ID: 99mWjxu8PPn
2017-01-03 10:07:50 -05:00