-
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: fix coverity coverity warning #50846
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
mhdawson
commented
Nov 21, 2023
- reduce copying by using std::move
nodejs-github-bot
added
c++
Issues and PRs that require attention from people who are familiar with C++.
needs-ci
PRs that need a full CI run.
vm
Issues and PRs related to the vm subsystem.
labels
Nov 21, 2023
Coverity warning std::vector<Local<String>> params = {
1464 String::NewFromUtf8(isolate, "exports").ToLocalChecked(),
1465 String::NewFromUtf8(isolate, "require").ToLocalChecked(),
1466 String::NewFromUtf8(isolate, "module").ToLocalChecked(),
1467 String::NewFromUtf8(isolate, "__filename").ToLocalChecked(),
1468 String::NewFromUtf8(isolate, "__dirname").ToLocalChecked()};
1469
1470 TryCatchScope try_catch(env);
1471
1472 ContextifyContext::CompileFunctionAndCacheResult(env,
1473 context,
1474 &source,
CID 329955 (#1 of 1): COPY_INSTEAD_OF_MOVE (COPY_INSTEAD_OF_MOVE)
1. copy_constructor_call: params is passed-by-value as parameter to CompileFunctionAndCacheResult when it could be moved instead.
Use std::move(params) instead of params.
1475 params,
1476 std::vector<Local<Object>>(),
1477 options,
1478 true,
1479 id_symbol,
1480 try_catch); I think the suggested std::move will avoid copying the contents of the vector. |
tniessen
approved these changes
Nov 21, 2023
Nit: duplicate word in commit message |
- reduce copying by using std::move Signed-off-by: Michael Dawson <midawson@redhat.com>
@tniessen thanks, fixed commit message. |
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Nov 22, 2023
marco-ippolito
approved these changes
Nov 22, 2023
jasnell
approved these changes
Nov 24, 2023
lpinca
approved these changes
Nov 24, 2023
lpinca
added
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Nov 24, 2023
nodejs-github-bot
removed
the
commit-queue
Add this label to land a pull request using GitHub Actions.
label
Nov 24, 2023
Landed in 6dbf678 |
martenrichter
pushed a commit
to martenrichter/node
that referenced
this pull request
Nov 26, 2023
- reduce copying by using std::move Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: nodejs#50846 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
lucshi
pushed a commit
to lucshi/node
that referenced
this pull request
Nov 27, 2023
- reduce copying by using std::move Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: nodejs#50846 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
RafaelGSS
pushed a commit
that referenced
this pull request
Nov 27, 2023
- reduce copying by using std::move Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #50846 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Merged
RafaelGSS
pushed a commit
that referenced
this pull request
Nov 29, 2023
- reduce copying by using std::move Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #50846 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
RafaelGSS
pushed a commit
that referenced
this pull request
Nov 30, 2023
- reduce copying by using std::move Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #50846 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
UlisesGascon
pushed a commit
that referenced
this pull request
Dec 11, 2023
- reduce copying by using std::move Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #50846 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Merged
UlisesGascon
pushed a commit
that referenced
this pull request
Dec 13, 2023
- reduce copying by using std::move Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #50846 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
UlisesGascon
pushed a commit
that referenced
this pull request
Dec 15, 2023
- reduce copying by using std::move Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #50846 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
UlisesGascon
pushed a commit
that referenced
this pull request
Dec 19, 2023
- reduce copying by using std::move Signed-off-by: Michael Dawson <midawson@redhat.com> PR-URL: #50846 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.