Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve devtools experience when navigating #26325

Merged
merged 7 commits into from Apr 28, 2020

Move some console-related message types into the console code.

  • Loading branch information
jdm committed Apr 28, 2020
commit b9bf9f873b22952a1f21d2d23c16cf833d020d37
@@ -13,8 +13,8 @@ use crate::actors::object::ObjectActor;
use crate::actors::worker::WorkerActor;
use crate::protocol::JsonPacketStream;
use crate::UniqueId;
use crate::{ConsoleAPICall, ConsoleMessage, ConsoleMsg, PageErrorMsg};
use devtools_traits::CachedConsoleMessage;
use devtools_traits::ConsoleMessage;
use devtools_traits::EvaluateJSReply::{ActorValue, BooleanValue, StringValue};
use devtools_traits::EvaluateJSReply::{NullValue, NumberValue, VoidValue};
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),
}

#[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)]
struct NetworkEventMsg {
from: String,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.