Skip to content
Closed
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
src: make minor cleanups in encoding_binding.cc
  • Loading branch information
jasnell committed Mar 14, 2025
commit cd9770c216d6478bc5dbd07af4111c00d350cadb
12 changes: 7 additions & 5 deletions src/encoding_binding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ using v8::BackingStore;
using v8::BackingStoreInitializationMode;
using v8::Context;
using v8::FunctionCallbackInfo;
using v8::HandleScope;
using v8::Isolate;
using v8::Local;
using v8::Object;
using v8::ObjectTemplate;
using v8::SnapshotCreator;
using v8::String;
using v8::Uint8Array;
using v8::Value;
Expand All @@ -32,7 +34,7 @@ void BindingData::MemoryInfo(MemoryTracker* tracker) const {
}

BindingData::BindingData(Realm* realm,
v8::Local<v8::Object> object,
Local<Object> object,
InternalFieldInfo* info)
: SnapshotableObject(realm, object, type_int),
encode_into_results_buffer_(
Expand All @@ -52,7 +54,7 @@ BindingData::BindingData(Realm* realm,
}

bool BindingData::PrepareForSerialization(Local<Context> context,
v8::SnapshotCreator* creator) {
SnapshotCreator* creator) {
DCHECK_NULL(internal_field_info_);
internal_field_info_ = InternalFieldInfoBase::New<InternalFieldInfo>(type());
internal_field_info_->encode_into_results_buffer =
Expand All @@ -74,7 +76,7 @@ void BindingData::Deserialize(Local<Context> context,
int index,
InternalFieldInfoBase* info) {
DCHECK_IS_SNAPSHOT_SLOT(index);
v8::HandleScope scope(context->GetIsolate());
HandleScope scope(context->GetIsolate());
Realm* realm = Realm::GetCurrent(context);
// Recreate the buffer in the constructor.
InternalFieldInfo* casted_info = static_cast<InternalFieldInfo*>(info);
Expand Down Expand Up @@ -194,7 +196,7 @@ void BindingData::DecodeUTF8(const FunctionCallbackInfo<Value>& args) {
args.GetReturnValue().Set(ret);
}

void BindingData::ToASCII(const v8::FunctionCallbackInfo<v8::Value>& args) {
void BindingData::ToASCII(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
CHECK_GE(args.Length(), 1);
CHECK(args[0]->IsString());
Expand All @@ -207,7 +209,7 @@ void BindingData::ToASCII(const v8::FunctionCallbackInfo<v8::Value>& args) {
}
}

void BindingData::ToUnicode(const v8::FunctionCallbackInfo<v8::Value>& args) {
void BindingData::ToUnicode(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
CHECK_GE(args.Length(), 1);
CHECK(args[0]->IsString());
Expand Down
Loading