OLD | NEW |
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 "CheckFieldsVisitor.h" | 5 #include "CheckFieldsVisitor.h" |
6 | 6 |
7 #include <cassert> | 7 #include <cassert> |
8 | 8 |
9 #include "BlinkGCPluginOptions.h" | 9 #include "BlinkGCPluginOptions.h" |
10 #include "RecordInfo.h" | 10 #include "RecordInfo.h" |
11 | 11 |
12 CheckFieldsVisitor::CheckFieldsVisitor(const BlinkGCPluginOptions& options) | 12 CheckFieldsVisitor::CheckFieldsVisitor() |
13 : options_(options), | 13 : current_(0), |
14 current_(0), | |
15 stack_allocated_host_(false) { | 14 stack_allocated_host_(false) { |
16 } | 15 } |
17 | 16 |
18 CheckFieldsVisitor::Errors& CheckFieldsVisitor::invalid_fields() { | 17 CheckFieldsVisitor::Errors& CheckFieldsVisitor::invalid_fields() { |
19 return invalid_fields_; | 18 return invalid_fields_; |
20 } | 19 } |
21 | 20 |
22 bool CheckFieldsVisitor::ContainsInvalidFields(RecordInfo* info) { | 21 bool CheckFieldsVisitor::ContainsInvalidFields(RecordInfo* info) { |
23 stack_allocated_host_ = info->IsStackAllocated(); | 22 stack_allocated_host_ = info->IsStackAllocated(); |
24 managed_host_ = stack_allocated_host_ || | 23 managed_host_ = stack_allocated_host_ || |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 return kReferencePtrToGCManaged; | 111 return kReferencePtrToGCManaged; |
113 else | 112 else |
114 return kRawPtrToGCManaged; | 113 return kRawPtrToGCManaged; |
115 } | 114 } |
116 if (ptr->IsRefPtr()) | 115 if (ptr->IsRefPtr()) |
117 return kRefPtrToGCManaged; | 116 return kRefPtrToGCManaged; |
118 if (ptr->IsOwnPtr()) | 117 if (ptr->IsOwnPtr()) |
119 return kOwnPtrToGCManaged; | 118 return kOwnPtrToGCManaged; |
120 assert(false && "Unknown smart pointer kind"); | 119 assert(false && "Unknown smart pointer kind"); |
121 } | 120 } |
OLD | NEW |