Version 2.12.0-68.0.dev
Merge commit '465614119595e1a46aa0a96b37d575a2d2dabfd0' into 'dev'
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 18a32b7..a9e660f 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -19,6 +19,7 @@
#include "vm/kernel_isolate.h"
#include "vm/kernel_loader.h"
#include "vm/log.h"
+#include "vm/longjump.h"
#include "vm/object.h"
#include "vm/object_store.h"
#include "vm/parser.h"
@@ -1099,20 +1100,25 @@
const String& root_lib_url) {
Thread* thread = Thread::Current();
- const Object& tmp = kernel::KernelLoader::LoadEntireProgram(program);
- if (tmp.IsError()) {
- return tmp.raw();
- }
+ LongJumpScope jump;
+ if (setjmp(*jump.Set()) == 0) {
+ const Object& tmp = kernel::KernelLoader::LoadEntireProgram(program);
+ if (tmp.IsError()) {
+ return tmp.raw();
+ }
- // If main method disappeared or were not there to begin with then
- // KernelLoader will return null. In this case lookup library by
- // URL.
- auto& lib = Library::Handle(Library::RawCast(tmp.raw()));
- if (lib.IsNull()) {
- lib = Library::LookupLibrary(thread, root_lib_url);
+ // If main method disappeared or were not there to begin with then
+ // KernelLoader will return null. In this case lookup library by
+ // URL.
+ auto& lib = Library::Handle(Library::RawCast(tmp.raw()));
+ if (lib.IsNull()) {
+ lib = Library::LookupLibrary(thread, root_lib_url);
+ }
+ isolate_->object_store()->set_root_library(lib);
+ return Object::null();
+ } else {
+ return thread->StealStickyError();
}
- isolate_->object_store()->set_root_library(lib);
- return Object::null();
}
void IsolateReloadContext::ReloadPhase3FinalizeLoading() {
diff --git a/tools/VERSION b/tools/VERSION
index af266e6..fc8d925 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 12
PATCH 0
-PRERELEASE 67
+PRERELEASE 68
PRERELEASE_PATCH 0
\ No newline at end of file