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

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

Issue 823583002: Version 3.30.33.11 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@3.30
Patch Set: 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 unified diff | Download patch
« no previous file with comments | « src/version.cc ('k') | no next file » | 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 4724 matching lines...) Expand 10 before | Expand all | Expand 10 after
4735 // The following line will update the backing store. 4735 // The following line will update the backing store.
4736 CompileRun( 4736 CompileRun(
4737 "for (var i = 0; i < 50; i++) {" 4737 "for (var i = 0; i < 50; i++) {"
4738 " weak_map.set(future_keys[i], i);" 4738 " weak_map.set(future_keys[i], i);"
4739 "}"); 4739 "}");
4740 heap->incremental_marking()->set_should_hurry(true); 4740 heap->incremental_marking()->set_should_hurry(true);
4741 heap->CollectGarbage(OLD_POINTER_SPACE); 4741 heap->CollectGarbage(OLD_POINTER_SPACE);
4742 } 4742 }
4743 4743
4744 4744
4745 TEST(Regress442710) {
4746 CcTest::InitializeVM();
4747 Isolate* isolate = CcTest::i_isolate();
4748 Heap* heap = isolate->heap();
4749 Factory* factory = isolate->factory();
4750
4751 HandleScope sc(isolate);
4752 Handle<GlobalObject> global(CcTest::i_isolate()->context()->global_object());
4753 Handle<JSArray> array = factory->NewJSArray(2);
4754
4755 Handle<String> name = factory->InternalizeUtf8String("testArray");
4756 JSReceiver::SetProperty(global, name, array, SLOPPY).Check();
4757 CompileRun("testArray[0] = 1; testArray[1] = 2; testArray.shift();");
4758 heap->CollectGarbage(OLD_POINTER_SPACE);
4759 }
4760
4761
4745 #ifdef DEBUG 4762 #ifdef DEBUG
4746 TEST(PathTracer) { 4763 TEST(PathTracer) {
4747 CcTest::InitializeVM(); 4764 CcTest::InitializeVM();
4748 v8::HandleScope scope(CcTest::isolate()); 4765 v8::HandleScope scope(CcTest::isolate());
4749 4766
4750 v8::Local<v8::Value> result = CompileRun("'abc'"); 4767 v8::Local<v8::Value> result = CompileRun("'abc'");
4751 Handle<Object> o = v8::Utils::OpenHandle(*result); 4768 Handle<Object> o = v8::Utils::OpenHandle(*result);
4752 CcTest::i_isolate()->heap()->TracePathToObject(*o); 4769 CcTest::i_isolate()->heap()->TracePathToObject(*o);
4753 } 4770 }
4754 #endif // DEBUG 4771 #endif // DEBUG
OLDNEW
« no previous file with comments | « src/version.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698