| 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 17048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 17059 intptr_t size_with_garbage = CcTest::heap()->SizeOfObjects(); | 17059 intptr_t size_with_garbage = CcTest::heap()->SizeOfObjects(); |
| 17060 CHECK_GT(size_with_garbage, initial_size + MB); | 17060 CHECK_GT(size_with_garbage, initial_size + MB); |
| 17061 bool finished = false; | 17061 bool finished = false; |
| 17062 for (int i = 0; i < 200 && !finished; i++) { | 17062 for (int i = 0; i < 200 && !finished; i++) { |
| 17063 finished = v8::V8::IdleNotification(kShortIdlePauseInMs); | 17063 finished = v8::V8::IdleNotification(kShortIdlePauseInMs); |
| 17064 } | 17064 } |
| 17065 intptr_t final_size = CcTest::heap()->SizeOfObjects(); | 17065 intptr_t final_size = CcTest::heap()->SizeOfObjects(); |
| 17066 CHECK_LT(final_size, initial_size + 1); | 17066 CHECK_LT(final_size, initial_size + 1); |
| 17067 } | 17067 } |
| 17068 | 17068 |
| 17069 |
| 17070 TEST(Regress2333) { |
| 17071 LocalContext env; |
| 17072 for (int i = 0; i < 3; i++) { |
| 17073 CcTest::heap()->PerformScavenge(); |
| 17074 } |
| 17075 } |
| 17076 |
| 17069 static uint32_t* stack_limit; | 17077 static uint32_t* stack_limit; |
| 17070 | 17078 |
| 17071 static void GetStackLimitCallback( | 17079 static void GetStackLimitCallback( |
| 17072 const v8::FunctionCallbackInfo<v8::Value>& args) { | 17080 const v8::FunctionCallbackInfo<v8::Value>& args) { |
| 17073 stack_limit = reinterpret_cast<uint32_t*>( | 17081 stack_limit = reinterpret_cast<uint32_t*>( |
| 17074 CcTest::i_isolate()->stack_guard()->real_climit()); | 17082 CcTest::i_isolate()->stack_guard()->real_climit()); |
| 17075 } | 17083 } |
| 17076 | 17084 |
| 17077 | 17085 |
| 17078 // Uses the address of a local variable to determine the stack top now. | 17086 // Uses the address of a local variable to determine the stack top now. |
| (...skipping 3632 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 20711 } | 20719 } |
| 20712 for (int i = 0; i < runs; i++) { | 20720 for (int i = 0; i < runs; i++) { |
| 20713 Local<String> expected; | 20721 Local<String> expected; |
| 20714 if (i != 0) { | 20722 if (i != 0) { |
| 20715 CHECK_EQ(v8_str("escape value"), values[i]); | 20723 CHECK_EQ(v8_str("escape value"), values[i]); |
| 20716 } else { | 20724 } else { |
| 20717 CHECK(values[i].IsEmpty()); | 20725 CHECK(values[i].IsEmpty()); |
| 20718 } | 20726 } |
| 20719 } | 20727 } |
| 20720 } | 20728 } |
| OLD | NEW |