aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/javascript.zig
diff options
context:
space:
mode:
authorGravatar Ciro Spaciari <ciro.spaciari@gmail.com> 2023-02-15 19:20:40 -0300
committerGravatar GitHub <noreply@github.com> 2023-02-15 14:20:40 -0800
commit597053ea91a83ed0ce98bf1b8bb59fbf282c3619 (patch)
tree51141e81e587d8ce747fe81fb6064f5740d5bc40 /src/bun.js/javascript.zig
parent1c221d33b0def3810c262bd19a4bf8060389dae0 (diff)
downloadbun-597053ea91a83ed0ce98bf1b8bb59fbf282c3619.tar.gz
bun-597053ea91a83ed0ce98bf1b8bb59fbf282c3619.tar.zst
bun-597053ea91a83ed0ce98bf1b8bb59fbf282c3619.zip
feat(fetch) AbortSignal (#2019)
* add fetch abort signal * get aborted (still segfaults) * bidings.zig u0 error * still GC/memory error * fix start crash * fix AbortSignal fromJS * change fromJS to obj.as * addAbortSignalEventListenner * handle abort types, and add tests * fix tests * add custom reason test * merge 2 substring methods, use MAKE_STATIC_STRING_IMPL * fix create AbortError and TimeoutError, move globalThis and exception creation to main thread * fix tests and rebuild headers * no need to check with substring reason is already an exception * no need to check with substring reason is already an exception * fix dumb error inverting conditions for check reason * fix custom reason behavior
Diffstat (limited to 'src/bun.js/javascript.zig')
-rw-r--r--src/bun.js/javascript.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig
index b926c4ee9..a5ef4a44a 100644
--- a/src/bun.js/javascript.zig
+++ b/src/bun.js/javascript.zig
@@ -1150,7 +1150,7 @@ pub const VirtualMachine = struct {
const after_namespace = if (namespace.len == 0)
specifier
else
- specifier.substring(namespace.len + 1);
+ specifier.substring(namespace.len + 1, specifier.len);
if (plugin_runner.onResolveJSC(ZigString.init(namespace), after_namespace, source, .bun)) |resolved_path| {
res.* = resolved_path;