OLD | NEW |
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 Loading... |
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 |
OLD | NEW |