mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Move some console-related message types into the console code.
This commit is contained in:
parent
565e9432c6
commit
b9bf9f873b
2 changed files with 27 additions and 27 deletions
|
@ -13,8 +13,8 @@ use crate::actors::object::ObjectActor;
|
||||||
use crate::actors::worker::WorkerActor;
|
use crate::actors::worker::WorkerActor;
|
||||||
use crate::protocol::JsonPacketStream;
|
use crate::protocol::JsonPacketStream;
|
||||||
use crate::UniqueId;
|
use crate::UniqueId;
|
||||||
use crate::{ConsoleAPICall, ConsoleMessage, ConsoleMsg, PageErrorMsg};
|
|
||||||
use devtools_traits::CachedConsoleMessage;
|
use devtools_traits::CachedConsoleMessage;
|
||||||
|
use devtools_traits::ConsoleMessage;
|
||||||
use devtools_traits::EvaluateJSReply::{ActorValue, BooleanValue, StringValue};
|
use devtools_traits::EvaluateJSReply::{ActorValue, BooleanValue, StringValue};
|
||||||
use devtools_traits::EvaluateJSReply::{NullValue, NumberValue, VoidValue};
|
use devtools_traits::EvaluateJSReply::{NullValue, NumberValue, VoidValue};
|
||||||
use devtools_traits::{
|
use devtools_traits::{
|
||||||
|
@ -473,3 +473,29 @@ impl Actor for ConsoleActor {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
struct ConsoleAPICall {
|
||||||
|
from: String,
|
||||||
|
#[serde(rename = "type")]
|
||||||
|
type_: String,
|
||||||
|
message: ConsoleMsg,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
struct ConsoleMsg {
|
||||||
|
level: String,
|
||||||
|
timeStamp: u64,
|
||||||
|
arguments: Vec<String>,
|
||||||
|
filename: String,
|
||||||
|
lineNumber: usize,
|
||||||
|
columnNumber: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize)]
|
||||||
|
struct PageErrorMsg {
|
||||||
|
from: String,
|
||||||
|
#[serde(rename = "type")]
|
||||||
|
type_: String,
|
||||||
|
pageError: PageError,
|
||||||
|
}
|
||||||
|
|
|
@ -76,32 +76,6 @@ enum UniqueId {
|
||||||
Worker(WorkerId),
|
Worker(WorkerId),
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Serialize)]
|
|
||||||
struct ConsoleAPICall {
|
|
||||||
from: String,
|
|
||||||
#[serde(rename = "type")]
|
|
||||||
type_: String,
|
|
||||||
message: ConsoleMsg,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Serialize)]
|
|
||||||
struct ConsoleMsg {
|
|
||||||
level: String,
|
|
||||||
timeStamp: u64,
|
|
||||||
arguments: Vec<String>,
|
|
||||||
filename: String,
|
|
||||||
lineNumber: usize,
|
|
||||||
columnNumber: usize,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Serialize)]
|
|
||||||
struct PageErrorMsg {
|
|
||||||
from: String,
|
|
||||||
#[serde(rename = "type")]
|
|
||||||
type_: String,
|
|
||||||
pageError: PageError,
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Serialize)]
|
#[derive(Serialize)]
|
||||||
struct NetworkEventMsg {
|
struct NetworkEventMsg {
|
||||||
from: String,
|
from: String,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue