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

Side by Side Diff: runtime/bin/directory.cc

Issue 9189003: Move assert.h/assert.cc from runtime/vm to runtime/platform (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Check for correct rebase Created 8 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/file_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "bin/dartutils.h"
6 #include "bin/directory.h" 5 #include "bin/directory.h"
7 6
7 #include "bin/dartutils.h"
8 #include "include/dart_api.h" 8 #include "include/dart_api.h"
9 #include "platform/assert.h"
9 10
10 static intptr_t GetHandlerPort(Dart_Handle handle) { 11 static intptr_t GetHandlerPort(Dart_Handle handle) {
11 if (Dart_IsNull(handle)) { 12 if (Dart_IsNull(handle)) {
12 return 0; 13 return 0;
13 } 14 }
14 return DartUtils::GetIntegerInstanceField(handle, DartUtils::kIdFieldName); 15 return DartUtils::GetIntegerInstanceField(handle, DartUtils::kIdFieldName);
15 } 16 }
16 17
17 18
18 void FUNCTION_NAME(Directory_List)(Dart_NativeArguments args) { 19 void FUNCTION_NAME(Directory_List)(Dart_NativeArguments args) {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 Dart_EnterScope(); 122 Dart_EnterScope();
122 Dart_Handle path = Dart_GetNativeArgument(args, 0); 123 Dart_Handle path = Dart_GetNativeArgument(args, 0);
123 if (Dart_IsString(path)) { 124 if (Dart_IsString(path)) {
124 bool deleted = Directory::Delete(DartUtils::GetStringValue(path)); 125 bool deleted = Directory::Delete(DartUtils::GetStringValue(path));
125 Dart_SetReturnValue(args, Dart_NewBoolean(deleted)); 126 Dart_SetReturnValue(args, Dart_NewBoolean(deleted));
126 } else { 127 } else {
127 Dart_SetReturnValue(args, Dart_NewBoolean(false)); 128 Dart_SetReturnValue(args, Dart_NewBoolean(false));
128 } 129 }
129 Dart_ExitScope(); 130 Dart_ExitScope();
130 } 131 }
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/file_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698