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
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
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
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
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
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
This revert the changes made in Bug 1587839, except the added test.
The safer fix to be uplifted is to only fix the original issue
in the SmartTrace component, where we remove any sourceId we might
have when creating the new mapped frame.
We also modify the browser_dbg-pretty-print-console test to ensure
clicking on a prettified location in the console does open the
debugger with the expected location.
Differential Revision: https://phabricator.services.mozilla.com/D50173
This revert the changes made in Bug 1587839, except the added test.
The safer fix to be uplifted is to only fix the original issue
in the SmartTrace component, where we remove any sourceId we might
have when creating the new mapped frame.
We also modify the browser_dbg-pretty-print-console test to ensure
clicking on a prettified location in the console does open the
debugger with the expected location.
Differential Revision: https://phabricator.services.mozilla.com/D50173
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
When starting to resize, we store the direction of the
controlled element in the state.
When resizing, we check the current element direction
to set the appropriate width to the controlled element.
A test is added to ensure the resizer works as expected
in RTL languages elements.
Differential Revision: https://phabricator.services.mozilla.com/D49719
We remove the pseudo elements we were using to draw the borders and
put them on the grid elements instead.
We make the GridElementResizer 6px and translate it so there's
handle on "both sides" of the splitter.
Differential Revision: https://phabricator.services.mozilla.com/D45302
- 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
- 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
The sourceId is then used in the various places where we call the sourcemap service.
A test is added in the console to make sure that we do navigate to the mapped
location in the debugger.
Differential Revision: https://phabricator.services.mozilla.com/D49103
Those files are generated with bin/bundle.js, and were
out of sync.
We take this as an opportunity to include the license
at the top of the files, using the Webpack Banner plugin.
Differential Revision: https://phabricator.services.mozilla.com/D48297
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
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
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
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
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