-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: accept single argument in getProxyDetails #30858
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,11 +91,12 @@ static void GetProxyDetails(const FunctionCallbackInfo<Value>& args) { | |
if (!args[0]->IsProxy()) | ||
return; | ||
|
||
CHECK(args[1]->IsBoolean()); | ||
|
||
Local<Proxy> proxy = args[0].As<Proxy>(); | ||
|
||
if (args[1]->IsTrue()) { | ||
// TODO(BridgeAR): Remove the length check as soon as we prohibit access to | ||
// the util binding layer. It's accessed in the wild and `esm` would break in | ||
// case the check is removed. | ||
if (args.Length() == 1 || args[1]->IsTrue()) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The length check here doesn’t change behaviour and could safely be dropped, so you can apply the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean if I write There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, something like that … feel free to ignore though :) |
||
Local<Value> ret[] = { | ||
proxy->GetTarget(), | ||
proxy->GetHandler() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an issue opened in esm? (BTW it is somewhat ambiguous what
esm
means here..unless it's explicitly pointed out that this is about the npm package)