Closed Bug 1039448 Opened 6 years ago Closed 6 years ago

Throw when registering an actor client with events is not an EventEmitter

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 33

People

(Reporter: janx, Assigned: janx)

Details

Attachments

(1 file)

In the DebuggerClient, you can call registerActorClient[1] to register an actor client, and several things are checked about it (see [1]).

One thing that isn't checked though is if it has an `emit` method, as called in [2] if the client has an events array.

[1] http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/client/dbg-client.jsm#994
[2] http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/client/dbg-client.jsm#882
Attached patch patchSplinter Review
Patch fixing this. Panos, could you please take a look?
Attachment #8456812 - Flags: review?(past)
Comment on attachment 8456812 [details] [diff] [review]
patch

Review of attachment 8456812 [details] [diff] [review]:
-----------------------------------------------------------------

I'm curious, did you spot this from reading the code or did this actually bite you in some client you are working on?
Attachment #8456812 - Flags: review?(past) → review+
Status: NEW → ASSIGNED
Priority: -- → P3
Thanks Panos!

(In reply to Panos Astithas [:past] from comment #2)
> I'm curious, did you spot this from reading the code or did this actually
> bite you in some client you are working on?

From reading the code actually, I was trying to figure the smallest acceptable actor client and I needed events.
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/6de147daee11
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 33
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.