From 63c1557972512f718ca4bb3bd2cfb6f2feb6d318 Mon Sep 17 00:00:00 2001 From: Kyle Farnung Date: Wed, 24 May 2017 16:29:12 -0700 Subject: [PATCH] build: restore intl check for inspector * Upstream has a check that turns off inspector if intl is also turned off. Restoring that check so that without-intl builds will succeed. * Fixed upstream build break related to disabling inspector, will submit upstream PR. --- configure | 1 + src/node.cc | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/configure b/configure index d9676a8d8d7..c16ee257431 100755 --- a/configure +++ b/configure @@ -1307,6 +1307,7 @@ def configure_intl(o): def configure_inspector(o): disable_inspector = (options.without_inspector or + options.with_intl in (None, 'none') or options.without_ssl) o['variables']['v8_enable_inspector'] = 0 if disable_inspector else 1 diff --git a/src/node.cc b/src/node.cc index 534923bef9a..93f4d6a6c80 100644 --- a/src/node.cc +++ b/src/node.cc @@ -4091,6 +4091,15 @@ static void StartDebug(Environment* env, const char* path, } +static bool DebuggerStarted(Environment* env) { +#if HAVE_INSPECTOR + return v8_platform.InspectorStarted(env); +#else + return false; +#endif +} + + #ifdef __POSIX__ void RegisterSignalHandler(int signal, void (*handler)(int signal), @@ -4613,7 +4622,7 @@ inline int Start(Isolate* isolate, void* isolate_context, const char* path = argc > 1 ? argv[1] : nullptr; StartDebug(&env, path, debug_options); - if (debug_options.inspector_enabled() && !v8_platform.InspectorStarted(&env)) + if (debug_options.inspector_enabled() && !DebuggerStarted(&env)) return 12; // Signal internal error. env.set_abort_on_uncaught_exception(abort_on_uncaught_exception); @@ -4786,7 +4795,7 @@ inline int Start_TTDReplay(Isolate* isolate, void* isolate_context, // Start debug agent when argv has --debug StartDebug(&env, nullptr, debug_options); - if (debug_options.inspector_enabled()) + if (debug_options.inspector_enabled() && !DebuggerStarted(&env)) return 12; // Signal internal error. {