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

Side by Side Diff: test/cctest/test-serialize.cc

Issue 1999753002: [heap] Harden heap-related cctests (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix for win Created 4 years, 7 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 unified diff | Download patch
« no previous file with comments | « test/cctest/test-dictionary.cc ('k') | test/cctest/test-slots-buffer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2007-2010 the V8 project authors. All rights reserved. 1 // Copyright 2007-2010 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 29 matching lines...) Expand all
40 #include "src/objects.h" 40 #include "src/objects.h"
41 #include "src/parsing/parser.h" 41 #include "src/parsing/parser.h"
42 #include "src/runtime/runtime.h" 42 #include "src/runtime/runtime.h"
43 #include "src/snapshot/code-serializer.h" 43 #include "src/snapshot/code-serializer.h"
44 #include "src/snapshot/deserializer.h" 44 #include "src/snapshot/deserializer.h"
45 #include "src/snapshot/natives.h" 45 #include "src/snapshot/natives.h"
46 #include "src/snapshot/partial-serializer.h" 46 #include "src/snapshot/partial-serializer.h"
47 #include "src/snapshot/snapshot.h" 47 #include "src/snapshot/snapshot.h"
48 #include "src/snapshot/startup-serializer.h" 48 #include "src/snapshot/startup-serializer.h"
49 #include "test/cctest/cctest.h" 49 #include "test/cctest/cctest.h"
50 #include "test/cctest/heap/utils-inl.h" 50 #include "test/cctest/heap/heap-utils.h"
51 51
52 using namespace v8::internal; 52 using namespace v8::internal;
53 53
54 void DisableTurbofan() { 54 void DisableTurbofan() {
55 const char* flag = "--turbo-filter=\"\""; 55 const char* flag = "--turbo-filter=\"\"";
56 FlagList::SetFlagsFromString(flag, StrLength(flag)); 56 FlagList::SetFlagsFromString(flag, StrLength(flag));
57 } 57 }
58 58
59 59
60 // TestIsolate is used for testing isolate serialization. 60 // TestIsolate is used for testing isolate serialization.
(...skipping 1760 matching lines...) Expand 10 before | Expand all | Expand 10 after
1821 Handle<String> source = isolate->factory()->NewStringFromAsciiChecked( 1821 Handle<String> source = isolate->factory()->NewStringFromAsciiChecked(
1822 "function f() {} function g() {}"); 1822 "function f() {} function g() {}");
1823 ScriptData* script_data = NULL; 1823 ScriptData* script_data = NULL;
1824 Handle<SharedFunctionInfo> shared = Compiler::GetSharedFunctionInfoForScript( 1824 Handle<SharedFunctionInfo> shared = Compiler::GetSharedFunctionInfoForScript(
1825 source, Handle<String>(), 0, 0, v8::ScriptOriginOptions(), 1825 source, Handle<String>(), 0, 0, v8::ScriptOriginOptions(),
1826 Handle<Object>(), Handle<Context>(isolate->native_context()), NULL, 1826 Handle<Object>(), Handle<Context>(isolate->native_context()), NULL,
1827 &script_data, v8::ScriptCompiler::kProduceCodeCache, NOT_NATIVES_CODE, 1827 &script_data, v8::ScriptCompiler::kProduceCodeCache, NOT_NATIVES_CODE,
1828 false); 1828 false);
1829 delete script_data; 1829 delete script_data;
1830 1830
1831 SimulateIncrementalMarking(isolate->heap()); 1831 heap::SimulateIncrementalMarking(isolate->heap());
1832 1832
1833 script_data = CodeSerializer::Serialize(isolate, shared, source); 1833 script_data = CodeSerializer::Serialize(isolate, shared, source);
1834 delete script_data; 1834 delete script_data;
1835 } 1835 }
1836 1836
1837 #if V8_TARGET_ARCH_X64 1837 #if V8_TARGET_ARCH_X64
1838 TEST(CodeSerializerCell) { 1838 TEST(CodeSerializerCell) {
1839 FLAG_serialize_toplevel = true; 1839 FLAG_serialize_toplevel = true;
1840 LocalContext context; 1840 LocalContext context;
1841 Isolate* isolate = CcTest::i_isolate(); 1841 Isolate* isolate = CcTest::i_isolate();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1883 delete script_data; 1883 delete script_data;
1884 } 1884 }
1885 #endif // V8_TARGET_ARCH_X64 1885 #endif // V8_TARGET_ARCH_X64
1886 1886
1887 TEST(SerializationMemoryStats) { 1887 TEST(SerializationMemoryStats) {
1888 FLAG_profile_deserialization = true; 1888 FLAG_profile_deserialization = true;
1889 FLAG_always_opt = false; 1889 FLAG_always_opt = false;
1890 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob(); 1890 v8::StartupData blob = v8::V8::CreateSnapshotDataBlob();
1891 delete[] blob.data; 1891 delete[] blob.data;
1892 } 1892 }
OLDNEW
« no previous file with comments | « test/cctest/test-dictionary.cc ('k') | test/cctest/test-slots-buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698