Closed Bug 1524283 Opened 6 years ago Closed 6 years ago

Remove all code related to updatedSource in client and server

Categories

(DevTools :: Debugger, task, P3)

task

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1547314

People

(Reporter: ochameau, Assigned: championshuttler)

References

Details

(Whiteboard: dt-fission)

We do send the "updatedSource" event on the parent of the thread actor, i.e. the target actor. But that will prevent easily converting the thread client to a front and introduces confusion between the two actors/fronts.

We now have a better code on the client side, with the refactoring of target classes, to correctly listen for events on the thread client.

Priority: -- → P2

While working on bug 1269919, we realized that updatedSource event wasn't correctly handled on the frontend side.
That doesn't break any test. So I'm wondering how useful this event really is?

We do send this event from here:
https://searchfox.org/mozilla-central/rev/4587d146681b16ff9878a6fdcba53b04f76abe1d/devtools/server/actors/thread.js#1760-1766

This is supposed to be translated into source-updated event on the target over here:
https://searchfox.org/mozilla-central/rev/4587d146681b16ff9878a6fdcba53b04f76abe1d/devtools/shared/fronts/targets/target-mixin.js#395-399

But this is broken as we are missing "updatedSource" event declaration in target's protocol.js specification file:
https://searchfox.org/mozilla-central/rev/4587d146681b16ff9878a6fdcba53b04f76abe1d/devtools/shared/specs/targets/browsing-context.js#139-142
(we have newSource but miss updatedSource)

source-updated is only used by the source map service:
https://searchfox.org/mozilla-central/rev/4587d146681b16ff9878a6fdcba53b04f76abe1d/devtools/client/framework/source-map-url-service.js#117

Logan, Do you have any idea how useful the source map service is nowadays? Any idea what is the updatesSource event sent by the actor and how it could impact the source map service?

Flags: needinfo?(lsmyth)

Actually, I haven't looked at the server side of this story.
Logan just told me on phabricator that this updatedSource events is never fired on TabSources and so it looks like both client and server side is a dead piece of code:
https://searchfox.org/mozilla-central/search?q=updatedSource&case=false&regexp=false&path=

Flags: needinfo?(lsmyth)
Summary: Emit "updatedSource" on the thread actor rather than its parent (i.e the target actor) → Remove all code related to updatedSource in client and server

Hi @Jason can I take this up?

Thanks

Flags: needinfo?(jlaster)

Sure :championshuttler.

Flags: needinfo?(jlaster)
Assignee: nobody → shivams2799

How is it going Shivam? Anything we can help with?

Flags: needinfo?(shivams2799)
Priority: P2 → P3
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → DUPLICATE
Type: enhancement → task
Flags: needinfo?(shivams2799)
You need to log in before you can comment on or make changes to this bug.