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

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

Issue 1203973002: Serializer: clear next link in weak cells. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix asan failure Created 5 years, 6 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 | « src/snapshot/serialize.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-serialize.cc
diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
index 6089e43db7b7025549ef41202073952b234552b5..0bae94e219dfcb7a5f57f4ecc51fbd4c4ff5a263 100644
--- a/test/cctest/test-serialize.cc
+++ b/test/cctest/test-serialize.cc
@@ -1658,6 +1658,31 @@ TEST(SerializeInternalReference) {
}
+TEST(Regress503552) {
+ // Test that the code serializer can deal with weak cells that form a linked
+ // list during incremental marking.
+
+ CcTest::InitializeVM();
+ Isolate* isolate = CcTest::i_isolate();
+
+ HandleScope scope(isolate);
+ Handle<String> source = isolate->factory()->NewStringFromAsciiChecked(
+ "function f() {} function g() {}");
+ ScriptData* script_data = NULL;
+ Handle<SharedFunctionInfo> shared = Compiler::CompileScript(
+ source, Handle<String>(), 0, 0, v8::ScriptOriginOptions(),
+ Handle<Object>(), Handle<Context>(isolate->native_context()), NULL,
+ &script_data, v8::ScriptCompiler::kProduceCodeCache, NOT_NATIVES_CODE,
+ false);
+ delete script_data;
+
+ SimulateIncrementalMarking(isolate->heap());
+
+ script_data = CodeSerializer::Serialize(isolate, shared, source);
+ delete script_data;
+}
+
+
TEST(SerializationMemoryStats) {
FLAG_profile_deserialization = true;
FLAG_always_opt = false;
« no previous file with comments | « src/snapshot/serialize.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698