mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #24742 - servo:jdm-patch-34, r=asajeffrey
Reduce unnecesarily large borrow in script thread - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #24730 - [x] There are tests for these changes
This commit is contained in:
commit
901fef5fa9
152 changed files with 429 additions and 289 deletions
|
@ -2538,7 +2538,8 @@ impl ScriptThread {
|
|||
source_origin: ImmutableOrigin,
|
||||
data: StructuredSerializedData,
|
||||
) {
|
||||
match { self.documents.borrow().find_window(pipeline_id) } {
|
||||
let window = self.documents.borrow().find_window(pipeline_id);
|
||||
match window {
|
||||
None => return warn!("postMessage after target pipeline {} closed.", pipeline_id),
|
||||
Some(window) => {
|
||||
// FIXME: synchronously talks to constellation.
|
||||
|
@ -2621,7 +2622,8 @@ impl ScriptThread {
|
|||
history_state_id: Option<HistoryStateId>,
|
||||
url: ServoUrl,
|
||||
) {
|
||||
match { self.documents.borrow().find_window(pipeline_id) } {
|
||||
let window = self.documents.borrow().find_window(pipeline_id);
|
||||
match window {
|
||||
None => {
|
||||
return warn!(
|
||||
"update history state after pipeline {} closed.",
|
||||
|
@ -2637,7 +2639,8 @@ impl ScriptThread {
|
|||
pipeline_id: PipelineId,
|
||||
history_states: Vec<HistoryStateId>,
|
||||
) {
|
||||
match { self.documents.borrow().find_window(pipeline_id) } {
|
||||
let window = self.documents.borrow().find_window(pipeline_id);
|
||||
match window {
|
||||
None => {
|
||||
return warn!(
|
||||
"update history state after pipeline {} closed.",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue