Make devtools::handle_evaluate_js take a &GlobalScope

This commit is contained in:
Anthony Ramine 2016-10-04 01:28:08 +02:00
parent 9c04eb60bd
commit 5d8979237b
4 changed files with 5 additions and 9 deletions

View file

@ -301,10 +301,9 @@ impl DedicatedWorkerGlobalScope {
fn handle_event(&self, event: MixedMessage) {
match event {
MixedMessage::FromDevtools(msg) => {
let global_ref = GlobalRef::Worker(self.upcast());
match msg {
DevtoolScriptControlMsg::EvaluateJS(_pipe_id, string, sender) =>
devtools::handle_evaluate_js(&global_ref, string, sender),
devtools::handle_evaluate_js(self.upcast(), string, sender),
DevtoolScriptControlMsg::GetCachedMessages(pipe_id, message_types, sender) =>
devtools::handle_get_cached_messages(pipe_id, message_types, sender),
DevtoolScriptControlMsg::WantsLiveNotifications(_pipe_id, bool_val) =>

View file

@ -206,10 +206,9 @@ impl ServiceWorkerGlobalScope {
fn handle_event(&self, event: MixedMessage) -> bool {
match event {
MixedMessage::FromDevtools(msg) => {
let global_ref = GlobalRef::Worker(self.upcast());
match msg {
DevtoolScriptControlMsg::EvaluateJS(_pipe_id, string, sender) =>
devtools::handle_evaluate_js(&global_ref, string, sender),
devtools::handle_evaluate_js(self.upcast(), string, sender),
DevtoolScriptControlMsg::GetCachedMessages(pipe_id, message_types, sender) =>
devtools::handle_get_cached_messages(pipe_id, message_types, sender),
DevtoolScriptControlMsg::WantsLiveNotifications(_pipe_id, bool_val) =>