Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(728)

Unified Diff: runtime/vm/bootstrap.cc

Issue 1135173008: Fix for bug 23484 (obscure error when a compilation error happens during Object::Init()) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: fix-comment Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/bootstrap.cc
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index 0d61bdc580184e5a141af281c96224a26c3c872a..b844d0143fe8eabe712eb45536fb00ade464df10 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -234,10 +234,10 @@ static RawError* LoadPatchFiles(Isolate* isolate,
patch_file_uri = String::New(patch_files[j]);
source = GetLibrarySource(lib, patch_file_uri, true);
if (source.IsNull()) {
- return Api::UnwrapErrorHandle(
- isolate,
- Api::NewError("Unable to find dart patch source for %s",
- patch_file_uri.ToCString())).raw();
+ const String& message = String::Handle(
+ String::NewFormatted("Unable to find dart patch source for %s",
+ patch_file_uri.ToCString()));
+ return ApiError::New(message);
}
// Prepend the patch library URI to form a unique script URI for the patch.
strings.SetAt(2, patch_file_uri);
@@ -292,9 +292,10 @@ RawError* Bootstrap::LoadandCompileScripts() {
ASSERT(!lib.IsNull());
source = GetLibrarySource(lib, uri, false);
if (source.IsNull()) {
- error ^= Api::UnwrapErrorHandle(
- isolate, Api::NewError("Unable to find dart source for %s",
- uri.ToCString())).raw();
+ const String& message = String::Handle(
+ String::NewFormatted("Unable to find dart source for %s",
+ uri.ToCString()));
+ error ^= ApiError::New(message);
break;
}
script = Script::New(uri, source, RawScript::kLibraryTag);
« no previous file with comments | « no previous file | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698