mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
devtools: Default implementation for handle_message (#41076)
Some cleanup to avoid having to specify an empty `handle_message` method if it is not implemented or not necessary. Removed the TODOs from Environment and Pause since they don't respond to any message. Testing: This patch doesn't change behaviour. Signed-off-by: eri <eri@igalia.com>
This commit is contained in:
@@ -3,11 +3,8 @@
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use serde::Serialize;
|
||||
use serde_json::{Map, Value};
|
||||
|
||||
use crate::StreamId;
|
||||
use crate::actor::{Actor, ActorError, ActorRegistry};
|
||||
use crate::protocol::ClientRequest;
|
||||
use crate::actor::{Actor, ActorRegistry};
|
||||
|
||||
#[derive(Serialize)]
|
||||
pub struct ObjectPreview {
|
||||
@@ -39,17 +36,9 @@ impl Actor for ObjectActor {
|
||||
fn name(&self) -> String {
|
||||
self.name.clone()
|
||||
}
|
||||
fn handle_message(
|
||||
&self,
|
||||
_request: ClientRequest,
|
||||
_: &ActorRegistry,
|
||||
_: &str,
|
||||
_: &Map<String, Value>,
|
||||
_: StreamId,
|
||||
) -> Result<(), ActorError> {
|
||||
// TODO: Handle enumSymbols for console object inspection
|
||||
Err(ActorError::UnrecognizedPacketType)
|
||||
}
|
||||
|
||||
// TODO: Handle messages
|
||||
// https://searchfox.org/firefox-main/source/devtools/shared/specs/object.js
|
||||
}
|
||||
|
||||
impl ObjectActor {
|
||||
|
||||
Reference in New Issue
Block a user