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

Side by Side Diff: sky/engine/tonic/dart_gc_context.cc

Issue 1206763002: Really remove config.h (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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
« no previous file with comments | « sky/engine/tonic/dart_exception_factory.cc ('k') | sky/engine/tonic/dart_gc_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "sky/engine/config.h"
6 #include "sky/engine/tonic/dart_gc_context.h" 5 #include "sky/engine/tonic/dart_gc_context.h"
7 6
8 namespace blink { 7 namespace blink {
9 8
10 DartGCContext::DartGCContext() : builder_(Dart_NewWeakReferenceSetBuilder()) { 9 DartGCContext::DartGCContext() : builder_(Dart_NewWeakReferenceSetBuilder()) {
11 } 10 }
12 11
13 DartGCContext::~DartGCContext() { 12 DartGCContext::~DartGCContext() {
14 } 13 }
15 14
16 Dart_WeakReferenceSet DartGCContext::AddToSetForRoot( 15 Dart_WeakReferenceSet DartGCContext::AddToSetForRoot(
17 const void* root, 16 const void* root,
18 Dart_WeakPersistentHandle handle) { 17 Dart_WeakPersistentHandle handle) {
19 const auto& it = references_.add(root, nullptr); 18 const auto& it = references_.add(root, nullptr);
20 if (!it.isNewEntry) { 19 if (!it.isNewEntry) {
21 Dart_AppendToWeakReferenceSet(it.storedValue->value, handle, handle); 20 Dart_AppendToWeakReferenceSet(it.storedValue->value, handle, handle);
22 return it.storedValue->value; 21 return it.storedValue->value;
23 } 22 }
24 it.storedValue->value = Dart_NewWeakReferenceSet(builder_, handle, handle); 23 it.storedValue->value = Dart_NewWeakReferenceSet(builder_, handle, handle);
25 return it.storedValue->value; 24 return it.storedValue->value;
26 } 25 }
27 26
28 } // namespace blink 27 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/tonic/dart_exception_factory.cc ('k') | sky/engine/tonic/dart_gc_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698