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

Unified Diff: runtime/bin/directory.cc

Issue 23702037: Fix error handling when current working directory is deleted. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix type of _Directory._current Created 7 years, 3 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/bin/directory_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/directory.cc
diff --git a/runtime/bin/directory.cc b/runtime/bin/directory.cc
index 0f771eecbdf38cde1ef019fd9b56c05e459db771..c7b499a4906c929faa64117611c0a2962fdedc96 100644
--- a/runtime/bin/directory.cc
+++ b/runtime/bin/directory.cc
@@ -26,6 +26,10 @@ void FUNCTION_NAME(Directory_Current)(Dart_NativeArguments args) {
if (current != NULL) {
Dart_SetReturnValue(args, DartUtils::NewString(current));
free(current);
+ } else {
+ Dart_Handle err = DartUtils::NewDartOSError();
+ if (Dart_IsError(err)) Dart_PropagateError(err);
+ Dart_SetReturnValue(args, err);
}
}
« no previous file with comments | « no previous file | runtime/bin/directory_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698