Skip to content

Commit 4b57088

Browse files
codebyteretargos
authored andcommitted
src: fewer uses of NODE_USE_V8_PLATFORM
PR-URL: #30029 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
1 parent 6269a3c commit 4b57088

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/env.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ class Environment : public MemoryRetainer {
869869
void CreateProperties();
870870
// Should be called before InitializeInspector()
871871
void InitializeDiagnostics();
872-
#if HAVE_INSPECTOR && NODE_USE_V8_PLATFORM
872+
#if HAVE_INSPECTOR
873873
// If the environment is created for a worker, pass parent_handle and
874874
// the ownership if transferred into the Environment.
875875
int InitializeInspector(inspector::ParentInspectorHandle* parent_handle);

src/node.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ MaybeLocal<Value> ExecuteBootstrapper(Environment* env,
220220
return scope.EscapeMaybe(result);
221221
}
222222

223-
#if HAVE_INSPECTOR && NODE_USE_V8_PLATFORM
223+
#if HAVE_INSPECTOR
224224
int Environment::InitializeInspector(
225225
inspector::ParentInspectorHandle* parent_handle) {
226226
std::string inspector_path;

src/node_main_instance.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ std::unique_ptr<Environment> NodeMainInstance::CreateMainEnvironment(
204204

205205
// TODO(joyeecheung): when we snapshot the bootstrapped context,
206206
// the inspector and diagnostics setup should after after deserialization.
207-
#if HAVE_INSPECTOR && NODE_USE_V8_PLATFORM
207+
#if HAVE_INSPECTOR
208208
*exit_code = env->InitializeInspector(nullptr);
209209
#endif
210210
if (*exit_code != 0) {

src/node_worker.cc

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "util-inl.h"
99
#include "async_wrap-inl.h"
1010

11-
#if NODE_USE_V8_PLATFORM && HAVE_INSPECTOR
11+
#if HAVE_INSPECTOR
1212
#include "inspector/worker_inspector.h" // ParentInspectorHandle
1313
#endif
1414

@@ -39,7 +39,7 @@ namespace worker {
3939

4040
namespace {
4141

42-
#if NODE_USE_V8_PLATFORM && HAVE_INSPECTOR
42+
#if HAVE_INSPECTOR
4343
void WaitForWorkerInspectorToStop(Environment* child) {
4444
child->inspector_agent()->WaitForDisconnect();
4545
child->inspector_agent()->Stop();
@@ -82,7 +82,7 @@ Worker::Worker(Environment* env,
8282
Number::New(env->isolate(), static_cast<double>(thread_id_)))
8383
.Check();
8484

85-
#if NODE_USE_V8_PLATFORM && HAVE_INSPECTOR
85+
#if HAVE_INSPECTOR
8686
inspector_parent_handle_ =
8787
env->inspector_agent()->GetParentHandle(thread_id_, url);
8888
#endif
@@ -193,7 +193,7 @@ void Worker::Run() {
193193
Locker locker(isolate_);
194194
Isolate::Scope isolate_scope(isolate_);
195195
SealHandleScope outer_seal(isolate_);
196-
#if NODE_USE_V8_PLATFORM && HAVE_INSPECTOR
196+
#if HAVE_INSPECTOR
197197
bool inspector_started = false;
198198
#endif
199199

@@ -225,7 +225,7 @@ void Worker::Run() {
225225
env_->stop_sub_worker_contexts();
226226
env_->RunCleanup();
227227
RunAtExit(env_.get());
228-
#if NODE_USE_V8_PLATFORM && HAVE_INSPECTOR
228+
#if HAVE_INSPECTOR
229229
if (inspector_started)
230230
WaitForWorkerInspectorToStop(env_.get());
231231
#endif
@@ -270,7 +270,7 @@ void Worker::Run() {
270270
if (is_stopped()) return;
271271
{
272272
env_->InitializeDiagnostics();
273-
#if NODE_USE_V8_PLATFORM && HAVE_INSPECTOR
273+
#if HAVE_INSPECTOR
274274
env_->InitializeInspector(inspector_parent_handle_.release());
275275
inspector_started = true;
276276
#endif

src/node_worker.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class Worker : public AsyncWrap {
6565
bool start_profiler_idle_notifier_;
6666
uv_thread_t tid_;
6767

68-
#if NODE_USE_V8_PLATFORM && HAVE_INSPECTOR
68+
#if HAVE_INSPECTOR
6969
std::unique_ptr<inspector::ParentInspectorHandle> inspector_parent_handle_;
7070
#endif
7171

0 commit comments

Comments
 (0)