Skip to content

Commit 2ff016f

Browse files
author
Dart CI
committed
Version 2.12.0-68.0.dev
Merge commit '465614119595e1a46aa0a96b37d575a2d2dabfd0' into 'dev'
2 parents d189db6 + 4656141 commit 2ff016f

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

runtime/vm/isolate_reload.cc

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "vm/kernel_isolate.h"
2020
#include "vm/kernel_loader.h"
2121
#include "vm/log.h"
22+
#include "vm/longjump.h"
2223
#include "vm/object.h"
2324
#include "vm/object_store.h"
2425
#include "vm/parser.h"
@@ -1099,20 +1100,25 @@ ObjectPtr IsolateReloadContext::ReloadPhase2LoadKernel(
10991100
const String& root_lib_url) {
11001101
Thread* thread = Thread::Current();
11011102

1102-
const Object& tmp = kernel::KernelLoader::LoadEntireProgram(program);
1103-
if (tmp.IsError()) {
1104-
return tmp.raw();
1105-
}
1103+
LongJumpScope jump;
1104+
if (setjmp(*jump.Set()) == 0) {
1105+
const Object& tmp = kernel::KernelLoader::LoadEntireProgram(program);
1106+
if (tmp.IsError()) {
1107+
return tmp.raw();
1108+
}
11061109

1107-
// If main method disappeared or were not there to begin with then
1108-
// KernelLoader will return null. In this case lookup library by
1109-
// URL.
1110-
auto& lib = Library::Handle(Library::RawCast(tmp.raw()));
1111-
if (lib.IsNull()) {
1112-
lib = Library::LookupLibrary(thread, root_lib_url);
1110+
// If main method disappeared or were not there to begin with then
1111+
// KernelLoader will return null. In this case lookup library by
1112+
// URL.
1113+
auto& lib = Library::Handle(Library::RawCast(tmp.raw()));
1114+
if (lib.IsNull()) {
1115+
lib = Library::LookupLibrary(thread, root_lib_url);
1116+
}
1117+
isolate_->object_store()->set_root_library(lib);
1118+
return Object::null();
1119+
} else {
1120+
return thread->StealStickyError();
11131121
}
1114-
isolate_->object_store()->set_root_library(lib);
1115-
return Object::null();
11161122
}
11171123

11181124
void IsolateReloadContext::ReloadPhase3FinalizeLoading() {

tools/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ CHANNEL dev
2727
MAJOR 2
2828
MINOR 12
2929
PATCH 0
30-
PRERELEASE 67
30+
PRERELEASE 68
3131
PRERELEASE_PATCH 0

0 commit comments

Comments
 (0)