Closed Bug 1485378 Opened 7 years ago Closed 7 years ago

CallWatcher actor is registered as target scoped actor but doesn't need to be

Categories

(DevTools :: Framework, enhancement, P4)

enhancement

Tracking

(firefox64 fixed)

RESOLVED FIXED
Firefox 64
Tracking Status
firefox64 --- fixed

People

(Reporter: ochameau, Assigned: yulia)

Details

Attachments

(1 file, 1 obsolete file)

https://searchfox.org/mozilla-central/rev/3fa761ade83ed0b8ab463acb057c2cf0b104689e/devtools/server/main.js#331-334 this.registerModule("devtools/server/actors/call-watcher", { prefix: "callWatcher", constructor: "CallWatcherActor", type: { target: true } }); This actor is registered as a Target scoped actor, but noone tries to instanciate it from the client: https://searchfox.org/mozilla-central/search?q=CallWatcherFront(&case=false&regexp=false&path= Only tests do. 1) We should stop registering it as a target scoped. It would break this tests: https://searchfox.org/mozilla-central/source/devtools/client/canvasdebugger/test/browser_canvas-actor-test-02.js#10 So we may register it only for tests? or tweak the test somehow? 2) If you ignore the test, CallWatcherActor isn't directly used by the client. So it is rather an actor helper class than an actor/front. We exposes "call-watcher" and "function-call", but only "function-call" type is used by the client: https://searchfox.org/mozilla-central/rev/3fa761ade83ed0b8ab463acb057c2cf0b104689e/devtools/shared/specs/index.js#56-60 We should only export function-call here. See the various attributes or method of this actor, it only appears in actor codebase or the test: https://searchfox.org/mozilla-central/source/devtools/shared/specs/call-watcher.js#39-77 https://searchfox.org/mozilla-central/search?q=symbol:%23tracedGlobals&redirect=false https://searchfox.org/mozilla-central/search?q=symbol:%23initTimestampEpoch&redirect=false ... But function-call actor is actually used by the client, so this is a real actor and justify a spec and a front: https://searchfox.org/mozilla-central/source/devtools/shared/specs/call-watcher.js#31 https://searchfox.org/mozilla-central/search?q=symbol%3A%23getDetails&case=false&regexp=false&path=devtools
creates a CallWatcherActor only for tests and migrates other functionality to the helper
Assignee: nobody → ystartsev
Comment on attachment 9008066 [details] Bug 1485378 - Replace CallWatcher actor with helper; r=jdescottes Julian Descottes [:jdescottes][:julian] has approved the revision.
Attachment #9008066 - Flags: review+
Attachment #9009545 - Attachment is obsolete: true
Pushed by ystartsev@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/93d1ad43e3d3 Replace CallWatcher actor with helper; r=jdescottes
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 64
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: