Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions test/basic_types/boolean.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Value CreateEmptyBoolean(const CallbackInfo& info) {
}

Value CreateBooleanFromExistingValue(const CallbackInfo& info) {
Boolean* boolean = new Boolean(info.Env(), info[0].As<Boolean>());
return Boolean::New(info.Env(), boolean->Value());
Boolean boolean(info.Env(), info[0].As<Boolean>());
return Boolean::New(info.Env(), boolean.Value());
}

Value CreateBooleanFromPrimitive(const CallbackInfo& info) {
Expand Down
4 changes: 2 additions & 2 deletions test/basic_types/number.cc
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ Value OperatorDouble(const CallbackInfo& info) {
}

Value CreateEmptyNumber(const CallbackInfo& info) {
Number* number = new Number();
return Boolean::New(info.Env(), number->IsEmpty());
Number number;
return Boolean::New(info.Env(), number.IsEmpty());
}

Value CreateNumberFromExistingValue(const CallbackInfo& info) {
Expand Down