script: Tell SpiderMonkey whether scripts are inline

Co-authored-by: atbrakhi <atbrakhi@igalia.com>
Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
Delan Azabani 2025-07-30 20:58:12 +08:00
parent 048d0b0538
commit 615c9ec013
8 changed files with 41 additions and 8 deletions

View file

@ -14,6 +14,7 @@ use std::rc::Rc;
use deny_public_fields::DenyPublicFields;
use dom_struct::dom_struct;
use fnv::FnvHasher;
use js::glue::IntroductionType;
use js::jsapi::JS_GetFunctionObject;
use js::jsval::JSVal;
use js::rust::wrappers::CompileFunction;
@ -642,7 +643,12 @@ impl EventTarget {
let cx = GlobalScope::get_cx();
let options = unsafe {
CompileOptionsWrapper::new(*cx, &handler.url.to_string(), handler.line as u32)
CompileOptionsWrapper::new(
*cx,
&handler.url.to_string(),
handler.line as u32,
IntroductionType::Undefined,
)
};
// Step 3.9, subsection Scope steps 1-6