Index: runtime/vm/custom_isolate_test.cc |
diff --git a/runtime/vm/custom_isolate_test.cc b/runtime/vm/custom_isolate_test.cc |
index 2cb2e0047b8b967d0ba4a756e9b35c467819fda0..b78ea60c1626eb5d73928c49d42b58efae8e0710 100644 |
--- a/runtime/vm/custom_isolate_test.cc |
+++ b/runtime/vm/custom_isolate_test.cc |
@@ -243,7 +243,7 @@ static Dart_NativeFunction NativeLookup(Dart_Handle name, |
} |
-const char* saved_echo = NULL; |
+char* saved_echo = NULL; |
static void native_echo(Dart_NativeArguments args) { |
Dart_EnterScope(); |
Dart_Handle arg = Dart_GetNativeArgument(args, 0); |
@@ -252,7 +252,7 @@ static void native_echo(Dart_NativeArguments args) { |
const char* c_str = NULL; |
EXPECT_VALID(Dart_StringToCString(toString, &c_str)); |
if (saved_echo) { |
- free(const_cast<char*>(saved_echo)); |
+ free(saved_echo); |
} |
saved_echo = strdup(c_str); |
OS::Print("-- (isolate=%p) %s\n", Dart_CurrentIsolate(), c_str); |
@@ -350,7 +350,7 @@ UNIT_TEST_CASE(CustomIsolates) { |
} |
OS::Print("-- Finished event loop --\n"); |
EXPECT_STREQ("Received: 43", saved_echo); |
- free(const_cast<char*>(saved_echo)); |
+ free(saved_echo); |
delete event_queue; |
event_queue = NULL; |