chore: enable check raw ptr fields (#38167)

This commit is contained in:
John Kleinschmidt 2023-05-11 16:07:39 -04:00 committed by GitHub
parent 141175c723
commit 3dbc0a365f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
120 changed files with 298 additions and 185 deletions

View file

@ -10,6 +10,8 @@
#include <vector>
#include "base/files/file_path.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/raw_ptr_exclusion.h"
#include "base/memory/weak_ptr.h"
#include "uv.h" // NOLINT(build/include_directory)
#include "v8/include/v8.h"
@ -71,7 +73,7 @@ class UvHandle {
delete reinterpret_cast<T*>(handle);
}
T* t_ = {};
RAW_PTR_EXCLUSION T* t_ = {};
};
class NodeBindings {
@ -146,7 +148,7 @@ class NodeBindings {
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
// Current thread's libuv loop.
uv_loop_t* uv_loop_;
raw_ptr<uv_loop_t> uv_loop_;
private:
// Thread to poll uv events.
@ -171,10 +173,10 @@ class NodeBindings {
uv_sem_t embed_sem_;
// Environment that to wrap the uv loop.
node::Environment* uv_env_ = nullptr;
raw_ptr<node::Environment> uv_env_ = nullptr;
// Isolate data used in creating the environment
node::IsolateData* isolate_data_ = nullptr;
raw_ptr<node::IsolateData> isolate_data_ = nullptr;
base::WeakPtrFactory<NodeBindings> weak_factory_{this};
};