Protocol.js doesn't throw an explicit error when a method is specified in spec but not implement in the actor

RESOLVED FIXED in Firefox 62

Status

enhancement
P3
normal
RESOLVED FIXED
Last year
27 days ago

People

(Reporter: ochameau, Assigned: ochameau)

Tracking

(Blocks 1 bug)

unspecified
Firefox 62
Dependency tree / graph

Firefox Tracking Flags

(firefox62 fixed)

Details

(Whiteboard: dt-fission)

Attachments

(1 attachment)

I saw that while working in bug 1449162. It would be great to replace the cryptic exception happening within protocol.js by an explicit error message.
Assignee

Updated

Last year
Severity: normal → enhancement
Priority: -- → P3
Assignee

Updated

Last year
Assignee: nobody → poirot.alex

Comment 3

Last year
mozreview-review
Comment on attachment 8974317 [details]
Bug 1460229 - Throw an explicit error message when a method specified in a spec is missing in the actor.

https://reviewboard.mozilla.org/r/242634/#review250088

Great, this seems like a helpful improvement! :)

::: devtools/shared/protocol.js:1155
(Diff revision 1)
>            console.error("Error reading request: " + packet.type);
>            throw ex;
>          }
>  
> +        if (!this[spec.name]) {
> +          throw new Error(`Spec for '${actorProto.typeName}' specify a '${spec.name}' ` +

Nit: specify -> specifies
Attachment #8974317 - Flags: review?(jryans) → review+
Comment hidden (mozreview-request)

Comment 5

Last year
Pushed by apoirot@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ac313bdb1bff
Throw an explicit error message when a method specified in a spec is missing in the actor. r=jryans
https://hg.mozilla.org/mozilla-central/rev/ac313bdb1bff
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → Firefox 62
Assignee

Updated

Last year
Blocks: dt-pjs

Updated

Last year
Product: Firefox → DevTools
Assignee

Updated

8 months ago
Whiteboard: dt-fission
You need to log in before you can comment on or make changes to this bug.