Index: test/cctest/test-strings.cc |
diff --git a/test/cctest/test-strings.cc b/test/cctest/test-strings.cc |
index 7475a8e51e3ad1965b30b588b5bec72598617172..d1f23f75a6bf6b0a3f9de562015a6bef81463b73 100644 |
--- a/test/cctest/test-strings.cc |
+++ b/test/cctest/test-strings.cc |
@@ -1024,7 +1024,8 @@ TEST(JSONStringifySliceMadeExternal) { |
"var underlying = 'abcdefghijklmnopqrstuvwxyz';" |
"underlying")->ToString(CcTest::isolate()); |
v8::Handle<v8::String> slice = CompileRun( |
- "var slice = underlying.slice(1);" |
+ "var slice = '';" |
+ "slice = underlying.slice(1);" |
"slice")->ToString(CcTest::isolate()); |
CHECK(v8::Utils::OpenHandle(*slice)->IsSlicedString()); |
CHECK(v8::Utils::OpenHandle(*underlying)->IsSeqOneByteString()); |
@@ -1183,7 +1184,7 @@ TEST(SliceFromSlice) { |
v8::Local<v8::Value> result; |
Handle<String> string; |
const char* init = "var str = 'abcdefghijklmnopqrstuvwxyz';"; |
- const char* slice = "var slice = str.slice(1,-1); slice"; |
+ const char* slice = "var slice = ''; slice = str.slice(1,-1); slice"; |
const char* slice_from_slice = "slice.slice(1,-1);"; |
CompileRun(init); |