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

Unified Diff: runtime/bin/process.cc

Issue 9642003: Start using Dart_SetField and Dart_GetField in the vm. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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/main.cc ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process.cc
===================================================================
--- runtime/bin/process.cc (revision 5182)
+++ runtime/bin/process.cc (working copy)
@@ -20,8 +20,8 @@
// interface. However, only builtin Strings are handled by
// GetStringValue.
if (!Dart_IsString(path_handle)) {
- DartUtils::SetIntegerInstanceField(status_handle, "_errorCode", 0);
- DartUtils::SetStringInstanceField(
+ DartUtils::SetIntegerField(status_handle, "_errorCode", 0);
+ DartUtils::SetStringField(
status_handle, "_errorMessage", "Path must be a builtin string");
Dart_SetReturnValue(args, Dart_NewBoolean(false));
Dart_ExitScope();
@@ -43,8 +43,8 @@
// interface. However, only builtin Strings are handled by
// GetStringValue.
if (!Dart_IsString(arg)) {
- DartUtils::SetIntegerInstanceField(status_handle, "_errorCode", 0);
- DartUtils::SetStringInstanceField(
+ DartUtils::SetIntegerField(status_handle, "_errorCode", 0);
+ DartUtils::SetStringField(
status_handle, "_errorMessage", "Arguments must be builtin strings");
delete[] string_args;
Dart_SetReturnValue(args, Dart_NewBoolean(false));
@@ -60,8 +60,8 @@
working_directory = DartUtils::GetStringValue(working_directory_handle);
} else if (!Dart_IsNull(working_directory_handle)) {
delete[] string_args;
- DartUtils::SetIntegerInstanceField(status_handle, "_errorCode", 0);
- DartUtils::SetStringInstanceField(
+ DartUtils::SetIntegerField(status_handle, "_errorCode", 0);
+ DartUtils::SetStringField(
status_handle, "_errorMessage",
"WorkingDirectory must be a builtin string");
Dart_SetReturnValue(args, Dart_NewBoolean(false));
@@ -87,18 +87,18 @@
&exit_event,
os_error_message, kMaxChildOsErrorMessageLength);
if (error_code == 0) {
- DartUtils::SetIntegerInstanceField(in_handle, DartUtils::kIdFieldName, in);
- DartUtils::SetIntegerInstanceField(
+ DartUtils::SetIntegerField(in_handle, DartUtils::kIdFieldName, in);
+ DartUtils::SetIntegerField(
out_handle, DartUtils::kIdFieldName, out);
- DartUtils::SetIntegerInstanceField(
+ DartUtils::SetIntegerField(
err_handle, DartUtils::kIdFieldName, err);
- DartUtils::SetIntegerInstanceField(
+ DartUtils::SetIntegerField(
exit_handle, DartUtils::kIdFieldName, exit_event);
- DartUtils::SetIntegerInstanceField(process, "_pid", pid);
+ DartUtils::SetIntegerField(process, "_pid", pid);
} else {
- DartUtils::SetIntegerInstanceField(
+ DartUtils::SetIntegerField(
status_handle, "_errorCode", error_code);
- DartUtils::SetStringInstanceField(
+ DartUtils::SetStringField(
status_handle, "_errorMessage", os_error_message);
}
delete[] string_args;
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/bin/socket.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698