Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: avoid copy on getV8FastApiCallCount #56081

Merged
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
8 changes: 3 additions & 5 deletions src/node_debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@
#include <unordered_map>
#endif // DEBUG

namespace node {
namespace debug {
namespace node::debug {

#ifdef DEBUG
using v8::Context;
Expand Down Expand Up @@ -41,7 +40,7 @@ void GetV8FastApiCallCount(const FunctionCallbackInfo<Value>& args) {
return;
}
Utf8Value utf8_key(env->isolate(), args[0]);
args.GetReturnValue().Set(GetV8FastApiCallCount(utf8_key.ToString()));
args.GetReturnValue().Set(GetV8FastApiCallCount(utf8_key.ToStringView()));
}

void SlowIsEven(const FunctionCallbackInfo<Value>& args) {
Expand Down Expand Up @@ -93,8 +92,7 @@ void Initialize(Local<Object> target,
}
#endif // DEBUG

} // namespace debug
} // namespace node
} // namespace node::debug

#ifdef DEBUG
NODE_BINDING_CONTEXT_AWARE_INTERNAL(debug, node::debug::Initialize)
Expand Down
Loading