mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make devtools::handle_evaluate_js take a &GlobalScope
This commit is contained in:
parent
9c04eb60bd
commit
5d8979237b
4 changed files with 5 additions and 9 deletions
|
@ -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) =>
|
||||
|
|
|
@ -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) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue