-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
url: add ToObject method to native URL class #12056
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
Changes from 1 commit
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 |
|---|---|---|
|
|
@@ -54,6 +54,8 @@ | |
|
|
||
| _process.setupRawDebug(); | ||
|
|
||
| // Ensure setURLConstructor() is called before the native | ||
| // URL::ToObject() method is used. | ||
| NativeModule.require('internal/url'); | ||
|
Member
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. I'm a bit afraid of the increase in memory usage. Is there a need to make some requires in
Member
Author
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. There shouldn't be. The requires that are there are minimal ( |
||
|
|
||
| Object.defineProperty(process, 'argv0', { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ | |
| namespace node { | ||
| namespace url { | ||
|
|
||
| using v8::MaybeLocal; | ||
| using v8::Local; | ||
| using v8::Value; | ||
|
|
||
|
|
||
|
|
@@ -626,7 +626,7 @@ class URL { | |
| return ret; | ||
| } | ||
|
|
||
| MaybeLocal<Value> ToObject(Environment* env); | ||
| const Local<Value> ToObject(Environment* env) const; | ||
|
Member
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. Specifying
Member
Author
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. Bad habits die hard. I appreciate the reminder. Eventually I'll remember ;) |
||
|
|
||
| private: | ||
| struct url_data context_; | ||
|
|
||
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.
You could add a comment that mentions the side effect you’re using this for, e.g.