mirror of
https://github.com/servo/servo
synced 2026-05-14 10:56:44 +02:00
The WebIDLs for values were duplicated in PropertyDescriptor and EvalResultValue, with duplicated handlers across the code. General cleanup of how debugger values are passed from debugger.js and how the conversion from JS and to JSON happens. There shouldn't be a behaviour change. Testing: Existing devtools tests and manual testing Part of: #36027 --------- Signed-off-by: eri <eri@igalia.com> Co-authored-by: atbrakhi <atbrakhi@igalia.com>
60 lines
1.7 KiB
Plaintext
60 lines
1.7 KiB
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 DebuggerEvalEvent : Event {
|
|
readonly attribute DOMString code;
|
|
readonly attribute PipelineId pipelineId;
|
|
readonly attribute DOMString? workerId;
|
|
readonly attribute DOMString? frameActorId;
|
|
};
|
|
|
|
partial interface DebuggerGlobalScope {
|
|
undefined evalResult(DebuggerEvalEvent event, EvalResult result);
|
|
};
|
|
|
|
dictionary EvalResult {
|
|
required DebuggerValue value;
|
|
ObjectPreview preview;
|
|
required DOMString completionType;
|
|
boolean hasException;
|
|
};
|
|
|
|
dictionary PropertyDescriptor {
|
|
required DOMString name;
|
|
required DebuggerValue value;
|
|
required boolean configurable;
|
|
required boolean enumerable;
|
|
required boolean writable;
|
|
required boolean isAccessor;
|
|
};
|
|
|
|
dictionary DebuggerValue {
|
|
required DOMString valueType;
|
|
boolean booleanValue;
|
|
double numberValue;
|
|
DOMString stringValue;
|
|
DOMString objectClass;
|
|
};
|
|
|
|
dictionary ObjectPreview {
|
|
required DOMString kind;
|
|
sequence<PropertyDescriptor> ownProperties;
|
|
unsigned long ownPropertiesLength;
|
|
unsigned long arrayLength;
|
|
FunctionPreview function;
|
|
};
|
|
|
|
// Function-specific metadata
|
|
// <https://searchfox.org/mozilla-central/source/devtools/server/actors/object/previewers.js>
|
|
dictionary FunctionPreview {
|
|
DOMString name;
|
|
DOMString displayName;
|
|
required sequence<DOMString> parameterNames;
|
|
required boolean isAsync;
|
|
required boolean isGenerator;
|
|
};
|