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

Unified Diff: test/cctest/test-strings.cc

Issue 804993002: Internalize strings being stored into uninitialized property cells (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: addressed comment Created 6 years 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 | « src/objects.cc ('k') | test/mjsunit/regress/regress-1757.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/objects.cc ('k') | test/mjsunit/regress/regress-1757.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698