Commit Graph
501 Commits
Author SHA1 Message Date
Nicolas Chevobbe 486b8d6cd0 Bug 1566850 - Remove this.activeConsole in TargetMixin. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D56693
2019-12-13 14:21:20 +00:00
Julian Descottes 01914eddb6 Bug 1602727 - Fix DevTools destroyer patterns r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D56527
2019-12-15 21:07:59 +00:00
Julian Descottes 4125c38d2c Bug 1603366 - Rename Omniscient browser toolbox to Multiprocess Browser Toolbox and support localization r=pbro,flod
Differential Revision: https://phabricator.services.mozilla.com/D56877
2019-12-12 15:00:20 +00:00
shindli 9969261559 Backed out 8 changesets (bug 1566850, bug 1603035) for causing perma bc failures in browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow.js CLOSED TREE
Backed out changeset da1672f831d1 (bug 1566850)
Backed out changeset b3aea303d3ed (bug 1566850)
Backed out changeset 3c8ef35fde92 (bug 1566850)
Backed out changeset 4deadf97378f (bug 1566850)
Backed out changeset 55ac64d74725 (bug 1566850)
Backed out changeset 33c4706a4255 (bug 1566850)
Backed out changeset 1796a39b020b (bug 1566850)
Backed out changeset ae02ae71f846 (bug 1603035)
2019-12-13 12:50:45 +02:00
Julian Descottes fbd078a8ea Bug 1602371 - Rename LocalTabTargetFront tab getter to localTab r=ochameau
Depends on D56330

Renaming the "tab" getter to "localTab" will make it easier to refactor later.

Differential Revision: https://phabricator.services.mozilla.com/D56331
2019-12-13 10:38:07 +00:00
Julian Descottes b414f1fb2d Bug 1602371 - Remove csp and contentPrincipal getters in LocalTabTargetFront r=ochameau
Depends on D56327. Not reason to make target-mixin more complex for this workaround which already has access to the tab object.

Differential Revision: https://phabricator.services.mozilla.com/D56330
2019-12-13 10:00:25 +00:00
Julian Descottes 9cb75e4fd4 Bug 1602371 - Stop listening to tab unload in LocalTabTargetFront r=ochameau
It is not clear why tab unload should be listened to on the client, and only destroy the target front.
Tentatively removing to simplify the local tab target.

Differential Revision: https://phabricator.services.mozilla.com/D56327
2019-12-13 09:59:00 +00:00
Nicolas Chevobbe 4b18f4ea5a Bug 1566850 - Remove this.activeConsole in TargetMixin. r=ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D56693
2019-12-13 09:16:32 +00:00
Brian Hackett 46d73b286c Bug 1602489 - Basic eager evaluation support, r=nchevobbe.
Differential Revision: https://phabricator.services.mozilla.com/D56393
2019-12-12 21:48:03 +00:00
Razvan Caliman 71aa5a2dcf Bug 1599728 - Create ChangesFront/Actor pair for each target in inspector. r=jdescottes
Request a ChangesFront for each target as soon as is becomes available.

The on-demand approach in D54725 is abandoned because it introduces a client-server round trip on _every_ CSS mutation operation due to the need to ensure the ChangesActor is instantiated. By awaiting `changesFront.setup()` on every mutation, needless slowdown is introduced after the actor becomes available. Furthermore, the approach in D54725 spreads the knowledge about the ChangesFront in too many places in the codebase, something that will only get worse over time as the ChangesActor gains capabilities to track CSS changes from other sources or supports tracking DOM changes.

Differential Revision: https://phabricator.services.mozilla.com/D55945
2019-12-12 15:50:44 +00:00
Logan Smyth 2b017e1cf1 Bug 1592430 - Basic support for async live stacks in the debugger server. r=jimb
Differential Revision: https://phabricator.services.mozilla.com/D56661
2019-12-12 06:19:03 +00:00
Sai Hemanth Beeraka 1ad34fed92 Bug 1566521 - Indicate that WS connection is closed. r=Honza,Harald
***
Revision changes: Rename div.p to dom.p

***
Localize connection closed message and add test

***
Display code and reason with connection closed message

***
Remove unnecessary brackets

Differential Revision: https://phabricator.services.mozilla.com/D56235
2019-12-12 08:03:06 +00:00
Julian Descottes c38548f90c Bug 1525966 - Support string errors when detach fails in target fronts r=nchevobbe
Depends on D55829

In case other rejects are still using strings instead of error objects.

Differential Revision: https://phabricator.services.mozilla.com/D55830
2019-12-11 17:31:52 +00:00
Nicolas Chevobbe f8be45d015 Bug 1602700 - Add a comment in webconsole front destroy function to make it clearer how it behaves. r=jdescottes.
This only highlights the fact that the front will only
do the heavy work once, since we set the _client property
to null, and the function is guarded against the _client
truthiness.

Differential Revision: https://phabricator.services.mozilla.com/D56524
2019-12-10 13:32:15 +00:00
Mihai Alexandru Michis 14a27b4910 Backed out 2 changesets (bug 1525966) for causing devtools failures.
Backed out changeset 06ca873edb4c (bug 1525966)
Backed out changeset 8ff967efc6d6 (bug 1525966)

CLOSED TREE
2019-12-09 16:22:08 +02:00
Julian Descottes 4c0ad3b0d8 Bug 1525966 - Support string errors when detach fails in target fronts r=nchevobbe
Depends on D55829

In case other rejects are still using strings instead of error objects.

Differential Revision: https://phabricator.services.mozilla.com/D55830
2019-12-09 13:25:12 +00:00
Brian Hackett 191000447d Bug 1595964 Part 2 - Expose evaluating worker in service worker registration front, r=jdescottes.
Depends on D54286

Differential Revision: https://phabricator.services.mozilla.com/D54288
2019-12-07 18:18:09 +00:00
Noemi Erli 8e5da62e12 Backed out 6 changesets (bug 1595964, bug 1596939) for causing failures in browser_application_panel_list-domain-workers.js
Backed out changeset 65c870147654 (bug 1595964)
Backed out changeset 74a982a9144a (bug 1596939)
Backed out changeset c21c15689e77 (bug 1596939)
Backed out changeset a6848f4d219d (bug 1596939)
Backed out changeset 4f538e6c6dcc (bug 1595964)
Backed out changeset d1c93f700b8c (bug 1595964)
2019-12-07 20:13:22 +02:00
Brian Hackett 879cb73695 Bug 1595964 Part 2 - Expose evaluating worker in service worker registration front, r=jdescottes.
Depends on D54286

Differential Revision: https://phabricator.services.mozilla.com/D54288
2019-12-07 16:13:07 +00:00
Brian Hackett 6d075df69b Bug 1596933 - Show both waiting and active workers in threads pane, r=jlast.
Differential Revision: https://phabricator.services.mozilla.com/D54213
2019-12-06 18:08:18 +00:00
Micah Tigley 23fb42a6a7 Bug 1599635 - Return the root node if no valid iframe nodeFront can be found after a reload. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D55564
2019-12-04 18:52:02 +00:00
Brian Hackett 4cc0186455 Bug 1596934 - Fix attaching to inactive service workers, r=jdescottes.
Differential Revision: https://phabricator.services.mozilla.com/D53280
2019-12-04 16:22:28 +00:00
Nicolas Chevobbe 6715a6f9bc Bug 1579090 - Make WebConsoleFront, PropertyIteratorFront, SymbolIteratorFront and ObjectFront return adhoc fronts (or primitive) when needed. r=jlast.
This is the first part of a bigger patch to make WebConsoleFront methods
consumers handle fronts instead of plain grips.
The main challenge with most of console methods is that the server
can return either a primitive, an object that represent a primitive
(undefined, null, Infinity, ...), a longString grip or an object grip.

Since this would be complex to map as a protocol.js type, this patch
either override the methods where we want to return fronts, or intercept
events with the `before` method on them.

The response is then handled to a function that will iteratore of the
result object in a recursive manner, and create fronts when needed.

Differential Revision: https://phabricator.services.mozilla.com/D54506
2019-12-04 09:02:24 +00:00
Nicolas Chevobbe 059bde8b04 Bug 1579090 - Change how ObjectFront is exported. r=rcaliman.
We export it as a named property to match other fronts, and
also because we plan to add a helper function in the file
that will need to be exported as well.

Differential Revision: https://phabricator.services.mozilla.com/D54136
2019-12-04 09:01:57 +00:00
Yura Zenevich db49c132d8 Bug 1598060 - removing walker actor/front passing as an argument where not necessary. r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D54339
2019-11-26 19:03:01 +00:00
Yura Zenevich c7dc6fd14c Bug 1598404 - remove accessible-destroy event and make the way accessible walker actor manages accessible actors more consistent with the inspector walker and node actors. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D54333
2019-11-25 15:47:38 +00:00
Julian Descottes 0ec573037b Bug 1598047 - Fix js error when calling listAllWorkers with service workers missing their registration r=ladybenko
Differential Revision: https://phabricator.services.mozilla.com/D54132
2019-11-22 14:31:30 +00:00
Jason Laster 60e53aaebd Bug 1594941 - Remove unused Frame.environment field. r=bhackett
Differential Revision: https://phabricator.services.mozilla.com/D53851
2019-11-19 19:53:14 +00:00
Alexandre Poirot 2bda961085 Bug 1578242 - Make the inspector use the TargetList. r=gl,pbro
Differential Revision: https://phabricator.services.mozilla.com/D48859
2019-11-18 15:06:02 +00:00
Razvan Caliman 4ad031067f Bug 1593944 - Emit event with StyleRuleActor as argument when its underlying CSS rule is updated. r=pbro
The fix for [Bug 1557689](https://bugzilla.mozilla.org/show_bug.cgi?id=1557689) created a situation in the [`Rule.onDeclarationsChanged()`](https://searchfox.org/mozilla-central/rev/6566d92dd46417a2f57e75c515135ebe84c9cef5/devtools/client/inspector/rules/models/rule.js#869-887) whereby the `isUsed` state of  client-side declarations was made to point to a fixed `isUsed` state received from the server, thus losing sync with the latest state of the `StyleRuleActor`. Until another "declarations-update" event was fired from the `StyleRuleActor`, the rule's declarations' `isUsed` flag would point to the state with which they were overwritten on the last event handler call.

As a reminder, the root cause of [Bug 1557689](https://bugzilla.mozilla.org/show_bug.cgi?id=1557689) was the inability force a "refresh" of the `StyleRuleFront` so it picked-up the latest `isUsed` state for its declarations when they depend on other declarations from other rules (ex: `justify-content: center` depends on `display:flex`). Therefore, the "declarations-updated" event was introduced with a payload of changed declarations to overwrite the client-side ones. It was convoluted, but it worked.

However, while investigating the cause of this newer bug [Bug 1593944](https://bugzilla.mozilla.org/show_bug.cgi?id=1593944), I discovered an unusual but perhaps expected side-effect: when dispatching an event over the protocol with a payload of the `StyleRuleActor`, its corresponding `StyleRuleFront` on the client would "refresh" automatically (meaning that, looking up state on the previous front reference would point to the latest state from the actor) . The client doesn't even need to use this payload to replace its previous front reference. Surprisingly, the client doesn't even need to explicitly listen to the event which carries the `StyleRuleActor`/`StyleRuleFront` reference. So long as a previous reference of the front exists on the client, it will point to the updated state of the actor. I haven't been able to identify whether this is a known and expected behavior, so I'm pinging @jdescottes and @ochameau to weigh in on the validity of these findings.

Relying on this behavior, the fix for both [Bug 1557689](https://bugzilla.mozilla.org/show_bug.cgi?id=1557689) and [Bug 1557689](https://bugzilla.mozilla.org/show_bug.cgi?id=1557689) involves simply emitting an event, "rule-updated", with the `StyleRuleActor` instance as payload whenever its internal state changes meaningfully so the corresponding front updates. The client will pick-up the latest `isUsed` state of declarations from its reference to the `StyleRuleFront`.


---

Another way to check this behavior and hypothesis is to do the following:
- In [`StyleRuleActor.setRuleText()`](https://searchfox.org/mozilla-central/rev/6566d92dd46417a2f57e75c515135ebe84c9cef5/devtools/server/actors/styles.js#1704) replace `return this` with `return null`; (this will no longer return the `StyleRuleActor` over the protocol; it's not explicitly used on the client anyway).
- In the spec, replace the [`setRuleText()`](https://searchfox.org/mozilla-central/rev/6566d92dd46417a2f57e75c515135ebe84c9cef5/devtools/shared/specs/styles.js#222) return value  with `RetVal("nullable:domstylerule")` so the protocol doesn't throw an error when getting the `null` from the actor.
- Make a build.
- Then, open the Inspector -> Rules View and change the value of a valid declaration, say: `display: block`, to something invalid, like `display: booo`. Notice that the declaration is no longer marked invalid with a warning sign. That's because the declaration's [`isValid`](https://searchfox.org/mozilla-central/rev/6566d92dd46417a2f57e75c515135ebe84c9cef5/devtools/server/actors/styles.js#1447) flag is set on the actor but it no longer syncs with the client which uses the corresponding front to render the declaration after the change. Not returning the `StyleRuleActor` over the protocol breaks this sync actor-front sync.

Differential Revision: https://phabricator.services.mozilla.com/D52560
2019-11-13 14:04:37 +00:00
Nicolas Chevobbe 7e05ff6da2 Bug 1595012 - Remove WebConsoleFront evaluateJS. r=jdescottes.
The function is only used in tests, which is a bit concerning
as we should test the actual function being used (evaluateJSAsync).

Differential Revision: https://phabricator.services.mozilla.com/D52331
2019-11-10 11:47:45 +00:00
Dorel Luca ad23d5f188 Backed out changeset b8c3e2f3cd42 (bug 1595012) for causing DevTools failures in devtools/client/webconsole/test/browser/browser_webconsole_stubs_evaluation_result.js. CLOSED TREE 2019-11-10 05:14:38 +02:00
Nicolas Chevobbe bc94b6ceff Bug 1595012 - Remove WebConsoleFront evaluateJS. r=jdescottes.
The function is only used in tests, which is a bit concerning
as we should test the actual function being used (evaluateJSAsync).

Differential Revision: https://phabricator.services.mozilla.com/D52331
2019-11-09 11:50:11 +00:00
Jason Laster aa5d9e637f Bug 1571704 - Make ThreadActor.frames return Frame fronts instead of JSON objects. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D51004
2019-11-07 20:22:43 +00:00
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
Daniel Varga 67eef8f43e Backed out 2 changesets (bug 1571704) for xpcshell failure at devtools/server/tests/unit/test_blackboxing-01.js. On a CLOSED TREE
Backed out changeset c4bcee0f733a (bug 1571704)
Backed out changeset 25e20d00d43f (bug 1571704)
2019-11-07 01:33:18 +02:00
Jason Laster 8d31234f8c Bug 1571704 - Make ThreadActor.frames return Frame fronts instead of JSON objects. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D51004
2019-11-06 20:07:35 +00:00
Coroiu Cristina 2026e991f2 Backed out changeset 5dd0214c5129 (bug 1571704) for ESlint failure and causing hunks failed when backout Bug 1592616 on a CLOSED TREE 2019-11-06 22:52:53 +02:00
Jason Laster 9c8469299e Bug 1571704 - Make ThreadActor.frames return Frame fronts instead of JSON objects. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D51004
2019-11-06 20:07:35 +00:00
Alexandre Poirot 32f9eb3c1e Bug 1471754 - Implement the TargetList component. r=jdescottes
This component will help build and maintain the list of all the Targets.
Making it easier to:
* listen for all the targets: TargetList.watchTargets/unwatchTargets,
* iterate over all the existing ones: TargetList.getAllTargets,
* get all the TargetScoped fronts of all the targets: TargetList.getAllFronts.

Differential Revision: https://phabricator.services.mozilla.com/D48857
2019-11-04 11:03:58 +00:00
Julian Descottes a2a2d3907e Bug 1592996 - Bail out from walker.findNodeFront if the walker cannot reach the selectors r=rcaliman
Differential Revision: https://phabricator.services.mozilla.com/D51321
2019-11-01 13:59:12 +00:00
Brian Hackett dbc773b282 Bug 1571863 Part 1 - Manage SourceFront from its associated ThreadFront, r=jdescottes,ochameau.
Differential Revision: https://phabricator.services.mozilla.com/D50762
2019-10-31 13:53:25 +00:00
Julian Descottes ff9415624c Bug 1591410 - Remove devtools/shared/client/deprecated-thread-client.js r=ochameau
Differential Revision: https://phabricator.services.mozilla.com/D50605
2019-10-29 08:36:03 +00:00
Gabriel Luong 787c0b0178 Bug 1578745 - Introduce a preference to enable fission frame inspection in DevTools. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D50666
2019-10-28 20:45:21 +00:00
Arthur Iakab 0425696798 Backed out changeset 94a89e567444 (bug 1578745) for causing multiple devtools failures on browser_dbg-inline-preview.js. CLOSED TREE 2019-10-28 22:15:51 +02:00
Nicolas Chevobbe f0ac5d9860 Bug 1591330 - Remove LongStringClient. r=jdescottes.
The LongStringClient is removed and we replace its
usage with LongStringFront instead.
This require a few variable/function renaming, as
well as updating the mocks we use in node tests.

Switch usage to LongStringFront instead.

Differential Revision: https://phabricator.services.mozilla.com/D50579
2019-10-28 16:22:06 +00:00
Gabriel Luong f81370e75b Bug 1578745 - Introduce a preference to enable fission frame inspection in DevTools. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D50666
2019-10-28 18:42:45 +00:00
Julian Descottes 289d1eb14c Bug 1590050 - Preserve markup view selection in iframes after reload r=rcaliman,gl
Depends on D49940

To support this feature we perform two main changes
- the node actor exposes a getAllSelectors method, and the inspector now stores all selectors rather than just one
- the node actor exposes a waitForFrameLoad method, and the walkerFront findNodeFront helper uses it to make sure frames are loaded before querying a selector

Also added a test

Differential Revision: https://phabricator.services.mozilla.com/D49941
2019-10-28 07:55:14 +00:00
Julian Descottes dfaa37a8e4 Bug 1590050 - Walker findNodeFront should use selectors relevant to its rootNode r=rcaliman
Depends on D49939

Small fix on the findNodeFront helper. The walker should be able to calculate its depth without relying on consumers to remove selectors from the array passed to findNodeFront.

Differential Revision: https://phabricator.services.mozilla.com/D49940
2019-10-27 15:53:07 +00:00
Julian Descottes d8c0918063 Bug 1590050 - Move findNodeFront helper to walker front r=gl
Depends on D49938

This helper can be moved on the walker front and will be useful to find the selected node front after a page reload

Differential Revision: https://phabricator.services.mozilla.com/D49939
2019-10-25 10:08:43 +00:00