mirror of
https://github.com/servo/servo
synced 2026-05-09 08:32:31 +02:00
to debug the scripts in a page with the [SpiderMonkey Debugger API](https://firefox-source-docs.mozilla.org/js/Debugger/), we need to pass the page’s global object to [Debugger.prototype.**addDebuggee()**](https://firefox-source-docs.mozilla.org/js/Debugger/Debugger.html#adddebuggee-global). we could pick up the global via the [onNewGlobalObject() hook](https://firefox-source-docs.mozilla.org/js/Debugger/Debugger.html#onnewglobalobject-global), but if our script system passes the global to the debugger script instead, we can later add details like the PipelineId that will help servo identify debuggees that the API is notifying us about (#38334). this patch plumbs new Window globals from script into addDebuggee() via the debugger script. to call into the debugger script with structured input, we create a new DOM event type, DebuggerEvent, that the debugger script listens for as the “addDebuggee” event. Testing: no testable effects yet, but will be used in #37667 Fixes: part of #36027 --------- Signed-off-by: Delan Azabani <dazabani@igalia.com> Co-authored-by: atbrakhi <atbrakhi@igalia.com>
11 lines
407 B
Plaintext
11 lines
407 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 DebuggerEvent : Event {
|
|
readonly attribute object global;
|
|
};
|