@@ -8,7 +8,7 @@ use ctor::ctor;
8
8
use deno_core:: error:: AnyError ;
9
9
use deno_core:: url:: Url ;
10
10
use deno_core:: {
11
- located_script_name, serde_v8, JsRuntime , ModuleCode , ModuleId , PollEventLoopOptions ,
11
+ located_script_name, serde_v8, JsRuntime , ModuleCodeString , ModuleId , PollEventLoopOptions ,
12
12
RuntimeOptions ,
13
13
} ;
14
14
use deno_http:: DefaultHttpPropertyExtractor ;
@@ -247,6 +247,8 @@ impl DenoRuntime {
247
247
Arc :: new( deno_web:: BlobStore :: default ( ) ) ,
248
248
None ,
249
249
) ,
250
+ deno_webgpu:: deno_webgpu:: init_ops( ) ,
251
+ deno_canvas:: deno_canvas:: init_ops( ) ,
250
252
deno_fetch:: deno_fetch:: init_ops:: <Permissions >( deno_fetch:: Options {
251
253
user_agent: user_agent. clone( ) ,
252
254
root_cert_store_provider: Some ( root_cert_store_provider. clone( ) ) ,
@@ -319,7 +321,7 @@ impl DenoRuntime {
319
321
) ;
320
322
321
323
js_runtime
322
- . execute_script ( located_script_name ! ( ) , ModuleCode :: from ( script) )
324
+ . execute_script ( located_script_name ! ( ) , ModuleCodeString :: from ( script) )
323
325
. expect ( "Failed to execute bootstrap script" ) ;
324
326
325
327
{
@@ -539,7 +541,7 @@ fn set_v8_flags() {
539
541
mod test {
540
542
use crate :: deno_runtime:: DenoRuntime ;
541
543
use crate :: rt_worker:: worker:: UnixStreamEntry ;
542
- use deno_core:: { FastString , ModuleCode , PollEventLoopOptions } ;
544
+ use deno_core:: { FastString , ModuleCodeString , PollEventLoopOptions } ;
543
545
use sb_graph:: emitter:: EmitterFactory ;
544
546
use sb_graph:: { generate_binary_eszip, EszipPayloadKind } ;
545
547
use sb_workers:: context:: {
@@ -634,7 +636,7 @@ mod test {
634
636
. js_runtime
635
637
. execute_script (
636
638
"<anon>" ,
637
- ModuleCode :: from (
639
+ ModuleCodeString :: from (
638
640
r#"
639
641
globalThis.isTenEven;
640
642
"#
@@ -695,7 +697,7 @@ mod test {
695
697
. js_runtime
696
698
. execute_script (
697
699
"<anon>" ,
698
- ModuleCode :: from (
700
+ ModuleCodeString :: from (
699
701
r#"
700
702
globalThis.isTenEven;
701
703
"#
@@ -798,7 +800,7 @@ mod test {
798
800
. js_runtime
799
801
. execute_script (
800
802
"<anon>" ,
801
- ModuleCode :: from (
803
+ ModuleCodeString :: from (
802
804
r#"
803
805
Deno.readTextFileSync("./test_cases/readFile/hello_world.json");
804
806
"#
@@ -853,7 +855,7 @@ mod test {
853
855
. js_runtime
854
856
. execute_script (
855
857
"<anon>" ,
856
- ModuleCode :: from (
858
+ ModuleCodeString :: from (
857
859
r#"
858
860
// Should not be able to set
859
861
const data = {
@@ -947,7 +949,7 @@ mod test {
947
949
948
950
let user_rt_execute_scripts = user_rt. js_runtime . execute_script (
949
951
"<anon>" ,
950
- ModuleCode :: from (
952
+ ModuleCodeString :: from (
951
953
r#"
952
954
let cmd = new Deno.Command("", {});
953
955
cmd.outputSync();
@@ -980,7 +982,7 @@ mod test {
980
982
. js_runtime
981
983
. execute_script (
982
984
"<anon>" ,
983
- ModuleCode :: from (
985
+ ModuleCodeString :: from (
984
986
r#"
985
987
// Should not be able to set
986
988
Deno.env.set("Supa_Test", "Supa_Value");
@@ -998,7 +1000,7 @@ mod test {
998
1000
. js_runtime
999
1001
. execute_script (
1000
1002
"<anon>" ,
1001
- ModuleCode :: from (
1003
+ ModuleCodeString :: from (
1002
1004
r#"
1003
1005
// Should not be able to set
1004
1006
Deno.env.get("Supa_Test");
@@ -1017,7 +1019,7 @@ mod test {
1017
1019
. js_runtime
1018
1020
. execute_script (
1019
1021
"<anon>" ,
1020
- ModuleCode :: from (
1022
+ ModuleCodeString :: from (
1021
1023
r#"
1022
1024
// Should not be able to set
1023
1025
Deno.env.get("Supa_Test");
0 commit comments