summaryrefslogtreecommitdiff
path: root/chromium/tools/clang/rewrite_raw_ptr_fields/manual-fields-to-ignore.txt
blob: 1a88fb4b41403669c0fb6e36ea902f6c6ed7665d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
# File that lists fields that should be ignored when running the
# rewrite_raw_ptr_fields tool on Chromium sources.
#
# Each non-comment, non-empty line should specify a fully-namespace qualified
# field like:
#     my_namespace::my_subnamespace::MyStruct::my_field_
#
# There is no need to specify template arguments:
#     my_namespace::my_subnamespace::MyTemplate::my_field_

# Populated manually - double implicit-cast required.
PaintManager::instance_

# Populated manually - needed for lock annotations
base::trace_event::TraceLog::OptionalAutoLock::lock_

# Populated manually - templates make it difficult for the rewriter to see that
# |.get()| needs to be appended.
blink::xpath::EvaluationContext::node
WTF::HashTableAddResult::container_
WTF::HashTableAddResult::stored_value
cast_channel::CastTransportTest::logger_
content::IndexedDBDispatcherHost::indexed_db_context_
ServiceProcessState::state_

# Populated manually - conflicting types in an initializer list
WebUITabStripContainerView::tab_counter_
DownloadItemView::review_button_

# Populated manually to avoid returning a reference to a temporary T* (result of
# implicitly casting raw_ptr<T> to T*).  This covers functions that return
# |SomeClass*&| and local variables with that type.
AllTabContentsesList::Iterator::cur_
blink::NormalPage::CompactionContext::current_page_
blink::Worklist::PrivateSegmentHolder::private_pop_segment
blink::Worklist::PrivateSegmentHolder::private_push_segment
content::(anonymous namespace)::AudioStreamMonitorTest::monitor_
content::AudioStreamMonitor::clock_
remoting::ChromotingHostTest::client1_
remoting::ChromotingHostTest::client2_
WTF::ICUConverterWrapper::converter
(anonymous namespace)::WebAuthnCableSecondFactor::model_

# Populated manually - always holds a pointer to an OilPan-allocated memory.
blink::PersistentBase::raw_
blink::SVGFilterBuilder::last_effect_

# Populated manually - global-scope exclusions that are missing because the
# global variable is in a build configuration specific code
base::android::ReachedAddressesBitset::reached_

# Populated manually - missing |.get()| in not-rewritten platform specific code
viz::OverlayCandidate::rpdq
viz::CALayerOverlay::rpdq
viz::DrawQuad::shared_quad_state
content::RenderWidgetHostInputEventRouter::wheel_target_
NavigateParams::navigated_or_inserted_contents
web_app::WebAppTabStripBrowserTest::App::web_contents
policy::ChromePolicyConversionsClient::profile_

# Populated manually - reference to raw_ptr in not-rewritten platform specific code
viz::DirectRenderer::DrawingFrame::current_render_pass
TabGroupViews::header_
TabGroupViews::underline_
TabGroupViews::highlight_
views::LayoutManager::view_setting_visibility_on_
FullscreenController::deactivated_contents_
content::RenderWidgetHostInputEventRouter::touch_target_
content::RenderWidgetHostInputEventRouter::touchpad_gesture_target_

# Populated manually - incompatibilities with tracing in not-rewritten platform specific code
TabStripModelChange::RemovedTab::contents

# Populated manually - extra .get() added in not-rewritten platform specific code
SECItem::data

# Populated manually - the rewriter has trouble appending |.get()| inside macros
# that work with |XDisplay*|.
extensions::GlobalShortcutListenerX11::x_display_
ui::VisualPickerGlx::display_
media::(anonymous namespace)::UserInputMonitorLinuxCore::x_record_display_
media::cast::test::LinuxOutputWindow::display_
remoting::(anonymous namespace)::InputInjectorX11::Core::display_
remoting::(anonymous namespace)::LocalHotkeyInputMonitorX11::Core::x_record_display_
remoting::(anonymous namespace)::LocalMouseInputMonitorX11::Core::x_record_display_
remoting::ClipboardX11::display_
remoting::XServerClipboard::display_
Simulator::display_
ui::ClipboardX11::X11Details::x_display_
ui::SelectionRequestorTest::x_display_
ui::X11EventSource::display_
ui::X11MenuRegistrar::xdisplay_
ui::X11WorkspaceHandler::xdisplay_
ui::XDisplayManager::xdisplay_
ui::XOSExchangeDataProvider::x_display_
ui::XVisualManager::display_
ui::XWindow::xdisplay_
views::test::(anonymous namespace)::UIControlsDesktopX11::x_display_
viz::SkiaOutputDeviceX11::display_
x11::Connection::display_

# Populated manually - static_cast not related by inheritance.
gtk::GtkKeyBindingsHandler::fake_window_
gtk::GtkKeyBindingsHandler::handler_
gtk::SelectFileDialogLinuxGtk::preview_
remoting::(anonymous namespace)::DisconnectWindowGtk::disconnect_window_
remoting::(anonymous namespace)::DisconnectWindowGtk::message_
remoting::(anonymous namespace)::GtkFileChooserOnUiThread::file_dialog_
remoting::(anonymous namespace)::It2MeConfirmationDialogLinux::confirmation_window_
remoting::ContinueWindowGtk::continue_window_
ui::AXPlatformNodeAuraLinux::atk_hyperlink_
PrintDialogGtk::dialog_

# Populated manually, because of in-out-arg usage.
blink::PaintController::IdAsHashKey::client
ui::AXPlatformNodeAuraLinux::atk_object_

# Populated manually - problems related to passing to a templated && parameter,
# which is later forwarded to something that doesn't vibe with raw_ptr<T>. The
# rewriter has no visibility into where the parameter is forwarded to.
ProfileDestroyer::profile_
(anonymous namespace)::BluetoothLowEnergyApiTest::mock_adapter_
content::RenderProcessHostImpl::browser_context_
device::BluetoothDevice::adapter_

# Populated manually - problems related to lambdas with no return type, where
# the return value is raw_ptr<T>, but variable/parameter receiving the lambda
# expects the raw pointer type.
vr::LocationBarState::vector_icon
vr::OmniboxSuggestion::icon

# Populated manually - assigned to |auto*| in ranged loop on an array
# initializer literal comprising of those pointers.
DownloadItemView::discard_button_
DownloadItemView::open_now_button_
DownloadItemView::save_button_
DownloadItemView::scan_button_
OpaqueBrowserFrameViewLayout::minimize_button_
OpaqueBrowserFrameViewLayout::maximize_button_
OpaqueBrowserFrameViewLayout::restore_button_
OpaqueBrowserFrameViewLayout::close_button_

# Populated manually - incompatibilities with tracing (TRACE_EVENT*),
# perfetto::TracedDictionary::Add and gmock/EXPECT_THAT.
cc::GpuImageDecodeCache::dark_mode_filter_
blink::scheduler::MainThreadSchedulerImpl::current_agent_group_scheduler_
performance_manager::v8_memory::(anonymous namespace)::V8ContextTrackerTest::tracker_
content::(anonymous namespace)::BackForwardCacheMessageFilter::interface_name_
base::trace_event::MemoryDumpProviderInfo::name
content::NavigationRequest::frame_tree_node_
content::NavigationRequest::rfh_restored_from_back_forward_cache_
blink::scheduler::FrameSchedulerImpl::blame_context_
content::TestNavigationManager::request_

# Populated manually - requires rewriting member pointer type
courgette::LabelManagerTest_SimpleIndexAssigner_Test::TestBody()::TestCase::input
courgette::LabelManagerTest_SimpleIndexAssigner_Test::TestBody()::TestCase::expect_forward
courgette::LabelManagerTest_SimpleIndexAssigner_Test::TestBody()::TestCase::expect_backward
courgette::LabelManagerTest_SimpleIndexAssigner_Test::TestBody()::TestCase::expect_in

# Populated manually - pointer to address in another process could be confused
# as a pointer to PA memory
sandbox::TargetProcess::base_address_ # https://crbug.com/1173374

# Populated manually - uninitialized memory reinterpret_cast to raw_ptr<T>
# causing AddRef/Deref mismatch.
sandbox::(anonymous namespace)::_HEAP_32::Heap
sandbox::(anonymous namespace)::_HEAP_64::Heap
sql::SandboxedVfsFileSqliteBridge::sandboxed_vfs_file
sandbox::SharedMemIPCServer::client_control_
sandbox::SharedMemIPCServer::thread_provider_
sandbox::SharedMemIPCServer::call_dispatcher_

# Populated manually - pointer to stale non-PA allocation could be confused as a
# pointer to PA memory when that address space is reused https://crbug.com/1173851
base::PersistentMemoryAllocator::mem_base_ # https://crbug.com/1169582
base::SharedMemoryMapping::memory_ # https://crbug.com/1169581
mojo::core::PlatformSharedMemoryMapping::base_ # https://crbug.com/1173380

# Populated manually - other compile-time reasons
iovec::iov_base  # requires adding .get() in another repository, used e.g. in
                 # reinterpret_cast in quic_stream_sequencer_buffer.cc
net::SockaddrStorage::addr  # .get() not added in reinterpret_cast, reason unknown
views::internal::ClassPropertyValueSetter::property_  # passed to templated param T*
(anonymous namespace)::ScopedFunctionHelper::function_  # function pointer template
KeyedServiceBaseFactory::service_name_ # used in decltype
OutOfMemoryTest::value_ # used to pass non const pointer to pointer

# ELEMENT() treats the raw_ptr<T> as a void*, and so when a pointer is written
# AddRef() won't be called, causing AddRef/Deref mismatch.
device::AttestedCredentialData::ConsumeFromCtapResponse(base::span<const uint8_t>)::COSEKey::alg
device::AttestedCredentialData::ConsumeFromCtapResponse(base::span<const uint8_t>)::COSEKey::kty
device::cablev2::authenticator::(anonymous namespace)::MakeCredRequest::client_data_hash
device::cablev2::authenticator::(anonymous namespace)::MakeCredRequest::rp_id
device::cablev2::authenticator::(anonymous namespace)::MakeCredRequest::rp_name
device::cablev2::authenticator::(anonymous namespace)::MakeCredRequest::user_id
device::cablev2::authenticator::(anonymous namespace)::MakeCredRequest::user_name
device::cablev2::authenticator::(anonymous namespace)::MakeCredRequest::user_display_name
device::cablev2::authenticator::(anonymous namespace)::MakeCredRequest::cred_params
device::cablev2::authenticator::(anonymous namespace)::MakeCredRequest::excluded_credentials
device::cablev2::authenticator::(anonymous namespace)::MakeCredRequest::resident_key
device::cablev2::authenticator::(anonymous namespace)::AttestationObject::fmt
device::cablev2::authenticator::(anonymous namespace)::AttestationObject::auth_data
device::cablev2::authenticator::(anonymous namespace)::AttestationObject::statement
device::cablev2::authenticator::(anonymous namespace)::GetAssertionRequest::rp_id
device::cablev2::authenticator::(anonymous namespace)::GetAssertionRequest::client_data_hash
device::cablev2::authenticator::(anonymous namespace)::GetAssertionRequest::allowed_credentials
device::cablev2::authenticator::(anonymous namespace)::GetAssertionRequest::origin
device::cablev2::authenticator::(anonymous namespace)::GetAssertionRequest::challenge
device::Ed25519PublicKey::ExtractFromCOSEKey(int32_t, base::span<const uint8_t>, const cbor::Value::MapValue &)::COSEKey::kty
device::Ed25519PublicKey::ExtractFromCOSEKey(int32_t, base::span<const uint8_t>, const cbor::Value::MapValue &)::COSEKey::crv
device::Ed25519PublicKey::ExtractFromCOSEKey(int32_t, base::span<const uint8_t>, const cbor::Value::MapValue &)::COSEKey::key
device::P256PublicKey::ExtractFromCOSEKey(int32_t, base::span<const uint8_t>, const cbor::Value::MapValue &)::COSEKey::kty
device::P256PublicKey::ExtractFromCOSEKey(int32_t, base::span<const uint8_t>, const cbor::Value::MapValue &)::COSEKey::crv
device::P256PublicKey::ExtractFromCOSEKey(int32_t, base::span<const uint8_t>, const cbor::Value::MapValue &)::COSEKey::x
device::P256PublicKey::ExtractFromCOSEKey(int32_t, base::span<const uint8_t>, const cbor::Value::MapValue &)::COSEKey::y
device::RSAPublicKey::ExtractFromCOSEKey(int32_t, base::span<const uint8_t>, const cbor::Value::MapValue &)::COSEKey::kty
device::RSAPublicKey::ExtractFromCOSEKey(int32_t, base::span<const uint8_t>, const cbor::Value::MapValue &)::COSEKey::n
device::RSAPublicKey::ExtractFromCOSEKey(int32_t, base::span<const uint8_t>, const cbor::Value::MapValue &)::COSEKey::e
device::(anonymous namespace)::MakeCredRequest::client_data_hash
device::(anonymous namespace)::MakeCredRequest::rp_id
device::(anonymous namespace)::MakeCredRequest::user_id
device::(anonymous namespace)::MakeCredRequest::cred_params
device::(anonymous namespace)::MakeCredRequest::excluded_credentials
device::(anonymous namespace)::MakeCredRequest::resident_key
device::(anonymous namespace)::MakeCredRequest::user_verification
device::(anonymous namespace)::MakeCredRequest::large_test
device::(anonymous namespace)::MakeCredRequest::negative_test
device::(anonymous namespace)::MakeCredRequest::skipped_1
device::(anonymous namespace)::MakeCredRequest::skipped_2
device::(anonymous namespace)::CBORExtract_MissingRequired_Test::TestBody()::Dummy::value
device::(anonymous namespace)::CBORExtract_WrongType_Test::TestBody()::Dummy::value
device::(anonymous namespace)::CBORExtract_RequiredInOptionalMap_Test::TestBody()::Dummy::value

# Populated manually - pointer to Objective-C object
gfx::ScopedNSGraphicsContextSaveGState::context_
base::mac::ScopedNSAutoreleasePool::autorelease_pool_

#######
# BackupRefPtr-specific sections
#######

# Populated manually - std::is_trivially_destructible static_assert failure
blink::HTMLElementEquivalent::tag_name_
blink::PrerendererClient::client_
blink::weakness_marking_test::EphemeronCallbacksCounter::count_holder_
sql::recover::InnerPageDecoder::db_reader_
sql::recover::LeafPageDecoder::db_reader_

# Populated manually - flexible array with non-trivial destruction
blink::ShapeResultView::(anonymous struct)::alignment

# Populated manually - these pointers crash, because a base class ctor accesses
# child class ptr fields before they're initialized.
blink::CacheEntry::next_
blink::CacheEntry::prev_
WTF::LruCache::MappedListNodeWithKey::next_
WTF::LruCache::MappedListNodeWithKey::prev_

# Populated manually - these pointers crash, due to use-after-move.
gpu::gles2::PassthroughProgramCache::ProgramCacheValue::program_cache_

#######
# End of BackupRefPtr-specific sections
#######

#######
# Performance-related exclusions
#######

# Populated manually - to avoid out-of-line destructor
base::LockFreeAddressHashSet::Node::next
gpu::gles2::TextureManager::DoTexSubImageArguments::pixels

# Populated manually - on-stack pointer + a large number of non-PA pointees
base::AutoReset::scoped_variable_

# Populated manually - on-stack pointee
base::StackAllocator::source_

# Populated manually - on-stack pointer + a large number of non-PA pointees
mojo::core::ports::PortLocker::port_refs_

# Populated manually - static pointee
mojo::core::RequestContext::tls_context_
base::sequence_manager::LazyNow::tick_clock_

# Populated manually - on-stack pointee
mojo::internal::ContainerValidateParams::key_validate_params
mojo::internal::ContainerValidateParams::element_validate_params
mojo::internal::ValidationContext::ScopedDepthTracker::ctx_

# Populated manually - usually on-stack pointer, pointing back to the collection
# being iterated, owned by object that iterates over it.
base::internal::circular_deque_const_iterator::parent_deque_

# Populated manually - on-stack pointer + a large number of non-PA pointees through WeakLinkNode
base::internal::LinkNodeBase::next_
base::internal::LinkNodeBase::previous_

# Populated manually - on-stack pointer
base::internal::WeakLinkNode::list_

# Populated manually - using mmap, MapViewOfFile or base::AllocPages directly
blink::GCInfoTable::table_
cc::(anonymous namespace)::BitmapRasterBufferImpl::pixels_
# TODO(bartekn): This one has a malloc() path, consider rewriting after all.
disk_cache::MappedFile::buffer_
network::MojoToNetPendingBuffer::buffer_
network::NetToMojoPendingBuffer::buffer_

# Populated manually - based on sampling profiler data and tab_search:top100:2020 profiler data
(anonymous namespace)::TlsVectorEntry::data
LinkNodeBase::next_
LinkNodeBase::previous_
WeakLinkNode::list_
base::Location::program_counter_
base::MessagePump::Delegate::ScopedDoWorkItem::outer_
base::MessagePumpLibevent::RunState::delegate
base::internal::OperationsController::OperationToken::outer_
base::internal::SequenceLocalStorageMap::ValueDestructorPair::destructor_
base::internal::SequenceLocalStorageMap::ValueDestructorPair::value_
base::internal::TaskDestructionDetector::timer_
base::internal::VectorBuffer::buffer_
base::internal::circular_deque_const_iterator::parent_deque_
base::sequence_manager::internal::LazilyDeallocatedDeque::tail_
base::sequence_manager::internal::SequenceManagerImpl::ExecutingTask::task_queue
base::sequence_manager::internal::TaskQueueImpl::DeferredNonNestableTask::task_queue
base::sequence_manager::internal::WorkQueue::TaskPusher::work_queue_
cc::(anonymous namespace)::DependentIterator::current_node_
cc::(anonymous namespace)::DependentIterator::graph_
cc::(anonymous namespace)::DependentIterator::task_
cc::LayerListIterator::current_layer_
cc::ListContainerHelper::CharAllocator::last_list_
cc::ListContainerHelper::PositionInCharAllocator::item_iterator
cc::ListContainerHelper::PositionInCharAllocator::ptr_to_container
cc::PaintOpBuffer::Iterator::buffer_
cc::PaintOpBuffer::Iterator::ptr_
cc::PaintOpBuffer::OffsetIterator::buffer_
cc::PaintOpBuffer::OffsetIterator::offsets_
cc::PaintOpBuffer::OffsetIterator::ptr_
cc::PaintOpBuffer::PlaybackFoldingIterator::current_op_
cc::PictureLayerTiling::CoverageIterator::current_tile_
cc::PictureLayerTiling::CoverageIterator::tiling_
cc::PlaybackParams::image_provider
cc::ResourcePool::InUsePoolResource::resource_
cc::TilingSetEvictionQueue::EvictionRectIterator::tilings_
cc::TilingSetRasterQueueAll::OnePriorityRectIterator::tiling_
cc::TilingSetRasterQueueAll::OnePriorityRectIterator::tiling_data_
cc::TilingSetRasterQueueAll::TilingIterator::tiling_
cc::TilingSetRasterQueueAll::TilingIterator::tiling_data_
cc::TilingSetRasterQueueRequired::TilingIterator::tiling_
cc::TilingSetRasterQueueRequired::TilingIterator::tiling_data_
content::FrameTree::NodeIterator::current_node_
content::FrameTree::NodeIterator::root_of_subtree_to_skip_
content::responsiveness::Watcher::Metadata::identifier
mojo::core::UserMessageImpl::header_
mojo::core::UserMessageImpl::message_event_
mojo::core::UserMessageImpl::user_payload_
mojo::core::ports::UserMessage::type_info_
mojo::internal::MultiplexRouter::MessageWrapper::router_
tracing::(anonymous namespace)::LazyLegacyEventInitializer::legacy_event_
tracing::(anonymous namespace)::LazyLegacyEventInitializer::track_event_
url::StdStringCanonOutput::str_
base::Pickle::header_
base::internal::TimerBase::task_destruction_detector_
cc::TilingSetRasterQueueAll::tiling_set_
site_engagement::SiteEngagementScore::clock_
site_engagement::SiteEngagementScore::settings_map_
extensions::LazyContextTaskQueue::ContextInfo::render_process_host
extensions::LazyContextTaskQueue::ContextInfo::browser_context
extensions::LazyContextTaskQueue::ContextInfo::web_contents
mojo::core::MessagePipeDispatcher::node_controller_
mojo::internal::ArrayDataViewImpl::data_
mojo::internal::ArrayDataViewImpl::message_
mojo::Connector::incoming_receiver_
mojo::Connector::nesting_observer_
mojo::InterfaceEndpointClient::controller_
mojo::InterfaceEndpointClient::incoming_receiver_
mojo::internal::MayAutoLock::lock_
mojo::internal::MayAutoUnlock::lock_
mojo::internal::MultiplexRouter::header_validator_
url::CanonOutputT::buffer_
prefs::ScopedDictionaryPrefUpdate::service_
prefs::DictionaryValueUpdate::value_

# Populated manually - type is unsupported by raw_ptr to avoid being used in
# performance sensitive base::Unretained
content::responsiveness::Watcher::calculator_io_

#######
# End of performance-related exclusions
#######