diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2021-02-17 13:47:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-17 13:47:18 -0500 |
commit | c7dabc99eed50fa20cdcafd7c0175ab615da3d50 (patch) | |
tree | ec2c611c627827bbdd61d3e27400ae1b9a50d459 /core/bindings.rs | |
parent | f6d6b24506410816833d802e1a8d9cd704f73289 (diff) |
Make ModuleSpecifier a type alias, not wrapper struct (#9531)
Diffstat (limited to 'core/bindings.rs')
-rw-r--r-- | core/bindings.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/core/bindings.rs b/core/bindings.rs index 08f244166..1f6b85174 100644 --- a/core/bindings.rs +++ b/core/bindings.rs @@ -454,9 +454,11 @@ fn eval_context( } */ let tc_scope = &mut v8::TryCatch::new(scope); - let name = - v8::String::new(tc_scope, url.as_ref().map_or("<unknown>", Url::as_str)) - .unwrap(); + let name = v8::String::new( + tc_scope, + url.as_ref().map_or(crate::DUMMY_SPECIFIER, Url::as_str), + ) + .unwrap(); let origin = script_origin(tc_scope, name); let maybe_script = v8::Script::compile(tc_scope, source, Some(&origin)); |