Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fixup! src,permission: add --permission-audit
  • Loading branch information
RafaelGSS committed Feb 24, 2026
commit 690fff11c52140f0c3788e52f06507d29dc66ae1
9 changes: 5 additions & 4 deletions src/permission/permission.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ bool Permission::is_scope_granted(Environment* env,
v8::Isolate* isolate = env->isolate();
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Context> context = env->context();
v8::Local<v8::Object> msg = v8::Object::New(isolate, v8::Null(isolate), nullptr, nullptr, 0);
v8::Local<v8::Object> msg =
v8::Object::New(isolate, v8::Null(isolate), nullptr, nullptr, 0);
const char* perm_str = PermissionToString(permission);
msg->Set(context,
FIXED_ONE_BYTE_STRING(isolate, "permission"),
Expand All @@ -246,8 +247,7 @@ bool Permission::is_scope_granted(Environment* env,
return result;
}

BaseObjectPtr<diagnostics_channel::Channel>
Permission::GetOrCreateChannel(
BaseObjectPtr<diagnostics_channel::Channel> Permission::GetOrCreateChannel(
Environment* env, PermissionScope scope) const {
auto it = channels_.find(scope);
if (it != channels_.end()) {
Expand All @@ -260,7 +260,8 @@ Permission::GetOrCreateChannel(
diagnostics_channel::Channel* ch =
diagnostics_channel::Channel::Get(env, channel_name.data());
if (ch != nullptr) {
channels_.emplace(scope, BaseObjectWeakPtr<diagnostics_channel::Channel>(ch));
channels_.emplace(scope,
BaseObjectWeakPtr<diagnostics_channel::Channel>(ch));
return BaseObjectPtr<diagnostics_channel::Channel>(ch);
}
return {};
Expand Down
2 changes: 1 addition & 1 deletion src/permission/permission.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS

#include "debug_utils.h"
#include "node_diagnostics_channel.h"
#include "node_options.h"
#include "permission/addon_permission.h"
#include "permission/child_process_permission.h"
Expand All @@ -13,7 +14,6 @@
#include "permission/permission_base.h"
#include "permission/wasi_permission.h"
#include "permission/worker_permission.h"
#include "node_diagnostics_channel.h"
#include "v8.h"

#include <string_view>
Expand Down