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

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/ScriptWrappableVisitorTest.cpp

Issue 2856173004: Clean up bindings/core/v8 (Part 5) (Closed)
Patch Set: Fix build Created 3 years, 7 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 "platform/bindings/ScriptWrappableVisitor.h" 5 #include "platform/bindings/ScriptWrappableVisitor.h"
6 6
7 #include "bindings/core/v8/ToV8ForCore.h" 7 #include "bindings/core/v8/ToV8ForCore.h"
8 #include "bindings/core/v8/V8BindingForTesting.h" 8 #include "bindings/core/v8/V8BindingForTesting.h"
9 #include "bindings/core/v8/V8GCController.h" 9 #include "bindings/core/v8/V8GCController.h"
10 #include "bindings/core/v8/V8PerIsolateData.h"
11 #include "core/testing/DeathAwareScriptWrappable.h" 10 #include "core/testing/DeathAwareScriptWrappable.h"
12 #include "platform/bindings/TraceWrapperV8Reference.h" 11 #include "platform/bindings/TraceWrapperV8Reference.h"
12 #include "platform/bindings/V8PerIsolateData.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 static void PreciselyCollectGarbage() { 17 static void PreciselyCollectGarbage() {
18 ThreadState::Current()->CollectAllGarbage(); 18 ThreadState::Current()->CollectAllGarbage();
19 } 19 }
20 20
21 static void RunV8Scavenger(v8::Isolate* isolate) { 21 static void RunV8Scavenger(v8::Isolate* isolate) {
22 V8GCController::CollectGarbage(isolate, true); 22 V8GCController::CollectGarbage(isolate, true);
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 398
399 // Upon setting the wrapper we should have executed the write barrier. 399 // Upon setting the wrapper we should have executed the write barrier.
400 CHECK_EQ(0u, raw_visitor->NumberOfMarkedWrappers()); 400 CHECK_EQ(0u, raw_visitor->NumberOfMarkedWrappers());
401 bool success = 401 bool success =
402 target->SetWrapper(scope.GetIsolate(), target->GetWrapperTypeInfo(), obj); 402 target->SetWrapper(scope.GetIsolate(), target->GetWrapperTypeInfo(), obj);
403 CHECK(success); 403 CHECK(success);
404 CHECK_EQ(1u, raw_visitor->NumberOfMarkedWrappers()); 404 CHECK_EQ(1u, raw_visitor->NumberOfMarkedWrappers());
405 } 405 }
406 406
407 } // namespace blink 407 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698