mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Fewer clones
This commit is contained in:
parent
69881e8b06
commit
3f440bd6dc
1 changed files with 4 additions and 2 deletions
|
@ -613,9 +613,11 @@ impl HTMLScriptElement {
|
||||||
// Step 25.
|
// Step 25.
|
||||||
assert!(!text.is_empty());
|
assert!(!text.is_empty());
|
||||||
|
|
||||||
|
let text_rc = Rc::new(text);
|
||||||
|
|
||||||
// Step 25-1. & 25-2.
|
// Step 25-1. & 25-2.
|
||||||
let result = Ok(ScriptOrigin::internal(
|
let result = Ok(ScriptOrigin::internal(
|
||||||
Rc::new(text.clone()),
|
Rc::clone(&text_rc),
|
||||||
base_url.clone(),
|
base_url.clone(),
|
||||||
script_type.clone(),
|
script_type.clone(),
|
||||||
));
|
));
|
||||||
|
@ -649,7 +651,7 @@ impl HTMLScriptElement {
|
||||||
|
|
||||||
fetch_inline_module_script(
|
fetch_inline_module_script(
|
||||||
ModuleOwner::Window(Trusted::new(self)),
|
ModuleOwner::Window(Trusted::new(self)),
|
||||||
Rc::new(text.clone()),
|
Rc::clone(&text_rc),
|
||||||
base_url.clone(),
|
base_url.clone(),
|
||||||
self.id.clone(),
|
self.id.clone(),
|
||||||
credentials_mode.unwrap(),
|
credentials_mode.unwrap(),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue