[K/N] Some strange fix to make wasm target happy
This commit is contained in:
committed by
Space Team
parent
1906a41d9a
commit
cf80a86855
@@ -60,6 +60,7 @@ void HandleCurrentExceptionWhenLeavingKotlinCode() {
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
#if !KONAN_NO_EXCEPTIONS
|
||||||
class {
|
class {
|
||||||
/**
|
/**
|
||||||
* Timeout 5 sec for concurrent (second) terminate attempt to give a chance the first one to finish.
|
* Timeout 5 sec for concurrent (second) terminate attempt to give a chance the first one to finish.
|
||||||
@@ -81,9 +82,13 @@ class {
|
|||||||
_Exit(EXIT_FAILURE); // force exit
|
_Exit(EXIT_FAILURE); // force exit
|
||||||
}
|
}
|
||||||
} concurrentTerminateWrapper;
|
} concurrentTerminateWrapper;
|
||||||
|
#endif
|
||||||
|
|
||||||
void RUNTIME_NORETURN terminateWithUnhandledException(KRef exception) {
|
void RUNTIME_NORETURN terminateWithUnhandledException(KRef exception) {
|
||||||
kotlin::AssertThreadState(kotlin::ThreadState::kRunnable);
|
kotlin::AssertThreadState(kotlin::ThreadState::kRunnable);
|
||||||
|
#if KONAN_NO_EXCEPTIONS
|
||||||
|
RuntimeCheck(false, "Exceptions unsupported");
|
||||||
|
#else
|
||||||
concurrentTerminateWrapper([exception]() {
|
concurrentTerminateWrapper([exception]() {
|
||||||
ReportUnhandledException(exception);
|
ReportUnhandledException(exception);
|
||||||
#if KONAN_REPORT_BACKTRACE_TO_IOS_CRASH_LOG
|
#if KONAN_REPORT_BACKTRACE_TO_IOS_CRASH_LOG
|
||||||
@@ -91,6 +96,7 @@ void RUNTIME_NORETURN terminateWithUnhandledException(KRef exception) {
|
|||||||
#endif
|
#endif
|
||||||
konan::abort();
|
konan::abort();
|
||||||
});
|
});
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void processUnhandledException(KRef exception) noexcept {
|
void processUnhandledException(KRef exception) noexcept {
|
||||||
|
|||||||
Reference in New Issue
Block a user