aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-10-08 15:35:29 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-10-09 02:02:46 -0700
commit9294ef73b78a38a4a06e8f16432089a81abc50ea (patch)
tree0527cc7964a62543d797b614a6392ab9041570b7 /src
parent36ec06493e5649374a98d1b4068cd8d89d0a9bf6 (diff)
downloadbun-9294ef73b78a38a4a06e8f16432089a81abc50ea.tar.gz
bun-9294ef73b78a38a4a06e8f16432089a81abc50ea.tar.zst
bun-9294ef73b78a38a4a06e8f16432089a81abc50ea.zip
Update WebKit
Diffstat (limited to 'src')
m---------src/bun.js/WebKit0
-rw-r--r--src/bun.js/bindings/bindings.cpp9
-rw-r--r--src/bun.js/bindings/bindings.zig4
-rw-r--r--src/bun.js/bindings/headers-cpp.h2
-rw-r--r--src/bun.js/bindings/headers.h4
-rw-r--r--src/bun.js/bindings/headers.zig2
-rw-r--r--src/bun.js/javascript.zig2
7 files changed, 15 insertions, 8 deletions
diff --git a/src/bun.js/WebKit b/src/bun.js/WebKit
-Subproject 134e3a7963e8425e45073e48db0181ebd9d0bd1
+Subproject 1f5b5d10dd39b348d481d0b23a8bc2062778abf
diff --git a/src/bun.js/bindings/bindings.cpp b/src/bun.js/bindings/bindings.cpp
index 59a3c43c2..e9965f3ad 100644
--- a/src/bun.js/bindings/bindings.cpp
+++ b/src/bun.js/bindings/bindings.cpp
@@ -895,11 +895,12 @@ bool JSC__JSModuleLoader__checkSyntax(JSC__JSGlobalObject* arg0, const JSC__Sour
return result;
}
JSC__JSValue JSC__JSModuleLoader__evaluate(JSC__JSGlobalObject* globalObject, const unsigned char* arg1,
- size_t arg2, const unsigned char* arg3, size_t arg4,
+ size_t arg2, const unsigned char* originUrlPtr, size_t originURLLen, const unsigned char* referrerUrlPtr, size_t referrerUrlLen,
JSC__JSValue JSValue5, JSC__JSValue* arg6)
{
WTF::String src = WTF::String::fromUTF8(arg1, arg2).isolatedCopy();
- WTF::URL origin = WTF::URL::fileURLWithFileSystemPath(WTF::String(WTF::StringImpl::createWithoutCopying(arg3, arg4))).isolatedCopy();
+ WTF::URL origin = WTF::URL::fileURLWithFileSystemPath(WTF::String::fromUTF8(originUrlPtr, originURLLen)).isolatedCopy();
+ WTF::URL referrer = WTF::URL::fileURLWithFileSystemPath(WTF::String::fromUTF8(referrerUrlPtr, referrerUrlLen)).isolatedCopy();
JSC::VM& vm = globalObject->vm();
@@ -907,7 +908,7 @@ JSC__JSValue JSC__JSModuleLoader__evaluate(JSC__JSGlobalObject* globalObject, co
src, JSC::SourceOrigin { origin }, origin.fileSystemPath(),
WTF::TextPosition(), JSC::SourceProviderSourceType::Module);
globalObject->moduleLoader()->provideFetch(globalObject, jsString(vm, origin.fileSystemPath()), WTFMove(sourceCode));
- auto* promise = JSC::importModule(globalObject, JSC::Identifier::fromString(vm, origin.fileSystemPath()), JSValue(), JSValue());
+ auto* promise = JSC::importModule(globalObject, JSC::Identifier::fromString(vm, origin.fileSystemPath()), JSValue(jsString(vm, referrer.fileSystemPath())), JSValue(), JSValue());
auto scope = DECLARE_THROW_SCOPE(vm);
@@ -927,7 +928,7 @@ JSC__JSValue JSC__JSModuleLoader__evaluate(JSC__JSGlobalObject* globalObject, co
JSC__JSInternalPromise* JSC__JSModuleLoader__importModule(JSC__JSGlobalObject* arg0,
const JSC__Identifier* arg1)
{
- return JSC::importModule(arg0, *arg1, JSC::JSValue {}, JSC::JSValue {});
+ return JSC::importModule(arg0, *arg1, JSC::JSValue {}, JSC::JSValue {}, JSC::JSValue {});
}
JSC__JSValue JSC__JSModuleLoader__linkAndEvaluateModule(JSC__JSGlobalObject* arg0,
const JSC__Identifier* arg1)
diff --git a/src/bun.js/bindings/bindings.zig b/src/bun.js/bindings/bindings.zig
index db48a858f..2dcb3646d 100644
--- a/src/bun.js/bindings/bindings.zig
+++ b/src/bun.js/bindings/bindings.zig
@@ -1315,6 +1315,8 @@ pub const JSModuleLoader = extern struct {
sourceCodeLen: usize,
originUrlPtr: [*]const u8,
originUrlLen: usize,
+ referrerUrlPtr: [*]const u8,
+ referrerUrlLen: usize,
thisValue: JSValue,
exception: [*]JSValue,
) JSValue {
@@ -1324,6 +1326,8 @@ pub const JSModuleLoader = extern struct {
sourceCodeLen,
originUrlPtr,
originUrlLen,
+ referrerUrlPtr,
+ referrerUrlLen,
thisValue,
exception,
});
diff --git a/src/bun.js/bindings/headers-cpp.h b/src/bun.js/bindings/headers-cpp.h
index 2dd59b457..a22987a0c 100644
--- a/src/bun.js/bindings/headers-cpp.h
+++ b/src/bun.js/bindings/headers-cpp.h
@@ -1,4 +1,4 @@
-//-- AUTOGENERATED FILE -- 1665034748
+//-- AUTOGENERATED FILE -- 1665267248
// clang-format off
#pragma once
diff --git a/src/bun.js/bindings/headers.h b/src/bun.js/bindings/headers.h
index e0c818497..f06d534fb 100644
--- a/src/bun.js/bindings/headers.h
+++ b/src/bun.js/bindings/headers.h
@@ -1,5 +1,5 @@
// clang-format off
-//-- AUTOGENERATED FILE -- 1665034748
+//-- AUTOGENERATED FILE -- 1665267248
#pragma once
#include <stddef.h>
@@ -324,7 +324,7 @@ CPP_DECL void Inspector__ScriptArguments__release(Inspector__ScriptArguments* ar
#pragma mark - JSC::JSModuleLoader
CPP_DECL bool JSC__JSModuleLoader__checkSyntax(JSC__JSGlobalObject* arg0, const JSC__SourceCode* arg1, bool arg2);
-CPP_DECL JSC__JSValue JSC__JSModuleLoader__evaluate(JSC__JSGlobalObject* arg0, const unsigned char* arg1, size_t arg2, const unsigned char* arg3, size_t arg4, JSC__JSValue JSValue5, JSC__JSValue* arg6);
+CPP_DECL JSC__JSValue JSC__JSModuleLoader__evaluate(JSC__JSGlobalObject* arg0, const unsigned char* arg1, size_t arg2, const unsigned char* arg3, size_t arg4, const unsigned char* arg5, size_t arg6, JSC__JSValue JSValue7, JSC__JSValue* arg8);
CPP_DECL JSC__JSInternalPromise* JSC__JSModuleLoader__importModule(JSC__JSGlobalObject* arg0, const JSC__Identifier* arg1);
CPP_DECL JSC__JSValue JSC__JSModuleLoader__linkAndEvaluateModule(JSC__JSGlobalObject* arg0, const JSC__Identifier* arg1);
CPP_DECL JSC__JSInternalPromise* JSC__JSModuleLoader__loadAndEvaluateModule(JSC__JSGlobalObject* arg0, const ZigString* arg1);
diff --git a/src/bun.js/bindings/headers.zig b/src/bun.js/bindings/headers.zig
index ba7aa0b0f..0cfe35cff 100644
--- a/src/bun.js/bindings/headers.zig
+++ b/src/bun.js/bindings/headers.zig
@@ -148,7 +148,7 @@ pub extern fn Inspector__ScriptArguments__getFirstArgumentAsString(arg0: [*c]bin
pub extern fn Inspector__ScriptArguments__isEqual(arg0: [*c]bindings.ScriptArguments, arg1: [*c]bindings.ScriptArguments) bool;
pub extern fn Inspector__ScriptArguments__release(arg0: [*c]bindings.ScriptArguments) void;
pub extern fn JSC__JSModuleLoader__checkSyntax(arg0: ?*JSC__JSGlobalObject, arg1: [*c]const JSC__SourceCode, arg2: bool) bool;
-pub extern fn JSC__JSModuleLoader__evaluate(arg0: ?*JSC__JSGlobalObject, arg1: [*c]const u8, arg2: usize, arg3: [*c]const u8, arg4: usize, JSValue5: JSC__JSValue, arg6: [*c]JSC__JSValue) JSC__JSValue;
+pub extern fn JSC__JSModuleLoader__evaluate(arg0: ?*JSC__JSGlobalObject, arg1: [*c]const u8, arg2: usize, arg3: [*c]const u8, arg4: usize, arg5: [*c]const u8, arg6: usize, JSValue7: JSC__JSValue, arg8: [*c]JSC__JSValue) JSC__JSValue;
pub extern fn JSC__JSModuleLoader__importModule(arg0: ?*JSC__JSGlobalObject, arg1: [*c]const JSC__Identifier) [*c]JSC__JSInternalPromise;
pub extern fn JSC__JSModuleLoader__linkAndEvaluateModule(arg0: ?*JSC__JSGlobalObject, arg1: [*c]const JSC__Identifier) JSC__JSValue;
pub extern fn JSC__JSModuleLoader__loadAndEvaluateModule(arg0: ?*JSC__JSGlobalObject, arg1: [*c]const ZigString) [*c]JSC__JSInternalPromise;
diff --git a/src/bun.js/javascript.zig b/src/bun.js/javascript.zig
index 336a24a81..34cd0610d 100644
--- a/src/bun.js/javascript.zig
+++ b/src/bun.js/javascript.zig
@@ -3180,6 +3180,8 @@ pub const ModuleLoader = struct {
wrote.len,
temporary_source.path.text.ptr,
temporary_source.path.text.len,
+ parse_result.source.path.text.ptr,
+ parse_result.source.path.text.len,
JSC.JSValue.jsUndefined(),
&exception,
);