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: remove unused isolate variable #25368

Closed
wants to merge 1 commit into from

Conversation

@danbev
Copy link
Member

commented Jan 6, 2019

Currently the following compiler warning is generated:

../src/node_task_queue.cc:93:12: warning:
unused variable 'isolate' [-Wunused-variable]
  Isolate* isolate = env->isolate();
           ^
1 warning generated.

This commit removes the unused variable.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
src: remove unused isolate variable
Currently the following compiler warning is generated:
../src/node_task_queue.cc:93:12: warning:
unused variable 'isolate' [-Wunused-variable]
  Isolate* isolate = env->isolate();
           ^
1 warning generated.

This commit removes the unused variable.
@danbev

This comment has been minimized.

Copy link
Member Author

commented Jan 6, 2019

@jasnell
jasnell approved these changes Jan 6, 2019
@cjihrig
cjihrig approved these changes Jan 6, 2019
@cjihrig

This comment has been minimized.

Copy link
Contributor

commented Jan 6, 2019

FWIW, I'm in favor of fast tracking trivial compiler warning fixes like this one.

@danbev danbev added the fast-track label Jan 6, 2019

@danbev

This comment has been minimized.

Copy link
Member Author

commented Jan 6, 2019

Please +1 for fast tracking.

@addaleax

This comment has been minimized.

Copy link
Member

commented Jan 6, 2019

Landed in 398916a

@addaleax addaleax closed this Jan 6, 2019

addaleax added a commit that referenced this pull request Jan 6, 2019
src: remove unused isolate variable
Currently the following compiler warning is generated:
../src/node_task_queue.cc:93:12: warning:
unused variable 'isolate' [-Wunused-variable]
  Isolate* isolate = env->isolate();
           ^
1 warning generated.

This commit removes the unused variable.

PR-URL: #25368
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>

@danbev danbev deleted the danbev:node_task_unused_var branch Jan 7, 2019

@starkwang

This comment has been minimized.

Copy link
Contributor

commented Jan 9, 2019

This change seems no need to be backported. The removed isolate variable is being used in here:

node/src/bootstrapper.cc

Lines 113 to 129 in 7d46437

void SetupPromises(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
Isolate* isolate = env->isolate();
CHECK(args[0]->IsFunction());
CHECK(args[1]->IsObject());
Local<Object> constants = args[1].As<Object>();
NODE_DEFINE_CONSTANT(constants, kPromiseRejectWithNoHandler);
NODE_DEFINE_CONSTANT(constants, kPromiseHandlerAddedAfterReject);
NODE_DEFINE_CONSTANT(constants, kPromiseResolveAfterResolved);
NODE_DEFINE_CONSTANT(constants, kPromiseRejectAfterResolved);
isolate->SetPromiseRejectCallback(PromiseRejectCallback);
env->set_promise_handler_function(args[0].As<Function>());
}

refack added a commit to refack/node that referenced this pull request Jan 14, 2019
src: remove unused isolate variable
Currently the following compiler warning is generated:
../src/node_task_queue.cc:93:12: warning:
unused variable 'isolate' [-Wunused-variable]
  Isolate* isolate = env->isolate();
           ^
1 warning generated.

This commit removes the unused variable.

PR-URL: nodejs#25368
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
addaleax added a commit that referenced this pull request Jan 15, 2019
src: remove unused isolate variable
Currently the following compiler warning is generated:
../src/node_task_queue.cc:93:12: warning:
unused variable 'isolate' [-Wunused-variable]
  Isolate* isolate = env->isolate();
           ^
1 warning generated.

This commit removes the unused variable.

PR-URL: #25368
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@BridgeAR BridgeAR referenced this pull request Jan 16, 2019
BridgeAR added a commit to BridgeAR/node that referenced this pull request Jan 16, 2019
src: remove unused isolate variable
Currently the following compiler warning is generated:
../src/node_task_queue.cc:93:12: warning:
unused variable 'isolate' [-Wunused-variable]
  Isolate* isolate = env->isolate();
           ^
1 warning generated.

This commit removes the unused variable.

PR-URL: nodejs#25368
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
BridgeAR added a commit to BridgeAR/node that referenced this pull request Jan 17, 2019
src: remove unused isolate variable
Currently the following compiler warning is generated:
../src/node_task_queue.cc:93:12: warning:
unused variable 'isolate' [-Wunused-variable]
  Isolate* isolate = env->isolate();
           ^
1 warning generated.

This commit removes the unused variable.

PR-URL: nodejs#25368
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@MylesBorins MylesBorins referenced this pull request Jan 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.