mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Handle script private reference hooks properly
This commit is contained in:
parent
c2feaf14d5
commit
08723b0e37
2 changed files with 23 additions and 5 deletions
|
@ -2608,7 +2608,7 @@ impl GlobalScope {
|
|||
if GetScriptPrivate(*compiled_script).is_undefined() {
|
||||
debug!("Set script private for {}", script_base_url);
|
||||
|
||||
let module_script_data = Box::new(ModuleScript::new(
|
||||
let module_script_data = Rc::new(ModuleScript::new(
|
||||
script_base_url,
|
||||
fetch_options,
|
||||
// We can't initialize an module owner here because
|
||||
|
@ -2619,7 +2619,7 @@ impl GlobalScope {
|
|||
|
||||
SetScriptPrivate(
|
||||
*compiled_script,
|
||||
&PrivateValue(Box::into_raw(module_script_data) as *const _),
|
||||
&PrivateValue(Rc::into_raw(module_script_data) as *const _),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue