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

Unified Diff: runtime/bin/gen_snapshot.cc

Issue 27694005: Fix issue 13942 - Dart_Error function invokes OS::VSNPrint with the "format" string containing data… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « runtime/bin/extensions.cc ('k') | runtime/bin/vmservice_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/gen_snapshot.cc
===================================================================
--- runtime/bin/gen_snapshot.cc (revision 28804)
+++ runtime/bin/gen_snapshot.cc (working copy)
@@ -282,11 +282,11 @@
Dart_Handle library,
Dart_Handle url) {
if (!Dart_IsLibrary(library)) {
- return Dart_Error("not a library");
+ return Dart_NewApiError("not a library");
}
Dart_Handle library_url = Dart_LibraryUrl(library);
if (Dart_IsError(library_url)) {
- return Dart_Error("accessing library url failed");
+ return Dart_NewApiError("accessing library url failed");
}
const char* library_url_string = DartUtils::GetStringValue(library_url);
const char* mapped_library_url_string = DartUtils::MapLibraryUrl(
@@ -297,7 +297,7 @@
}
if (!Dart_IsString(url)) {
- return Dart_Error("url is not a string");
+ return Dart_NewApiError("url is not a string");
}
const char* url_string = DartUtils::GetStringValue(url);
const char* mapped_url_string = DartUtils::MapLibraryUrl(url_mapping,
@@ -322,7 +322,7 @@
return Builtin::LoadAndCheckLibrary(builtinId);
}
ASSERT(tag == Dart_kSourceTag);
- return Dart_Error("Unable to part '%s' ", url_string);
+ return DartUtils::NewError("Unable to part '%s' ", url_string);
}
if (libraryBuiltinId != Builtin::kInvalidLibrary) {
@@ -332,7 +332,7 @@
library, url, Builtin::PartSource(libraryBuiltinId, url_string));
}
ASSERT(tag == Dart_kImportTag);
- return Dart_Error("Unable to import '%s' ", url_string);
+ return DartUtils::NewError("Unable to import '%s' ", url_string);
}
Dart_Handle resolved_url = url;
« no previous file with comments | « runtime/bin/extensions.cc ('k') | runtime/bin/vmservice_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698