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

Unified Diff: test/cctest/test-weaksets.cc

Issue 2655533004: [tests] Fix use-after-scope errors related to weak refs (Closed)
Patch Set: typo Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-weakmaps.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-weaksets.cc
diff --git a/test/cctest/test-weaksets.cc b/test/cctest/test-weaksets.cc
index c51c70a4219deff49d07acc32f83804d68e7004a..9f0bdd32e924b4f015d5710280ad48044114b844 100644
--- a/test/cctest/test-weaksets.cc
+++ b/test/cctest/test-weaksets.cc
@@ -110,13 +110,10 @@ TEST(WeakSet_Weakness) {
0, ObjectHashTable::cast(weakset->table())->NumberOfDeletedElements());
// Make the global reference to the key weak.
- {
- HandleScope scope(isolate);
- std::pair<Handle<Object>*, int> handle_and_id(&key, 1234);
- GlobalHandles::MakeWeak(
- key.location(), reinterpret_cast<void*>(&handle_and_id),
- &WeakPointerCallback, v8::WeakCallbackType::kParameter);
- }
+ std::pair<Handle<Object>*, int> handle_and_id(&key, 1234);
+ GlobalHandles::MakeWeak(
+ key.location(), reinterpret_cast<void*>(&handle_and_id),
+ &WeakPointerCallback, v8::WeakCallbackType::kParameter);
CHECK(global_handles->IsWeak(key.location()));
CcTest::CollectAllGarbage(Heap::kAbortIncrementalMarkingMask);
« no previous file with comments | « test/cctest/test-weakmaps.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698