{"action":"created","issue":{"url":"https://api.github.com/repos/servo/servo/issues/13161","repository_url":"https://api.github.com/repos/servo/servo","labels_url":"https://api.github.com/repos/servo/servo/issues/13161/labels{/name}","comments_url":"https://api.github.com/repos/servo/servo/issues/13161/comments","events_url":"https://api.github.com/repos/servo/servo/issues/13161/events","html_url":"https://github.com/servo/servo/issues/13161","id":174696702,"node_id":"MDU6SXNzdWUxNzQ2OTY3MDI=","number":13161,"title":"Report errors to devtools","user":{"login":"Ms2ger","id":111161,"node_id":"MDQ6VXNlcjExMTE2MQ==","avatar_url":"https://avatars1.githubusercontent.com/u/111161?v=4","gravatar_id":"","url":"https://api.github.com/users/Ms2ger","html_url":"https://github.com/Ms2ger","followers_url":"https://api.github.com/users/Ms2ger/followers","following_url":"https://api.github.com/users/Ms2ger/following{/other_user}","gists_url":"https://api.github.com/users/Ms2ger/gists{/gist_id}","starred_url":"https://api.github.com/users/Ms2ger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ms2ger/subscriptions","organizations_url":"https://api.github.com/users/Ms2ger/orgs","repos_url":"https://api.github.com/users/Ms2ger/repos","events_url":"https://api.github.com/users/Ms2ger/events{/privacy}","received_events_url":"https://api.github.com/users/Ms2ger/received_events","type":"User","site_admin":false},"labels":[{"id":15997600,"node_id":"MDU6TGFiZWwxNTk5NzYwMA==","url":"https://api.github.com/repos/servo/servo/labels/A-content/dom","name":"A-content/dom","color":"d7e102","default":false},{"id":132819984,"node_id":"MDU6TGFiZWwxMzI4MTk5ODQ=","url":"https://api.github.com/repos/servo/servo/labels/A-devtools","name":"A-devtools","color":"d7e102","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-02T07:23:31Z","updated_at":"2018-09-10T17:07:00Z","closed_at":null,"author_association":"CONTRIBUTOR","body":""},"comment":{"url":"https://api.github.com/repos/servo/servo/issues/comments/419987562","html_url":"https://github.com/servo/servo/issues/13161#issuecomment-419987562","issue_url":"https://api.github.com/repos/servo/servo/issues/13161","id":419987562,"node_id":"MDEyOklzc3VlQ29tbWVudDQxOTk4NzU2Mg==","user":{"login":"AnshulMalik","id":7821757,"node_id":"MDQ6VXNlcjc4MjE3NTc=","avatar_url":"https://avatars1.githubusercontent.com/u/7821757?v=4","gravatar_id":"","url":"https://api.github.com/users/AnshulMalik","html_url":"https://github.com/AnshulMalik","followers_url":"https://api.github.com/users/AnshulMalik/followers","following_url":"https://api.github.com/users/AnshulMalik/following{/other_user}","gists_url":"https://api.github.com/users/AnshulMalik/gists{/gist_id}","starred_url":"https://api.github.com/users/AnshulMalik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnshulMalik/subscriptions","organizations_url":"https://api.github.com/users/AnshulMalik/orgs","repos_url":"https://api.github.com/users/AnshulMalik/repos","events_url":"https://api.github.com/users/AnshulMalik/events{/privacy}","received_events_url":"https://api.github.com/users/AnshulMalik/received_events","type":"User","site_admin":false},"created_at":"2018-09-10T17:07:00Z","updated_at":"2018-09-10T17:07:00Z","author_association":"CONTRIBUTOR","body":"Can we do this?\r\n\r\n```\r\n\r\ndiff --git a/components/script/dom/globalscope.rs b/components/script/dom/globalscope.rs\r\nindex 596530058e..427529af92 100644\r\n--- a/components/script/dom/globalscope.rs\r\n+++ b/components/script/dom/globalscope.rs\r\n@@ -1,8 +1,8 @@\r\n /* This Source Code Form is subject to the terms of the Mozilla Public\r\n  * License, v. 2.0. If a copy of the MPL was not distributed with this\r\n  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\r\n-\r\n use devtools_traits::{ScriptToDevtoolsControlMsg, WorkerId};\r\n+use dom::console;\r\n use dom::bindings::cell::DomRefCell;\r\n use dom::bindings::codegen::Bindings::EventSourceBinding::EventSourceBinding::EventSourceMethods;\r\n use dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;\r\n@@ -377,10 +377,15 @@ impl GlobalScope {\r\n \r\n         // Step 9.\r\n         if event_status == EventStatus::NotCanceled {\r\n+\r\n+            let messages = vec![error_info.message.as_str().into()];\r\n+            console::Console::Error(&self, messages); \r\n+\r\n             // https://html.spec.whatwg.org/multipage/#runtime-script-errors-2\r\n             if let Some(dedicated) = self.downcast::<DedicatedWorkerGlobalScope>() {\r\n                 dedicated.forward_error_to_worker_object(error_info);\r\n             }\r\n+\r\n         }\r\n \r\n     }\r\n```\r\n\r\nAnd one more, we should be able to send stack trace when error occurs, currently, we are not doing it."}}
{"actor":{"display_login":"AnshulMalik"}}