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

Side by Side Diff: third_party/WebKit/Source/modules/csspaint/PaintWorkletTest.cpp

Issue 1884083002: Revert of Rename Heap to ThreadHeap (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/csspaint/PaintWorklet.h" 5 #include "modules/csspaint/PaintWorklet.h"
6 6
7 #include "bindings/core/v8/ScriptSourceCode.h" 7 #include "bindings/core/v8/ScriptSourceCode.h"
8 #include "bindings/core/v8/V8GCController.h" 8 #include "bindings/core/v8/V8GCController.h"
9 #include "bindings/core/v8/WorkerOrWorkletScriptController.h" 9 #include "bindings/core/v8/WorkerOrWorkletScriptController.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 ScopedPersistent<v8::Function> handle; 57 ScopedPersistent<v8::Function> handle;
58 { 58 {
59 v8::HandleScope handleScope(isolate); 59 v8::HandleScope handleScope(isolate);
60 handle.set(isolate, definition->paintFunctionForTesting(isolate)); 60 handle.set(isolate, definition->paintFunctionForTesting(isolate));
61 handle.setWeak(&handle, clearHandle); 61 handle.setWeak(&handle, clearHandle);
62 } 62 }
63 ASSERT(!handle.isEmpty()); 63 ASSERT(!handle.isEmpty());
64 ASSERT(handle.isWeak()); 64 ASSERT(handle.isWeak());
65 65
66 // Run a GC, persistent shouldn't have been collected yet. 66 // Run a GC, persistent shouldn't have been collected yet.
67 ThreadHeap::collectAllGarbage(); 67 Heap::collectAllGarbage();
68 V8GCController::collectAllGarbageForTesting(isolate); 68 V8GCController::collectAllGarbageForTesting(isolate);
69 ASSERT(!handle.isEmpty()); 69 ASSERT(!handle.isEmpty());
70 70
71 // Delete the page & associated objects. 71 // Delete the page & associated objects.
72 m_page.clear(); 72 m_page.clear();
73 73
74 // Run a GC, the persistent should have been collected. 74 // Run a GC, the persistent should have been collected.
75 ThreadHeap::collectAllGarbage(); 75 Heap::collectAllGarbage();
76 V8GCController::collectAllGarbageForTesting(isolate); 76 V8GCController::collectAllGarbageForTesting(isolate);
77 ASSERT(handle.isEmpty()); 77 ASSERT(handle.isEmpty());
78 } 78 }
79 79
80 } // naespace blink 80 } // naespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698