| Index: test/cctest/test-serialize.cc
|
| diff --git a/test/cctest/test-serialize.cc b/test/cctest/test-serialize.cc
|
| index 6089e43db7b7025549ef41202073952b234552b5..ba59e87641c9503e2c3a82d502c1ec4b2f370736 100644
|
| --- a/test/cctest/test-serialize.cc
|
| +++ b/test/cctest/test-serialize.cc
|
| @@ -1658,6 +1658,29 @@ 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);
|
| +
|
| + SimulateIncrementalMarking(isolate->heap());
|
| +
|
| + CodeSerializer::Serialize(isolate, shared, source);
|
| +}
|
| +
|
| +
|
| TEST(SerializationMemoryStats) {
|
| FLAG_profile_deserialization = true;
|
| FLAG_always_opt = false;
|
|
|