This reverts commit cc333d322a.
Revert "Bug 2043924 - [devtools] Improve the error message for a method which expect bulk response but return a value r=devtools-reviewers,ochameau"
This reverts commit 19e0d76011.
When any exception happens from the DevToolsProcess's JSProcessActor,
the stacktrace is lost when the exception reaches the parent process.
Manually transfer the exception payload between processes
so that RDP server can send the full stack to the client.
Using callbacks was losing async stack trace, so I moved super.sendQuery
into an inline async function to be able to use await and preserve async
stacks in case of errors.
Differential Revision: https://phabricator.services.mozilla.com/D298390
Some actors weren't using any specification. They now have to pass a bare minimal spec object.
Unifying them to the regular Actor interface helps merging constructor with initialize
and instantiate all the actors without any code branch.
Differential Revision: https://phabricator.services.mozilla.com/D169359
A few classes weren't passing the conn object to Actor's constructor
and instead manually defining it.
Some others were having a duplicated `_conn` alias.
Differential Revision: https://phabricator.services.mozilla.com/D168351
* Note that "conn" attribute is now managed by Actor.
* We might want to finally remove "requestTypes".
This isn't used by the frontend... may be third party use it?
This allows to list all available RDP methods of all actors.
* All actors now have to be instantiated via "new ".
Differential Revision: https://phabricator.services.mozilla.com/D168254
This will help transition to ES Modules as we won't be able to expose a magic "chrome" ESM.
Also, most of these symbols are exposed as global already.
All but:
* `components` which is `Components`,
* `CC` which is `Components.Constructor`,
* `Cm` which is `Components.manager`.
$ sed -ie "/require(.chrome.)/d" $(git grep -l 'require("chrome")' devtools/)
+ manual edits for all three exceptions
Differential Revision: https://phabricator.services.mozilla.com/D156936
This will help transition to ES Modules as this symbol is exposed to them.
$ sed -ie "/require(.ChromeUtils.)/d" $(git grep -l 'require("ChromeUtils")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .ChromeUtils./d" $(git grep -l 'loader.lazyRequireGetter(this, "ChromeUtils"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js + manual eslint fixes
Differential Revision: https://phabricator.services.mozilla.com/D156402
This will help transition to ES Modules as this symbol is exposed to them.
$ sed -ie "/require(.Services.)/d" $(git grep -l 'require("Services")' devtools/)
$ sed -ie "/loader.lazyRequireGetter(this, .Services./d" $(git grep -l 'loader.lazyRequireGetter(this, "Services"' devtools/)
+ the edition of builtin-modules.js + eslintrc.js
+ manual eslint fixes
+ removal of devtools-services in the debugger, except for jest tests
Differential Revision: https://phabricator.services.mozilla.com/D156401
Like BrowsingContextTargetActor.detach which was throwing { error: wrongState }
and we were logging "(void 0)" because error.message was undefined,
while error was the thrown JS object.
Differential Revision: https://phabricator.services.mozilla.com/D107986
This is no longer necessary as attach is no longer entering in a nested event loop.
And so we can have attach to complete and return its value as any other request.
Differential Revision: https://phabricator.services.mozilla.com/D100045
This was hacking the internals of RDP/protocol.js in order to provide
different names to the actor prototype.
I had to rename existing `skipBreakpoints` getter in order to avoid
name collision with the RDP method of the same name.
I also had to tweak a few method arguments as they weren't following protocol.js spec.
They were called without protocol.js automatic marshalling of values.
Finally, hack something in protocol.js in order to avoid duplicated response for ThreadActor.attach.
Differential Revision: https://phabricator.services.mozilla.com/D94958
I also added another early return in order to avoid trying to send a method response
if the actor is destroyed, as it isn't really useful and would also throw.
Both ifs added by this changeset fixes the test failure independently of the other one.
But I think we would benefit from both.
The one in writeError would avoid throwing exception in the last change catch handler
and so avoid unhandled promise rejections.
The one in sendReturn probably helps having more meaningful error report!
Differential Revision: https://phabricator.services.mozilla.com/D89682