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

Unified Diff: test/cctest/test-weakmaps.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-api.cc ('k') | test/cctest/test-weaksets.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-weakmaps.cc
diff --git a/test/cctest/test-weakmaps.cc b/test/cctest/test-weakmaps.cc
index 0aee37bb5aae6c245b0983b053f19dedd153b3b2..a8cb33fce2f5b78d1d4f9a9a293d6ec907b7a404 100644
--- a/test/cctest/test-weakmaps.cc
+++ b/test/cctest/test-weakmaps.cc
@@ -111,13 +111,10 @@ TEST(Weakness) {
0, ObjectHashTable::cast(weakmap->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-api.cc ('k') | test/cctest/test-weaksets.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698