| 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 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 } | 243 } |
| 244 #endif | 244 #endif |
| 245 | 245 |
| 246 | 246 |
| 247 static int NumberOfWeakCalls = 0; | 247 static int NumberOfWeakCalls = 0; |
| 248 static void WeakPointerCallback(v8::Isolate* isolate, | 248 static void WeakPointerCallback(v8::Isolate* isolate, |
| 249 v8::Persistent<v8::Value>* handle, | 249 v8::Persistent<v8::Value>* handle, |
| 250 void* id) { | 250 void* id) { |
| 251 ASSERT(id == reinterpret_cast<void*>(1234)); | 251 ASSERT(id == reinterpret_cast<void*>(1234)); |
| 252 NumberOfWeakCalls++; | 252 NumberOfWeakCalls++; |
| 253 handle->Dispose(); | 253 handle->Reset(); |
| 254 } | 254 } |
| 255 | 255 |
| 256 | 256 |
| 257 TEST(ObjectGroups) { | 257 TEST(ObjectGroups) { |
| 258 FLAG_incremental_marking = false; | 258 FLAG_incremental_marking = false; |
| 259 CcTest::InitializeVM(); | 259 CcTest::InitializeVM(); |
| 260 GlobalHandles* global_handles = CcTest::i_isolate()->global_handles(); | 260 GlobalHandles* global_handles = CcTest::i_isolate()->global_handles(); |
| 261 Heap* heap = CcTest::heap(); | 261 Heap* heap = CcTest::heap(); |
| 262 NumberOfWeakCalls = 0; | 262 NumberOfWeakCalls = 0; |
| 263 v8::HandleScope handle_scope(CcTest::isolate()); | 263 v8::HandleScope handle_scope(CcTest::isolate()); |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 | 525 |
| 526 | 526 |
| 527 TEST(RegressJoinThreadsOnIsolateDeinit) { | 527 TEST(RegressJoinThreadsOnIsolateDeinit) { |
| 528 intptr_t size_limit = ShortLivingIsolate() * 2; | 528 intptr_t size_limit = ShortLivingIsolate() * 2; |
| 529 for (int i = 0; i < 10; i++) { | 529 for (int i = 0; i < 10; i++) { |
| 530 CHECK_GT(size_limit, ShortLivingIsolate()); | 530 CHECK_GT(size_limit, ShortLivingIsolate()); |
| 531 } | 531 } |
| 532 } | 532 } |
| 533 | 533 |
| 534 #endif // __linux__ and !USE_SIMULATOR | 534 #endif // __linux__ and !USE_SIMULATOR |
| OLD | NEW |