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

Unified Diff: runtime/bin/dartutils.cc

Issue 13896034: Add the ability to change the working directory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed tests Created 7 years, 8 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/builtin_natives.cc ('k') | runtime/bin/directory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 3379b168ffde450f56e81d021b2dc8ee873ba2ac..a803fca4e4deee78074326eb7962123d808c39d1 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -566,9 +566,13 @@ Dart_Handle DartUtils::NewDartExceptionWithMessage(const char* library_url,
const char* message) {
// Create a Dart Exception object with a message.
Dart_Handle clazz = GetDartClass(library_url, exception_name);
- Dart_Handle args[1];
- args[0] = NewString(message);
- return Dart_New(clazz, Dart_Null(), 1, args);
+ if (message != NULL) {
+ Dart_Handle args[1];
+ args[0] = NewString(message);
+ return Dart_New(clazz, Dart_Null(), 1, args);
+ } else {
+ return Dart_New(clazz, Dart_Null(), 0, NULL);
+ }
}
« no previous file with comments | « runtime/bin/builtin_natives.cc ('k') | runtime/bin/directory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698