In some cases, we were getting null sourceId, which was causing an exception
to be thrown in `getFormattedSourceId` since it expects a string.
We add a simple guard in this function so we don't throw anymore.
But we shouldn't get null sourceId in the first place. It looks like for
some Wasm sources, the SavedFrame sourceId can be 0, which wasn't playing
well with some loose check we were doing in the sources manager.
Finally, the "Copy metadata" button we display when a console message crash
wasn't working. The message now includes the targetFront, which can be serialized
in JSON, so we simply ignore it.
Differential Revision: https://phabricator.services.mozilla.com/D206105
This introduces functionality to support disabling weconsole messages.
Also introduces code to disable all network messages, which would be
used by the netmonitor.
You'll probably need the fullstack of patches to test easily
Will add mochitest in a followup
Differential Revision: https://phabricator.services.mozilla.com/D149753
This is a naive implementation where we re-create a ConsoleOutput
element, reusing the existing store, and passing a specific prop
so all the messages would be rendered.
In order to include stacktraces, we pass a `0` initial render delay to the
callsites of the `SmartTrace` component.
We take this as an opportunity to extend the test coverage of `SmartTrace` around
this feature.
Differential Revision: https://phabricator.services.mozilla.com/D142189
This is a naive implementation where we re-create a ConsoleOutput
element, reusing the existing store, and passing a specific prop
so all the messages would be rendered.
In order to include stacktraces, we pass a `0` initial render delay to the
callsites of the `SmartTrace` component.
We take this as an opportunity to extend the test coverage of `SmartTrace` around
this feature.
Differential Revision: https://phabricator.services.mozilla.com/D142189
we directly use what's returned from the `Frame` component. We allow to pass
an extra `className` prop to it so we can still add the `message-location` class
that is used in the console.
Differential Revision: https://phabricator.services.mozilla.com/D142097
Since we may now have ObjectFronts in console messages as
well as in evaluation results, we need to make the webconsole
consume those fronts.
And because we have ObjectFronts, we can now avoid using the
DebuggerClient to release the actors, and simply call front.release.
This simplifies how we track created object, since we only need
to release "root" objects, which will also cause all the sub-fronts
to be released as well. Sadly, this was causing some test failures
in mochitests because some objects were released while the connection
was closed, so we now emit an event when all the actors are released,
which we track in tests to wait until everything is over.
As a side effect, we need to change how we handle stubs for
our tests, since fronts have cycical references and can't
be serialized directly. In order to handle that, we serialize
all front as a plain object with a `_grip` property, containing
the object grip. In the stub file, we don't expose the grips
directly, but Maps that contain those stubs "rehydrated": when
a _grip object is encountered, it's turned back into a front.
Differential Revision: https://phabricator.services.mozilla.com/D54509
Support for coping link location from within the Console panel (through the context menu) can be extended and cover learn more links too.
Differential Revision: https://phabricator.services.mozilla.com/D38546
Adding a new opcional property to Frame.js, messageSource, which will allows us to know the source of the Message. We will be using this property to display the correct tooltip message.
Differential Revision: https://phabricator.services.mozilla.com/D38139
When clicking and selecting source text on a collapsible message, the message expansion is toggled after releasing the mouse
Differential Revision: https://phabricator.services.mozilla.com/D37607