Skip to content

Commit 970a946

Browse files
committed
v8: rename promise tracker function to be consistent across engines
1 parent c39ba6c commit 970a946

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

test-app/app/src/main/assets/internal/ts_helpers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@
422422

423423
if (globalThis.__engine === "V8") {
424424
// Only report errors for promise rejections that go unhandled.
425-
globalThis.__v8UnhandledPromiseRejectionTracker = (
425+
globalThis.onUnhandledPromiseRejectionTracker = (
426426
event,
427427
promise,
428428
reason

test-app/runtime/src/main/cpp/napi/v8/jsr.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ napi_status js_create_napi_env(napi_env *env, napi_runtime runtime) {
9696
v8::Local<v8::Context> context = isolate->GetCurrentContext();
9797
Local<Object> global = context->Global();
9898
Local<Value> callback = global->Get(context, String::NewFromUtf8(isolate,
99-
"__v8UnhandledPromiseRejectionTracker").ToLocalChecked()).ToLocalChecked();
99+
"onUnhandledPromiseRejectionTracker").ToLocalChecked()).ToLocalChecked();
100100
if (value.IsEmpty())
101101
value = Undefined(isolate);
102102
Local<Value> args[] = {event, promise, value};

0 commit comments

Comments
 (0)