Index: runtime/bin/file_system_watcher.cc |
diff --git a/runtime/bin/file_system_watcher.cc b/runtime/bin/file_system_watcher.cc |
index fc7666540041bfdc36da557e77ed7f7f67d1c0aa..a32d62b4acb00fece153ebaaef9f20a551772778 100644 |
--- a/runtime/bin/file_system_watcher.cc |
+++ b/runtime/bin/file_system_watcher.cc |
@@ -6,6 +6,7 @@ |
#include "bin/builtin.h" |
#include "bin/dartutils.h" |
+#include "bin/file.h" |
#include "bin/utils.h" |
#include "include/dart_api.h" |
@@ -14,7 +15,7 @@ namespace dart { |
namespace bin { |
void FUNCTION_NAME(FileSystemWatcher_IsSupported)(Dart_NativeArguments args) { |
- Dart_SetReturnValue(args, Dart_NewBoolean(FileSystemWatcher::IsSupported())); |
+ Dart_SetBooleanReturnValue(args, FileSystemWatcher::IsSupported()); |
} |
void FUNCTION_NAME(FileSystemWatcher_InitWatcher)(Dart_NativeArguments args) { |
@@ -34,14 +35,16 @@ void FUNCTION_NAME(FileSystemWatcher_CloseWatcher)(Dart_NativeArguments args) { |
void FUNCTION_NAME(FileSystemWatcher_WatchPath)(Dart_NativeArguments args) { |
intptr_t id = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 0)); |
- const char* path = DartUtils::GetStringValue(Dart_GetNativeArgument(args, 1)); |
- int events = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 2)); |
- bool recursive = DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 3)); |
- intptr_t path_id = FileSystemWatcher::WatchPath(id, path, events, recursive); |
+ Namespace* namespc = Namespace::GetNamespace(args, 1); |
+ const char* path = DartUtils::GetStringValue(Dart_GetNativeArgument(args, 2)); |
+ int events = DartUtils::GetIntegerValue(Dart_GetNativeArgument(args, 3)); |
+ bool recursive = DartUtils::GetBooleanValue(Dart_GetNativeArgument(args, 4)); |
+ intptr_t path_id = |
+ FileSystemWatcher::WatchPath(id, namespc, path, events, recursive); |
if (path_id == -1) { |
Dart_ThrowException(DartUtils::NewDartOSError()); |
} |
- Dart_SetReturnValue(args, Dart_NewInteger(path_id)); |
+ Dart_SetIntegerReturnValue(args, path_id); |
} |
void FUNCTION_NAME(FileSystemWatcher_UnwatchPath)(Dart_NativeArguments args) { |
@@ -62,7 +65,7 @@ void FUNCTION_NAME(FileSystemWatcher_GetSocketId)(Dart_NativeArguments args) { |
intptr_t id = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 0)); |
intptr_t path_id = DartUtils::GetIntptrValue(Dart_GetNativeArgument(args, 1)); |
int socket_id = FileSystemWatcher::GetSocketId(id, path_id); |
- Dart_SetReturnValue(args, Dart_NewInteger(socket_id)); |
+ Dart_SetIntegerReturnValue(args, socket_id); |
} |
} // namespace bin |