mirror of
https://github.com/servo/servo
synced 2026-04-26 01:25:32 +02:00
script: Preserve the order of entries when parsing an import map (#42754)
Unless the feature `preserve_order` is enabled, serde_json will sort the map's entries in an alphanumerical order. The specification instead expect the entries to be visited by the order they are listed, a latter entry should replace a previous one when they are resolved to the same url. I've also removed a couple of `CanGc` introduced in #37405, unless I've missed something there is not code that can trigger a GC. Testing: A subtest now pass Part of #37553 --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
@@ -934,7 +934,6 @@ impl HTMLScriptElement {
|
||||
ModuleOwner::Window(Trusted::new(self)),
|
||||
Rc::clone(&text_rc),
|
||||
base_url.clone(),
|
||||
can_gc,
|
||||
);
|
||||
let script = Script::ImportMap(ScriptOrigin::internal(
|
||||
text_rc,
|
||||
|
||||
Reference in New Issue
Block a user