script: Clean-up IpcSend .sender().send() pattern (#38919)

The IpcSend trait defines a `send()` method, so doing .sender().send()
seems like it just adds a useless clone of the sender, when we could
just `send()` directly.
This only cleans up the direct usages of this pattern, there are more
instances, where a helper method is defined, which returns the
IpcSender, and the only usages also just directly call send.

Testing: No functional changes

Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
Jonathan Schwender 2025-08-25 21:16:12 +02:00 committed by GitHub
parent ddf5f1eb2f
commit b9dc228e51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 1 additions and 11 deletions

View file

@ -128,7 +128,6 @@ impl IDBObjectStore {
self.global() self.global()
.resource_threads() .resource_threads()
.sender()
.send(IndexedDBThreadMsg::Sync(operation)) .send(IndexedDBThreadMsg::Sync(operation))
.unwrap(); .unwrap();

View file

@ -288,7 +288,6 @@ impl IDBOpenDBRequest {
global global
.resource_threads() .resource_threads()
.sender()
.send(IndexedDBThreadMsg::Sync(open_operation)) .send(IndexedDBThreadMsg::Sync(open_operation))
.unwrap(); .unwrap();
} }
@ -320,7 +319,6 @@ impl IDBOpenDBRequest {
global global
.resource_threads() .resource_threads()
.sender()
.send(IndexedDBThreadMsg::Sync(delete_operation)) .send(IndexedDBThreadMsg::Sync(delete_operation))
.unwrap(); .unwrap();
} }

View file

@ -308,7 +308,6 @@ impl IDBRequest {
transaction transaction
.global() .global()
.resource_threads() .resource_threads()
.sender()
.send(IndexedDBThreadMsg::Async( .send(IndexedDBThreadMsg::Async(
global.origin().immutable().clone(), global.origin().immutable().clone(),
transaction.get_db_name().to_string(), transaction.get_db_name().to_string(),

View file

@ -105,7 +105,6 @@ impl IDBTransaction {
global global
.resource_threads() .resource_threads()
.sender()
.send(IndexedDBThreadMsg::Sync(SyncOperation::RegisterNewTxn( .send(IndexedDBThreadMsg::Sync(SyncOperation::RegisterNewTxn(
sender, sender,
global.origin().immutable().clone(), global.origin().immutable().clone(),

View file

@ -356,12 +356,7 @@ impl WindowProxy {
dest: response.new_webview_id, dest: response.new_webview_id,
}; };
document document.global().resource_threads().send(msg).unwrap();
.global()
.resource_threads()
.sender()
.send(msg)
.unwrap();
receiver.recv().unwrap(); receiver.recv().unwrap();
} }
Some(new_window_proxy) Some(new_window_proxy)