mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-30 15:41:48 +00:00
migrate to htmlRunne (plus zig fmt)
This commit is contained in:
@@ -331,18 +331,16 @@ pub fn Env(comptime State: type, comptime WebApis: type) type {
|
||||
|
||||
fn promiseRejectCallback(v8_msg: v8.C_PromiseRejectMessage) callconv(.c) void {
|
||||
const msg = v8.PromiseRejectMessage.initFromC(v8_msg);
|
||||
const isolate = msg.getPromise().toObject().getIsolate();
|
||||
const isolate = msg.getPromise().toObject().getIsolate();
|
||||
const v8_context = isolate.getCurrentContext();
|
||||
const context: *JsContext = @ptrFromInt(v8_context.getEmbedderData(1).castTo(v8.BigInt).getUint64());
|
||||
|
||||
const value =
|
||||
if (msg.getValue()) |v8_value| valueToString(context.call_arena, v8_value, isolate, v8_context) catch |err| @errorName(err)
|
||||
else "no value";
|
||||
if (msg.getValue()) |v8_value| valueToString(context.call_arena, v8_value, isolate, v8_context) catch |err| @errorName(err) else "no value";
|
||||
|
||||
log.debug(.js, "unhandled rejection", .{.value =value});
|
||||
log.debug(.js, "unhandled rejection", .{ .value = value });
|
||||
}
|
||||
|
||||
|
||||
// ExecutionWorld closely models a JS World.
|
||||
// https://chromium.googlesource.com/chromium/src/+/master/third_party/blink/renderer/bindings/core/v8/V8BindingDesign.md#World
|
||||
// https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/scripting/ExecutionWorld
|
||||
|
||||
Reference in New Issue
Block a user