mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
yay
This commit is contained in:
Submodule src/javascript/jsc/WebKit updated: 1d5ca69e3e...e7d31961d4
@@ -742,7 +742,7 @@ pub fn NewClass(
|
||||
var property_name_refs = std.mem.zeroes([property_names.len]js.JSStringRef);
|
||||
const property_name_literals = property_names;
|
||||
var static_properties = brk: {
|
||||
var props: [property_names.len]js.JSStaticValue = undefined;
|
||||
var props: [property_names.len + 1]js.JSStaticValue = undefined;
|
||||
std.mem.set(
|
||||
js.JSStaticValue,
|
||||
&props,
|
||||
|
||||
@@ -1129,16 +1129,18 @@ pub const Body = struct {
|
||||
} else |err| {}
|
||||
}
|
||||
|
||||
var str = JSValue.fromRef(body_ref).toWTFString(VirtualMachine.vm.global);
|
||||
const len = str.length();
|
||||
if (len == 0) {
|
||||
var str: ZigString = ZigString.Empty;
|
||||
JSValue.fromRef(body_ref).toZigString(&str, VirtualMachine.vm.global);
|
||||
|
||||
if (str.len == 0) {
|
||||
body.value = .{ .String = "" };
|
||||
return body;
|
||||
}
|
||||
|
||||
body.value = Value{ .String = str.characters8()[0..len] };
|
||||
body.ptr = @intToPtr([*]u8, @ptrToInt(body.value.String.ptr));
|
||||
body.len = body.value.String.len;
|
||||
body.value = Value{ .String = str.slice() };
|
||||
// body.ptr = body.
|
||||
// body.len = body.value.String.len;str.characters8()[0..len] };
|
||||
|
||||
return body;
|
||||
},
|
||||
.kJSTypeObject => {
|
||||
|
||||
Reference in New Issue
Block a user