-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
src: fix use of deprecated ToObject() #23314
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 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 |
---|---|---|
|
@@ -623,7 +623,8 @@ class Parser : public AsyncWrap, public StreamListener { | |
enum http_errno err = HTTP_PARSER_ERRNO(&parser_); | ||
|
||
Local<Value> e = Exception::Error(env()->parse_error_string()); | ||
Local<Object> obj = e->ToObject(env()->isolate()); | ||
Local<Object> obj = e->ToObject(env()->isolate()->GetCurrentContext()) | ||
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. ditto 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. @addaleax what about this one? 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. This scope has an 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. @targos I think it currently doesn’t matter because we only provide built-in native modules for the main context of an
That would be very unidiomatic. |
||
.ToLocalChecked(); | ||
obj->Set(env()->bytes_parsed_string(), nparsed_obj); | ||
obj->Set(env()->code_string(), | ||
OneByteString(env()->isolate(), http_errno_name(err))); | ||
|
Uh oh!
There was an error while loading. Please reload this page.