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

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

Issue 851073002: Fix remaining issues in the custom snapshot. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix heap snapshot test expectation Created 5 years, 11 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/cctest.h ('k') | test/cctest/test-heap-profiler.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 5071 matching lines...) Expand 10 before | Expand all | Expand 10 after
5082 Handle<GlobalObject> global(CcTest::i_isolate()->context()->global_object()); 5082 Handle<GlobalObject> global(CcTest::i_isolate()->context()->global_object());
5083 Handle<JSArray> array = factory->NewJSArray(2); 5083 Handle<JSArray> array = factory->NewJSArray(2);
5084 5084
5085 Handle<String> name = factory->InternalizeUtf8String("testArray"); 5085 Handle<String> name = factory->InternalizeUtf8String("testArray");
5086 JSReceiver::SetProperty(global, name, array, SLOPPY).Check(); 5086 JSReceiver::SetProperty(global, name, array, SLOPPY).Check();
5087 CompileRun("testArray[0] = 1; testArray[1] = 2; testArray.shift();"); 5087 CompileRun("testArray[0] = 1; testArray[1] = 2; testArray.shift();");
5088 heap->CollectGarbage(OLD_POINTER_SPACE); 5088 heap->CollectGarbage(OLD_POINTER_SPACE);
5089 } 5089 }
5090 5090
5091 5091
5092 TEST(NumberStringCacheSize) {
5093 CcTest::InitializeVM();
5094 Isolate* isolate = CcTest::i_isolate();
5095 Heap* heap = isolate->heap();
5096 // Test that the number-string cache has not been resized.
5097 CHECK_EQ(TestHeap::kInitialNumberStringCacheSize * 2,
5098 heap->number_string_cache()->length());
5099 }
5100
5101
5092 #ifdef DEBUG 5102 #ifdef DEBUG
5093 TEST(PathTracer) { 5103 TEST(PathTracer) {
5094 CcTest::InitializeVM(); 5104 CcTest::InitializeVM();
5095 v8::HandleScope scope(CcTest::isolate()); 5105 v8::HandleScope scope(CcTest::isolate());
5096 5106
5097 v8::Local<v8::Value> result = CompileRun("'abc'"); 5107 v8::Local<v8::Value> result = CompileRun("'abc'");
5098 Handle<Object> o = v8::Utils::OpenHandle(*result); 5108 Handle<Object> o = v8::Utils::OpenHandle(*result);
5099 CcTest::i_isolate()->heap()->TracePathToObject(*o); 5109 CcTest::i_isolate()->heap()->TracePathToObject(*o);
5100 } 5110 }
5101 #endif // DEBUG 5111 #endif // DEBUG
OLDNEW
« no previous file with comments | « test/cctest/cctest.h ('k') | test/cctest/test-heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698