aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/devtools.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-12-08 12:12:40 -0500
committerGitHub <noreply@github.com>2019-12-08 12:12:40 -0500
commit136366bf641f08590ba60cbe2fa98ecc3181a98e (patch)
tree9e726e31e8a1448cce839a93aa25d54573b6a3fe /components/script/devtools.rs
parentf2b363b3f006c90d77c7cc04f72ef00e676fa23a (diff)
parentb3b886e837792bc130d3514bef4d8619aed4c41d (diff)
downloadservo-136366bf641f08590ba60cbe2fa98ecc3181a98e.tar.gz
servo-136366bf641f08590ba60cbe2fa98ecc3181a98e.zip
Auto merge of #25161 - paulrouget:cachedMsgs, r=jdm
devtools: save and send cached messages @jdm the only real difference between your original patch and this PR is the removal of the `GetCachedMessages` messages that are not necessary anymore now that we directly send the message to the devtools. --- <!-- 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 #13161 (GitHub issue number if applicable)
Diffstat (limited to 'components/script/devtools.rs')
-rw-r--r--components/script/devtools.rs48
1 files changed, 1 insertions, 47 deletions
diff --git a/components/script/devtools.rs b/components/script/devtools.rs
index 7ae02dd3e1f..401a56ea089 100644
--- a/components/script/devtools.rs
+++ b/components/script/devtools.rs
@@ -18,9 +18,7 @@ use crate::dom::globalscope::GlobalScope;
use crate::dom::node::{window_from_node, Node, ShadowIncluding};
use crate::dom::window::Window;
use crate::script_thread::Documents;
-use devtools_traits::TimelineMarkerType;
-use devtools_traits::{AutoMargins, CachedConsoleMessage, CachedConsoleMessageTypes};
-use devtools_traits::{ComputedNodeLayout, ConsoleAPI, PageError};
+use devtools_traits::{AutoMargins, ComputedNodeLayout, TimelineMarkerType};
use devtools_traits::{EvaluateJSReply, Modification, NodeInfo, TimelineMarker};
use ipc_channel::ipc::IpcSender;
use js::jsval::UndefinedValue;
@@ -182,50 +180,6 @@ fn determine_auto_margins(window: &Window, node: &Node) -> AutoMargins {
}
}
-pub fn handle_get_cached_messages(
- _pipeline_id: PipelineId,
- message_types: CachedConsoleMessageTypes,
- reply: IpcSender<Vec<CachedConsoleMessage>>,
-) {
- // TODO: check the messageTypes against a global Cache for console messages and page exceptions
- let mut messages = Vec::new();
- if message_types.contains(CachedConsoleMessageTypes::PAGE_ERROR) {
- // TODO: make script error reporter pass all reported errors
- // to devtools and cache them for returning here.
- let msg = PageError {
- type_: "PageError".to_owned(),
- errorMessage: "page error test".to_owned(),
- sourceName: String::new(),
- lineText: String::new(),
- lineNumber: 0,
- columnNumber: 0,
- category: String::new(),
- timeStamp: 0,
- error: false,
- warning: false,
- exception: false,
- strict: false,
- private: false,
- };
- messages.push(CachedConsoleMessage::PageError(msg));
- }
- if message_types.contains(CachedConsoleMessageTypes::CONSOLE_API) {
- // TODO: do for real
- let msg = ConsoleAPI {
- type_: "ConsoleAPI".to_owned(),
- level: "error".to_owned(),
- filename: "http://localhost/~mihai/mozilla/test.html".to_owned(),
- lineNumber: 0,
- functionName: String::new(),
- timeStamp: 0,
- private: false,
- arguments: vec!["console error test".to_owned()],
- };
- messages.push(CachedConsoleMessage::ConsoleAPI(msg));
- }
- reply.send(messages).unwrap();
-}
-
pub fn handle_modify_attribute(
documents: &Documents,
pipeline: PipelineId,