mirror of
https://github.com/servo/servo
synced 2026-05-05 06:32:13 +02:00
script: Implement creating and running classic scripts according to spec (#41109)
Implemented spec algorithms [create a classic script](https://html.spec.whatwg.org/multipage/#creating-a-classic-script) and [run a classic script](https://html.spec.whatwg.org/multipage/#run-a-classic-script). Classic script now gets unminified on creation. Testing: Behaviour hasn't changed much, but we pass a new test instead of crashing. --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
@@ -104,7 +104,11 @@ impl ModuleObject {
|
||||
pub(crate) struct RethrowError(RootedTraceableBox<Heap<JSVal>>);
|
||||
|
||||
impl RethrowError {
|
||||
fn handle(&self) -> Handle<'_, JSVal> {
|
||||
pub(crate) fn new(val: Box<Heap<JSVal>>) -> Self {
|
||||
Self(RootedTraceableBox::from_box(val))
|
||||
}
|
||||
|
||||
pub(crate) fn handle(&self) -> Handle<'_, JSVal> {
|
||||
self.0.handle()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user