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

Unified Diff: runtime/vm/zone.cc

Issue 9691005: Implement spawnFunction from the new isolate api. (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
Index: runtime/vm/zone.cc
===================================================================
--- runtime/vm/zone.cc (revision 5367)
+++ runtime/vm/zone.cc (working copy)
@@ -243,4 +243,21 @@
}
}
+
+char* Zone::PrintToString(const char* format, ...) {
+ va_list args;
+ va_start(args, format);
+ intptr_t len = OS::VSNPrint(NULL, 0, format, args);
+ va_end(args);
+
+ char* buffer = reinterpret_cast<char*>(Allocate(len + 1));
+ va_list args2;
+ va_start(args2, format);
+ OS::VSNPrint(buffer, (len + 1), format, args2);
+ va_end(args2);
+
+ return buffer;
+}
+
+
} // namespace dart
« lib/isolate/isolate_api.dart ('K') | « runtime/vm/zone.h ('k') | runtime/vm/zone_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698