mirror of
https://github.com/servo/servo.git
synced 2025-06-21 07:38:59 +01:00
Move script local_data_pop out of dtor
Fixes #570, which was caused by a second reentrant call to the dtor.
This commit is contained in:
parent
cca33c2027
commit
4fd6ad3d5c
2 changed files with 6 additions and 13 deletions
|
@ -254,12 +254,10 @@ impl Constellation {
|
|||
// Don't navigate on Navigate type, because that is handled by forward/back
|
||||
match pipeline.navigation_type.get() {
|
||||
constellation_msg::Load => {
|
||||
let _evicted = self.navigation_context.navigate(id);
|
||||
/* FIXME(tkuehn): the following code causes a segfault
|
||||
let evicted = self.navigation_context.navigate(id);
|
||||
for evicted.iter().advance |id| {
|
||||
self.pipelines.get(id).exit();
|
||||
}
|
||||
*/
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
|
|
|
@ -167,15 +167,6 @@ pub fn task_from_context(js_context: *JSContext) -> *mut ScriptTask {
|
|||
}
|
||||
}
|
||||
|
||||
#[unsafe_destructor]
|
||||
impl Drop for ScriptTask {
|
||||
fn drop(&self) {
|
||||
unsafe {
|
||||
let _ = local_data::local_data_pop(global_script_context_key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl ScriptTask {
|
||||
/// Creates a new script task.
|
||||
pub fn new(id: uint,
|
||||
|
@ -362,7 +353,11 @@ impl ScriptTask {
|
|||
frame.document.teardown();
|
||||
}
|
||||
|
||||
self.layout_chan.send(layout_interface::ExitMsg)
|
||||
self.layout_chan.send(layout_interface::ExitMsg);
|
||||
|
||||
unsafe {
|
||||
let _ = local_data::local_data_pop(global_script_context_key);
|
||||
}
|
||||
}
|
||||
|
||||
/// The entry point to document loading. Defines bindings, sets up the window and document
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue