Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/native/libs/Common/JavaScript/cross-module/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,10 @@ export function dotnetUpdateInternalsSubscriber() {
addOnExitListener: table[14],
abortStartup: table[15],
quitNow: table[16],
normalizeException: table[17],
fetchSatelliteAssemblies: table[18],
fetchLazyAssembly: table[19],
exit: table[17],
normalizeException: table[18],
fetchSatelliteAssemblies: table[19],
fetchLazyAssembly: table[20],
Comment thread
pavelsavara marked this conversation as resolved.
};
Object.assign(dotnetLoaderExports, loaderExportsLocal);
Object.assign(logger, loggerLocal);
Expand Down
2 changes: 2 additions & 0 deletions src/native/libs/Common/JavaScript/loader/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export function dotnetInitializeModule(): RuntimeAPI {
addOnExitListener,
abortStartup,
quitNow,
exit,
normalizeException,
fetchSatelliteAssemblies,
fetchLazyAssembly,
Expand Down Expand Up @@ -115,6 +116,7 @@ export function dotnetInitializeModule(): RuntimeAPI {
dotnetLoaderExports.addOnExitListener,
dotnetLoaderExports.abortStartup,
dotnetLoaderExports.quitNow,
dotnetLoaderExports.exit,
dotnetLoaderExports.normalizeException,
dotnetLoaderExports.fetchSatelliteAssemblies,
dotnetLoaderExports.fetchLazyAssembly,
Comment thread
pavelsavara marked this conversation as resolved.
Expand Down
4 changes: 3 additions & 1 deletion src/native/libs/Common/JavaScript/types/exchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import type { EmsAmbientSymbolsType } from "../types";

import type { check, error, info, warn, debug, fastCheck, normalizeException } from "../loader/logging";
import type { resolveRunMainPromise, rejectRunMainPromise, getRunMainPromise, abortStartup } from "../loader/run";
import type { addOnExitListener, isExited, isRuntimeRunning, quitNow } from "../loader/exit";
import type { addOnExitListener, exit, isExited, isRuntimeRunning, quitNow } from "../loader/exit";

import type { initializeCoreCLR } from "../host/host";
import type { instantiateWasm, installVfsFile, registerDllBytes, loadIcuData, registerPdbBytes, instantiateWebcilModule } from "../host/assets";
Expand Down Expand Up @@ -77,6 +77,7 @@ export type LoaderExports = {
addOnExitListener: typeof addOnExitListener,
abortStartup: typeof abortStartup,
quitNow: typeof quitNow,
exit: typeof exit,
normalizeException: typeof normalizeException,
fetchSatelliteAssemblies: typeof fetchSatelliteAssemblies,
fetchLazyAssembly: typeof fetchLazyAssembly,
Expand All @@ -100,6 +101,7 @@ export type LoaderExportsTable = [
typeof addOnExitListener,
typeof abortStartup,
typeof quitNow,
typeof exit,
typeof normalizeException,
typeof fetchSatelliteAssemblies,
typeof fetchLazyAssembly,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,11 @@ export class PromiseHolder extends ManagedObject {
// so that managed user code running in the continuation could allocate the same GCHandle number and the local registry would be already ok with that
completeTask(this.gc_handle, reason, data, this.res_converter);
} catch (ex) {
// there is no point to propagate the exception into the unhandled promise rejection
try {
dotnetLoaderExports.exit(1, ex);
} catch {
// there is no point to propagate the exception into the unhandled promise rejection
}
}
}
}
Loading