diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-03-16 13:36:53 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-16 18:36:53 +0100 |
commit | 29c9a5c90d88eba5da88ea41e681e7dd7ec170b7 (patch) | |
tree | 146b0c2df9a31c3f1d9517b99203425e40730bf4 /runtime/build.rs | |
parent | b99c431ac78810034ea57cc778bf57d627998aa9 (diff) |
refactor: reorder op initialization (#18228)
To be able to preserve "Deno.core.ops" we need to ensure that
ops are registered in the same order in various places, otherwise
we will get mismatch in external references ordering.
Prerequisite for https://github.com/denoland/deno/pull/18080
Diffstat (limited to 'runtime/build.rs')
-rw-r--r-- | runtime/build.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/runtime/build.rs b/runtime/build.rs index 3392f5c13..978fdda51 100644 --- a/runtime/build.rs +++ b/runtime/build.rs @@ -250,11 +250,12 @@ mod startup_snapshot { )) .build(); + // NOTE(bartlomieju): ordering is important here, keep it in sync with + // `runtime/worker.rs`, `runtime/web_worker.rs` and `cli/build.rs`! let mut extensions: Vec<Extension> = vec![ deno_webidl::init_esm(), deno_console::init_esm(), deno_url::init_ops_and_esm(), - deno_tls::init_ops(), deno_web::init_ops_and_esm::<Permissions>( deno_web::BlobStore::default(), Default::default(), @@ -278,6 +279,7 @@ mod startup_snapshot { None, false, // No --unstable. None, ), + deno_tls::init_ops(), deno_napi::init_ops::<Permissions>(), deno_http::init_ops_and_esm(), deno_io::init_ops_and_esm(Default::default()), |