servo: Merge #13138 - Console message packets should have a '_type' attribute (from jsnajdr:master); r=nox
authorJarda Snajdr <jsnajdr@gmail.com>
Wed, 31 Aug 2016 08:33:36 -0500
changeset 339623 885fe6909dfdfa47c8a1b4e24467ec8571a69cfb
parent 339622 22245bbe1c11631271bd1441a62edcec1e910c05
child 339624 47ca329945f7b1147186aed6a00f00dd87521034
push id31307
push usergszorc@mozilla.com
push dateSat, 04 Feb 2017 00:59:06 +0000
treeherdermozilla-central@94079d43835f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnox
servo: Merge #13138 - Console message packets should have a '_type' attribute (from jsnajdr:master); r=nox <!-- Please describe your changes on the following line: --> Renamed the `type_` attribute of `PageError` and `ConsoleAPI` structs to make them correct Firefox RDP packets. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #13137 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because devtools component doesn't have any <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> Source-Repo: https://github.com/servo/servo Source-Revision: e542dcf883b2fe10d47d97d2e729da818a2876aa
servo/components/devtools_traits/lib.rs
--- a/servo/components/devtools_traits/lib.rs
+++ b/servo/components/devtools_traits/lib.rs
@@ -247,17 +247,17 @@ bitflags! {
     pub flags CachedConsoleMessageTypes: u8 {
         const PAGE_ERROR  = 1 << 0,
         const CONSOLE_API = 1 << 1,
     }
 }
 
 #[derive(Deserialize, Serialize)]
 pub struct PageError {
-    #[serde(rename = "type")]
+    #[serde(rename = "_type")]
     pub type_: String,
     pub errorMessage: String,
     pub sourceName: String,
     pub lineText: String,
     pub lineNumber: u32,
     pub columnNumber: u32,
     pub category: String,
     pub timeStamp: u64,
@@ -265,17 +265,17 @@ pub struct PageError {
     pub warning: bool,
     pub exception: bool,
     pub strict: bool,
     pub private: bool,
 }
 
 #[derive(Deserialize, Serialize)]
 pub struct ConsoleAPI {
-    #[serde(rename = "type")]
+    #[serde(rename = "_type")]
     pub type_: String,
     pub level: String,
     pub filename: String,
     pub lineNumber: u32,
     pub functionName: String,
     pub timeStamp: u64,
     pub private: bool,
     pub arguments: Vec<String>,