Open Bug 1631495 Opened 5 years ago Updated 5 years ago

Allow to type correctly actors being passed through parent process as form

Categories

(DevTools :: Framework, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: ochameau, Unassigned)

References

(Blocks 1 open bug)

Details

A few actors, like targets are being piped through the parent process as form, i.e. as JSON.
Because of this, we can't correctly type them as, from the server side, we have a JSON object instead of an object inheriting from Actor.
This ultimately prevents protocol from automatically creating the front on the client side.

See this review comment for more context.

Julian managed to make it work via:

I made it "work" by adding a nasty

// If we have a plain form, return it directly.
if (v.actor && !v.actorID) {
  v.actorID = v.actor;
  return v;
}

right at the beginning of Type::write (https://searchfox.org/mozilla-central/rev/567b68b8ff4b6d607ba34a6f1926873d21a7b4d7/devtools/shared/protocol/types.js#353)

You need to log in before you can comment on or make changes to this bug.