Index: runtime/bin/dartutils.h |
=================================================================== |
--- runtime/bin/dartutils.h (revision 14314) |
+++ runtime/bin/dartutils.h (working copy) |
@@ -110,6 +110,13 @@ |
// Create a new Dart OSError object with the provided OS error. |
static Dart_Handle NewDartOSError(OSError* os_error); |
+ // Create a new Dart String object from a C String. |
+ static Dart_Handle NewString(const char* str) { |
+ ASSERT((str != NULL) && (strlen(str) != 0)); |
+ return Dart_NewStringFromUTF8(reinterpret_cast<const uint8_t*>(str), |
+ strlen(str)); |
+ } |
+ |
static void SetOriginalWorkingDirectory(); |
// Global state that stores the original working directory.. |