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: refactor reading of options in contextify #8850

Closed
wants to merge 1 commit into from

Conversation

fhinkel
Copy link
Member

@fhinkel fhinkel commented Sep 29, 2016

Checklist
  • make -j8 test (UNIX) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

src, contextify

Description of change

Refactor various functions that read values from the contextify options object.
Rather than passing args and the index, pass the value at that index.

We use env->isolate() rather than args.GetIsolate(), but since env
was constructed from args, this is the same isolate.

@fhinkel fhinkel added the vm Issues and PRs related to the vm subsystem. label Sep 29, 2016
@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Sep 29, 2016
@fhinkel
Copy link
Member Author

fhinkel commented Sep 29, 2016

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

bool display_errors = GetDisplayErrorsArg(env, args, 1);
MaybeLocal<Uint8Array> cached_data_buf = GetCachedData(env, args, 1);
bool produce_cached_data = GetProduceCachedData(env, args, 1);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linter is unhappy about whitespaces here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed.

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a green CI/linter run

@fhinkel fhinkel force-pushed the FuncCallbackInfo branch 2 times, most recently from c1ac941 to 958dcdd Compare September 30, 2016 09:08
Refactor various functions that read values from the contextify options object.
Rather than passing args and the index, pass the value at that index.

We use env->isolate() rather than args.GetIsolate(), but since env
was constructed from args, this is the same isolate.
@fhinkel
Copy link
Member Author

fhinkel commented Sep 30, 2016

Copy link
Member

@jasnell jasnell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

fhinkel added a commit to fhinkel/node that referenced this pull request Oct 3, 2016
Refactor various functions that read values from the contextify
options object.  Rather than passing args and the index, pass the
value at that index.

We use env->isolate() rather than args.GetIsolate(), but since env
was constructed from args, this is the same isolate.

PR-URL: nodejs#8850
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@fhinkel
Copy link
Member Author

fhinkel commented Oct 3, 2016

Landed in c32cfcb.

@fhinkel fhinkel closed this Oct 3, 2016
jasnell pushed a commit that referenced this pull request Oct 6, 2016
Refactor various functions that read values from the contextify
options object.  Rather than passing args and the index, pass the
value at that index.

We use env->isolate() rather than args.GetIsolate(), but since env
was constructed from args, this is the same isolate.

PR-URL: #8850
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@MylesBorins
Copy link
Contributor

@fhinkel I have set this as do not land. If you feel it should be backported please feel free to do so

@fhinkel
Copy link
Member Author

fhinkel commented Oct 7, 2016

No need to backport it. Thanks!

Fishrock123 pushed a commit that referenced this pull request Oct 11, 2016
Refactor various functions that read values from the contextify
options object.  Rather than passing args and the index, pass the
value at that index.

We use env->isolate() rather than args.GetIsolate(), but since env
was constructed from args, this is the same isolate.

PR-URL: #8850
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. vm Issues and PRs related to the vm subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants