mirror of
https://github.com/servo/servo.git
synced 2025-07-25 08:10:21 +01:00
Implemented GetCachedMessages
This commit is contained in:
parent
be6c251e4c
commit
b5f74eb54c
6 changed files with 102 additions and 88 deletions
|
@ -11,6 +11,9 @@
|
|||
|
||||
#![allow(non_snake_case)]
|
||||
|
||||
#[macro_use]
|
||||
extern crate bitflags;
|
||||
|
||||
extern crate msg;
|
||||
extern crate rustc_serialize;
|
||||
extern crate url;
|
||||
|
@ -118,6 +121,7 @@ pub enum DevtoolScriptControlMsg {
|
|||
GetDocumentElement(PipelineId, Sender<NodeInfo>),
|
||||
GetChildren(PipelineId, String, Sender<Vec<NodeInfo>>),
|
||||
GetLayout(PipelineId, String, Sender<(f32, f32)>),
|
||||
GetCachedMessages(PipelineId, CachedConsoleMessageTypes, Sender<Vec<CachedConsoleMessage>>),
|
||||
ModifyAttribute(PipelineId, String, Vec<Modification>),
|
||||
WantsLiveNotifications(PipelineId, bool),
|
||||
SetTimelineMarkers(PipelineId, Vec<TimelineMarkerType>, Sender<TimelineMarker>),
|
||||
|
@ -156,6 +160,42 @@ pub enum ConsoleMessage {
|
|||
},
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
flags CachedConsoleMessageTypes: u8 {
|
||||
const PAGE_ERROR = 1 << 0,
|
||||
const CONSOLE_API = 1 << 1,
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(RustcEncodable)]
|
||||
pub enum CachedConsoleMessage {
|
||||
PageError {
|
||||
__type__: String,
|
||||
errorMessage: String,
|
||||
sourceName: String,
|
||||
lineText: String,
|
||||
lineNumber: u32,
|
||||
columnNumber: u32,
|
||||
category: String,
|
||||
timeStamp: u64,
|
||||
error: bool,
|
||||
warning: bool,
|
||||
exception: bool,
|
||||
strict: bool,
|
||||
private: bool,
|
||||
},
|
||||
ConsoleAPI {
|
||||
__type__: String,
|
||||
level: String,
|
||||
filename: String,
|
||||
lineNumber: u32,
|
||||
functionName: String,
|
||||
timeStamp: u64,
|
||||
private: bool,
|
||||
arguments: Vec<String>,
|
||||
},
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum NetworkEvent {
|
||||
HttpRequest(Url, Method, Headers, Option<Vec<u8>>),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue