Closed Bug 1526832 Opened 2 years ago Closed 2 years ago

Handle objects in log point messages


(Core Graveyard :: Web Replay, enhancement)

Not set


(firefox67 fixed)

Tracking Status
firefox67 --- fixed


(Reporter: bhackett1024, Assigned: bhackett1024)


(Blocks 1 open bug)



(3 files)

Attached patch patchSplinter Review

Logging objects is not currently supported with log points: the objects will be converted to a "<UnknownSearchObject>" string in the console UI.

The main problem with supporting this is that the mechanisms/hacks used to allow inspecting console objects after the point they were logged only works with objects that are always logged by a console.log() call in the original source. Dynamically injecting logs doesn't leave us with a good place to query information about these objects.

The attached patch replaces this mechanism with a better one. Instead of having special debugger objects that are associated with console messages and use special requests to communicate with the child, the child sends snapshots of the contents of these objects, including their normal data (class/etc.) and any properties. The server code in the middleman creates a ReplayDebuggerObjectSnapshot based on this data, which acts like a ReplayDebuggerObject and reuses its implementation but is set up to avoid needing to communicate with the child at all in order to access its contents. It can't be fully explored --- object properties are converted in the child to an "<unavailable>" string --- so has similar limitations to the old approach. It is cleaner, more flexible, and more robust (this also fixes things so that the properties dropdown on console message objects works) than the old approach, however.

Replace the special handling for console log objects with a more general object snapshot mechanism, as described above.

Attachment #9042856 - Flags: review?(lsmyth)

Currently, the server sends log point messages while replaying to the client in the form of virtualConsoleLog packets. These do not support sending objects to the client (object actor grips would be needed) so the messages are stringified first. The attached patch removes virtualConsoleLog packets and uses the normal method for sending console API calls, which will generate object grips for any logged objects.

Attachment #9042859 - Flags: review?(lsmyth)
Attachment #9042856 - Flags: review?(lsmyth) → review+
Attachment #9042859 - Flags: review?(lsmyth) → review+
Pushed by
Part 1 - Allow snapshots when sending objects to the middleman, r=lsmyth.
Part 2 - Use onConsoleAPICall when sending log point messages to the client, r=lsmyth.
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.