mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-25 02:40:22 -10:00
Since we may now have ObjectFronts in console messages as well as in evaluation results, we need to make the webconsole consume those fronts. And because we have ObjectFronts, we can now avoid using the DebuggerClient to release the actors, and simply call front.release. This simplifies how we track created object, since we only need to release "root" objects, which will also cause all the sub-fronts to be released as well. Sadly, this was causing some test failures in mochitests because some objects were released while the connection was closed, so we now emit an event when all the actors are released, which we track in tests to wait until everything is over. As a side effect, we need to change how we handle stubs for our tests, since fronts have cycical references and can't be serialized directly. In order to handle that, we serialize all front as a plain object with a `_grip` property, containing the object grip. In the stub file, we don't expose the grips directly, but Maps that contain those stubs "rehydrated": when a _grip object is encountered, it's turned back into a front. Differential Revision: https://phabricator.services.mozilla.com/D54509