Commit Graph
98 Commits
Author SHA1 Message Date
Nicolas Chevobbe e2e3764c39 Bug 1601559 - Put Window default properties accessor under <default properties> node. r=Honza.
Differential Revision: https://phabricator.services.mozilla.com/D55927
2019-12-10 18:07:02 +00:00
Nicolas Chevobbe 745ad360ab Bug 1370826 - Render parameter names in function rep. r=Honza.
For some reason the parameterNames was expected as
a prop, but it's available on the function grip
itself.
The rep is fixed, and tests are modified to reflect
this change.

Differential Revision: https://phabricator.services.mozilla.com/D55926
2019-12-10 18:04:40 +00:00
jaril 033f4938a3 Bug 1582298 - Fix set/get watchpoint markers in RTL orientation r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D56463
2019-12-09 21:34:45 +00:00
Dorel Luca 5081adf6d2 Backed out 2 changesets (bug 1370826, bug 1601559) for Devtools failures in devtools/client/debugger/test/mochitest/browser_dbg-sourcemapped-scopes.js. CLOSED TREE
Backed out changeset 37142aec03d7 (bug 1601559)
Backed out changeset 5fe8330c1912 (bug 1370826)
2019-12-10 18:17:29 +02:00
Nicolas Chevobbe dc94c00294 Bug 1601559 - Put Window default properties accessor under <default properties> node. r=Honza.
Depends on D55926

Differential Revision: https://phabricator.services.mozilla.com/D55927
2019-12-10 14:42:07 +00:00
Nicolas Chevobbe a1f6aaa656 Bug 1370826 - Render parameter names in function rep. r=Honza.
For some reason the parameterNames was expected as
a prop, but it's available on the function grip
itself.
The rep is fixed, and tests are modified to reflect
this change.

Differential Revision: https://phabricator.services.mozilla.com/D55926
2019-12-09 12:46:23 +00:00
Nicolas Chevobbe 12cedd0d2a Bug 1579090 - Make ObjectInspector and Reps work with object fronts. r=Honza,jlast.
This patch make it so ObjectInspector can handle both simple grips and fronts.
The main idea is that we can now pass a `front` property to ObjectInspector nodes,
that will then be used to retrieve properties on the object.

Differential Revision: https://phabricator.services.mozilla.com/D54508
2019-12-04 09:03:20 +00:00
Nicolas Chevobbe b8fe80ec27 Bug 1599135 - Expose all Reps file. r=jlast.
This allows consumers to directly require a single Rep file
if needed (e.g. the inspector only needs elementNode or textNode).
In order to make this work, the requires for react-dom-factories
and prop-types needed to be changed to the in-tree modules.
We also needed to modified the reps jest config, as well as the
babel config so we can run tests and still generate the reps bundle.
Finally, the dom-node-constants is modified to not use define as
it's not used as an AMD module.

Differential Revision: https://phabricator.services.mozilla.com/D54680
2019-11-27 07:07:30 +00:00
Jason Laster 62279d8585 Bug 1597946 - Browser debugger goes blank. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D54001
2019-11-26 17:42:14 +00:00
Nicolas Chevobbe 4d14f5d829 Bug 1375752 - Render empty strings as <empty string> in console. r=yzen.
This only affects console api calls where one of the
argument is an empty string. Since we don't quote
string arguments for those, it was difficult to spot
an empty string there.
Jest test are added, as well as a mochitest for the
console to make sure that we don't have unwanted
side effects (for evaluation results, object with
empty string properties, ...)

Differential Revision: https://phabricator.services.mozilla.com/D54687
2019-11-26 15:09:00 +00:00
jaril c2c0d5e15b Bug 1597775 - Only render watchpoints in the Scopes pane
Differential Revision: https://phabricator.services.mozilla.com/D54353
2019-11-25 16:57:40 +00:00
wartmanm e4a2c6bdd0 Bug 1590824 - Don't pass sourceId in jumpToDefinitionButton event listener. r=nchevobbe.
Differential Revision: https://phabricator.services.mozilla.com/D50867
2019-11-05 13:13:16 +00:00
Anshul 27c37f1be7 Bug 1591975 - Summary: Do not render Watchpoint button in console r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D50984
2019-10-31 05:02:32 +00:00
Anshul dccbda7777 Bug 1590811 - Better align the breakpoint icon and change hover effects.
Differential Revision: https://phabricator.services.mozilla.com/D50157
2019-10-28 22:24:26 +00: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
Nicolas Chevobbe 6f3161847b Bug 1590633 - Remove Reps launchpad. r=Honza.
This means we can also cleanup the package.json,
and remove file that were only needed for the
launchpad.

Differential Revision: https://phabricator.services.mozilla.com/D50174
2019-10-25 12:08:17 +00:00
Nicolas Chevobbe e3359be848 Bug 1588999 - Rename ObjectClient to ObjectFront. r=ochameau.
The object-client.js file is now a proper protocol.js front,
but is still named after a client.
This is confusing, so we rename and move the file next to other
fronts, and update all consumers to the new terminology.

Differential Revision: https://phabricator.services.mozilla.com/D49878
2019-10-21 12:07:10 +00:00
jaril d0be8e4c8f Bug 1588997 - Convert ObjectClient to protocol.js front. r=nchevobbe.
- Converted the ObjectClient into an protocoljs Front
- Converted the SymbolIteratorClient into a protocoljs Front and moved it to devtools/shared/fronts
- Converted the PropertyIteratorClient into a protocoljs Front and moved it to devtools/shared/fronts
- Converted the EnvironmentClient into a protocoljs Front and moved it to devtools/shared/fronts
- Modified calls to `DebuggerClient.release()` so that it tries to call the ObjectFront's release method first, and falls back on `DebuggerClient.release()` if there's no object front
- Changed reps so that it instantiates only one ObjectClient per grip
- Changed tests so that they expect what the Front's request method resolves to where applicable (i.e. ObjectFront.allocationStack resolves to allocationStack, not a packet object with an allocationStack property)
- Changed callbacks provided to ObjectClient methods to be chained to the ObjectFront methods (e.g. ObjectClient.getScope(callback) changed to ObjectFront.getScope().callback())
- Changed tests to use async/await (test_framebindings-x.js, test_functiongrips-x.js, test_objectgrips-x.js)
- Changed tests to expect protocoljs to throw an error string instead of an error object (test_objectgrips-fn-apply-03.js, test_threadlifetime-02.js, test_pauselifetime-03.js)

Differential Revision: https://phabricator.services.mozilla.com/D48182
2019-10-17 16:06:25 +00:00
Chris Muldoon 836cfd993e Bug 1577673 - Continue to Here does not pause. r=davidwalsh
Differential Revision: https://phabricator.services.mozilla.com/D48178
2019-10-17 23:53:36 +00:00
Sorin Davidoi 62275131cb Bug 1588637 - perf: Reduce memory allocation, avoid regular expressions and layout trashing r=davidwalsh
Apply the following optimizations:
 - Don't use regular expressions where they can be avoided
 - Reduce unnecessary memory allocations (e.g. avoid doing a map and a filter by writing the code in an imperative fashion)
 - Reduce layout trashing by using `rAF` and `setTimeout`
 - Perform cheaper checks first in conditional statements

See commit messages for more details.

Differential Revision: https://phabricator.services.mozilla.com/D49214
2019-10-16 18:44:13 +00:00
Bogdan Tara 799d210151 Backed out changeset 29bc3ebe8b4e (bug 1588997) for browser_ext_devtools_panels_elements_sidebar.js && browser_ext_find.js failures CLOSED TREE 2019-10-17 10:51:19 +03:00
jaril 7c26e8f76b Bug 1588997 - Convert ObjectClient to protocol.js front. r=nchevobbe.
- Converted the ObjectClient into an protocoljs Front
- Converted the SymbolIteratorClient into a protocoljs Front and moved it to devtools/shared/fronts
- Converted the PropertyIteratorClient into a protocoljs Front and moved it to devtools/shared/fronts
- Converted the EnvironmentClient into a protocoljs Front and moved it to devtools/shared/fronts
- Modified calls to `DebuggerClient.release()` so that it tries to call the ObjectFront's release method first, and falls back on `DebuggerClient.release()` if there's no object front
- Changed reps so that it instantiates only one ObjectClient per grip
- Changed tests so that they expect what the Front's request method resolves to where applicable (i.e. ObjectFront.allocationStack resolves to allocationStack, not a packet object with an allocationStack property)
- Changed callbacks provided to ObjectClient methods to be chained to the ObjectFront methods (e.g. ObjectClient.getScope(callback) changed to ObjectFront.getScope().callback())
- Changed tests to use async/await (test_framebindings-x.js, test_functiongrips-x.js, test_objectgrips-x.js)
- Changed tests to expect protocoljs to throw an error string instead of an error object (test_objectgrips-fn-apply-03.js, test_threadlifetime-02.js, test_pauselifetime-03.js)

Differential Revision: https://phabricator.services.mozilla.com/D48182
2019-10-16 17:09:35 +00:00
Miriam 32009dda67 Bug 1582304: Ensure you can add a watchpoint to property within a bucket, prototype, or default properties.
Differential Revision: https://phabricator.services.mozilla.com/D49496
2019-10-17 00:45:31 +00:00
wartmanm eb01792710 Bug 1433373 - Use source mapping for console jump to definition button r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D38096
2019-10-07 08:40:04 +00:00
Nicolas Chevobbe 511b29efce Bug 1585529 - Fix invoke getter button for properties with quotes. r=Honza.
Bug 1584244 fixed some of the issue for getters,
but not all of them.
Instead of trying to unescape the node name, we
put the actual property name into the node, so
we can reuse it later.

Differential Revision: https://phabricator.services.mozilla.com/D47876
2019-10-04 13:40:33 +00:00
Narcis Beleuzu 2351436cda Backed out changeset 4fc14159ba69 (bug 1585529) for debugger failures. CLOSED TREE 2019-10-04 15:55:49 +03:00
Nicolas Chevobbe dd16bc3c1e Bug 1585529 - Fix invoke getter button for properties with quotes. r=Honza.
Bug 1584244 fixed some of the issue for getters,
but not all of them.
Instead of trying to unescape the node name, we
put the actual property name into the node, so
we can reuse it later.

Differential Revision: https://phabricator.services.mozilla.com/D47876
2019-10-04 12:08:28 +00:00
Jason Laster 3934a4c8a5 Bug 1582870 - Reduxify console actions. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D46674
2019-10-02 22:50:25 +00:00
Nicolas Chevobbe 88449b8bd9 Bug 1584973 - Expose object inspector's reducer file. r=jlast.
This patch exposes the objectInspector reducer as a regular
file that can be required in the devtools codebase.
This should make things faster to start as we won't need
to load the entire bundle (especially for the inspector where
the reps is only used when navigating to specific subpanels).
This means we need to remove the flow typing for now since
we don't have a cross-toolbox build process like we have
in the debugger.

Differential Revision: https://phabricator.services.mozilla.com/D47728
2019-10-02 08:05:28 +00:00
Oana Pop Rus ce530ebdd0 Backed out 2 changesets (bug 1584973) for devtools node failure on a CLOSED TREE
Backed out changeset c06273b25769 (bug 1584973)
Backed out changeset e63ea229519d (bug 1584973)
2019-10-02 02:30:42 +03:00
Nicolas Chevobbe 31f21a6ea9 Bug 1584973 - Expose object inspector's reducer file. r=jlast.
This patch exposes the objectInspector reducer as a regular
file that can be required in the devtools codebase.
This should make things faster to start as we won't need
to load the entire bundle (especially for the inspector where
the reps is only used when navigating to specific subpanels).
This means we need to remove the flow typing for now since
we don't have a cross-toolbox build process like we have
in the debugger.

Differential Revision: https://phabricator.services.mozilla.com/D47728
2019-10-01 15:19:44 +00:00
Nicolas Chevobbe a65a35fdeb Bug 1585012 - Don't dispatch RELEASED_ACTORS action when no actors were released. r=davidwalsh.
Differential Revision: https://phabricator.services.mozilla.com/D47738
2019-10-01 14:52:20 +00:00
Nicolas Chevobbe b56a390f9f Bug 1584244 - Fix invoke getter action on quoted property. r=Honza.
When clicking the invoke button on a property that
needs to be quoted, e.g. hello-world, the result
was undefined.
That's because we were sending the property name to
the server with the surrounding quotes.
This patch fixes the issue and adds a couple of test
case to make sure we don't regress.

Differential Revision: https://phabricator.services.mozilla.com/D47399
2019-10-01 13:17:22 +00:00
Nicolas Chevobbe f6ca51a948 Bug 1582865 - Remove actors from ObjectInspector state once they're released. r=rpl.
The actors weren't ever removed from the state,
which could lead to increased memory consumption
as well as attempt to release the actors a
second time in some cases.
We fix this by dispatching a new actions once
the actors are released, so we can remove them
from the state.

Depends on D47271

Differential Revision: https://phabricator.services.mozilla.com/D47411
2019-09-27 12:06:20 +00:00
Nicolas Chevobbe 75e9d7d732 Bug 1582865 - Don't use document/window in tree component. r=yzen.
When using the ObjectInspector in an inspector extension sidebar,
document is not an HTMLDocument but a Sandbox, which means we
don't have access to the same properties than in a document.
Since the Tree and the ObjectInspector components do use `document`
and `window`, this means some interaction would lead to the sidebar
crashing.
To prevent this, we retrieve the document and/or the window from
a node reference instead.

Differential Revision: https://phabricator.services.mozilla.com/D47271
2019-09-27 12:06:20 +00:00
Miriam 0cbee74463 Bug 1581958 - Add sub-menu to watchpoints context menu r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D46333
2019-09-20 02:54:39 +00:00
Nicolas Chevobbe 309bda430a Bug 1581738 - Fix ErrorRep for Error objects with non-string stack property. r=Honza.
When the stack isn't a string (or a longstring), we
don't try to parse anything.
A test is added to ensure we don't regress.

Differential Revision: https://phabricator.services.mozilla.com/D46114
2019-09-17 13:57:18 +00:00
Miriam 5cefcd89c1 Bug 1574192 - Initial watchpoints front end commit. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D43487
2019-09-14 14:13:54 +00:00
David Walsh 4d1c025a5a Bug 1580006 - Make inline preview for exceptions look better r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D45252
2019-09-10 23:26:38 +00:00
Jason Laster ab8a1ed059 Bug 1580064 - Replace ObjectInspector symbol with better delimeter. r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D45286
2019-09-10 22:47:42 +00:00
Razvan Maries 6cd053c651 Backed out changeset 8695461482b4 (bug 1580006) for ES Lint failure. CLOSED TREE 2019-09-11 00:41:19 +03:00
David Walsh d097cfc161 Bug 1580006 - Make inline preview for exceptions look better r=nchevobbe
Differential Revision: https://phabricator.services.mozilla.com/D45252
2019-09-10 17:54:57 +00:00
Jason Laster dcdf2f289b Bug 1578606 - Fix jest. r=davidwalsh
Differential Revision: https://phabricator.services.mozilla.com/D44591
2019-09-05 20:38:25 +00:00
Noemi Erli 8ffe7b6c33 Backed out changeset 55386bf32ae0 (bug 1578606) for devtools failures 2019-09-04 05:23:11 +03:00
Jason Laster 0f23a11576 Bug 1578606 - Fix jest. r=davidwalsh
Differential Revision: https://phabricator.services.mozilla.com/D44591
2019-09-04 00:56:52 +00:00
Florens Verschelde 4f52f17fa8 Bug 1575786 - Use unprefixed user-select property in devtools CSS; r=ladybenko,jlast
Differential Revision: https://phabricator.services.mozilla.com/D43217
2019-08-29 10:12:25 +00:00
Logan Smyth 87445c3922 Bug 1541633 - Part 3: Reduce the amount of data passed to the source-map worker functions. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D42935
2019-08-23 14:34:42 +00:00
Logan Smyth ad730129ff Bug 1541633 - Part 2: Give workers a way to cleanly pass metadata about errors to callers. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D42934
2019-08-23 14:33:16 +00:00
Logan Smyth 43d94b9c57 Bug 1541633 - Part 1: Move original ID generation into the source-map worker. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D42933
2019-08-23 14:32:36 +00:00
Cosmin Sabou deda0cffca Backed out 5 changesets (bug 1541633) for devtools failures on browser_dbg-sourcemapped-breakpoint-console.js.
Backed out changeset 35fe7c48b49a (bug 1541633)
Backed out changeset 59019ae6bf3f (bug 1541633)
Backed out changeset 44ea34f63223 (bug 1541633)
Backed out changeset a8378192e3b6 (bug 1541633)
Backed out changeset de895ee6de42 (bug 1541633)
2019-08-22 10:13:47 +03:00