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

Unified Diff: runtime/vm/bootstrap.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/include/dart_api.h ('k') | 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
===================================================================
--- runtime/vm/bootstrap.cc (revision 28804)
+++ runtime/vm/bootstrap.cc (working copy)
@@ -166,8 +166,8 @@
isolate, GetLibrarySource(lib, uri, false));
const String& lib_uri = String::Handle(isolate, lib.url());
if (part_source.IsNull()) {
- return Dart_NewApiError("Unable to read part file '%s' of library '%s'",
- uri.ToCString(), lib_uri.ToCString());
+ return Api::NewError("Unable to read part file '%s' of library '%s'",
+ uri.ToCString(), lib_uri.ToCString());
}
// Prepend the library URI to form a unique script URI for the part.
@@ -190,10 +190,10 @@
Dart_Handle uri) {
Isolate* isolate = Isolate::Current();
if (!Dart_IsLibrary(library)) {
- return Dart_NewApiError("not a library");
+ return Api::NewError("not a library");
}
if (!Dart_IsString(uri)) {
- return Dart_NewApiError("uri is not a string");
+ return Api::NewError("uri is not a string");
}
if (tag == Dart_kCanonicalizeUrl) {
// In the boot strap loader we do not try and do any canonicalization.
@@ -207,8 +207,8 @@
// We have precreated all the bootstrap library objects hence
// we do not expect to be called back with the tag set to kImportTag.
// The bootstrap process explicitly loads all the libraries one by one.
- return Dart_NewApiError("Invalid import of '%s' in a bootstrap library",
- uri_str.ToCString());
+ return Api::NewError("Invalid import of '%s' in a bootstrap library",
+ uri_str.ToCString());
}
ASSERT(tag == Dart_kSourceTag);
const Library& lib = Api::UnwrapLibraryHandle(isolate, library);
« no previous file with comments | « runtime/include/dart_api.h ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698