| Index: runtime/vm/benchmark_test.cc
|
| diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
|
| index ee3ca574a87d49d1e6df0f6d7637b96a64d0a7e6..0f732f9f65f9a9ee58d6b760667ee3e937685a21 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::SNCreate(NULL,
|
| + "import '%s/pkg/compiler/lib/compiler.dart';", dart_root);
|
| Dart_Handle lib = TestCase::LoadTestScript(
|
| script,
|
| reinterpret_cast<Dart_NativeEntryResolver>(NativeResolver));
|
|
|