mirror of
https://github.com/servo/servo
synced 2026-04-27 18:07:52 +02:00
Add an event listener for `pause` to `debugger.js` and the necessary glue to access it from the `devtools` crate. This returns important information to know where we are paused, such as the source location and frame state. Fix frame and object actor encoding into messages. Use information from `debugger.js` to correctly fill the fields. Add a new `frames` list to the thread actor and handle the `frames` message. Fix `getEnvironment` reply in the frame actor. It is out of form (has a `type` field but it doesn't require a followup empty message, it already counts as a reply), so we need to handle it specially. Note: For now we are focusing on the protocol side of the debugger, and this patch only shows where the pause would happen. Pausing Servo itself will happen in a followup.  Testing: `mach test-devtools` and manual testing. No errors (apart from #42006). Part of: #36027 --------- Signed-off-by: eri <eri@igalia.com> Co-authored-by: atbrakhi <atbrakhi@igalia.com> Co-authored-by: Josh Matthews <josh@joshmatthews.net>
26 lines
803 B
Plaintext
26 lines
803 B
Plaintext
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
// This interface is entirely internal to Servo, and should not be accessible to
|
|
// web pages.
|
|
[Exposed=DebuggerGlobalScope]
|
|
interface DebuggerPauseEvent : Event {};
|
|
|
|
partial interface DebuggerGlobalScope {
|
|
undefined getFrameResult(
|
|
DebuggerPauseEvent event,
|
|
PauseFrameResult result);
|
|
};
|
|
|
|
dictionary PauseFrameResult {
|
|
required unsigned long column;
|
|
required DOMString displayName;
|
|
required unsigned long line;
|
|
required boolean onStack;
|
|
required boolean oldest;
|
|
required boolean terminated;
|
|
required DOMString type_;
|
|
required DOMString url;
|
|
};
|