mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Avoid accessing node global during Node's destructor.
This commit is contained in:
parent
3e95efdea6
commit
1449bac0e1
3 changed files with 42 additions and 13 deletions
|
@ -1403,7 +1403,9 @@ impl Window {
|
|||
// We tear down the active document, which causes all the attached
|
||||
// nodes to dispose of their layout data. This messages the layout
|
||||
// thread, informing it that it can safely free the memory.
|
||||
self.Document().upcast::<Node>().teardown();
|
||||
self.Document()
|
||||
.upcast::<Node>()
|
||||
.teardown(self.layout_chan());
|
||||
|
||||
// Tell the constellation to drop the sender to our message-port router, if there is any.
|
||||
self.upcast::<GlobalScope>().remove_message_ports_router();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue