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

Unified Diff: runtime/vm/benchmark_test.cc

Issue 1331623002: Uses SNPRINT macro where possible. Otherwise uses #define for format. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add missing include Created 5 years, 3 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 | « no previous file | runtime/vm/coverage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/benchmark_test.cc
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index ee3ca574a87d49d1e6df0f6d7637b96a64d0a7e6..36dfae27797d72ec5a02f76271019f3f8ce867b7 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -354,12 +354,8 @@ BENCHMARK(Dart2JSCompileAll) {
char* script = NULL;
if (dart_root != NULL) {
HANDLESCOPE(thread);
- const char* kFormatStr =
- "import '%s/pkg/compiler/lib/compiler.dart';";
- intptr_t len = OS::SNPrint(NULL, 0, kFormatStr, dart_root) + 1;
- script = reinterpret_cast<char*>(malloc(len));
- EXPECT(script != NULL);
- OS::SNPrint(script, len, kFormatStr, dart_root);
+ script = OS::SCreate(NULL,
+ "import '%s/pkg/compiler/lib/compiler.dart';", dart_root);
Dart_Handle lib = TestCase::LoadTestScript(
script,
reinterpret_cast<Dart_NativeEntryResolver>(NativeResolver));
« no previous file with comments | « no previous file | runtime/vm/coverage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698