Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
build: restore intl check for inspector
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
kfarnung committed May 24, 2017
1 parent 74474a1 commit 63c1557
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
13 changes: 11 additions & 2 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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.

{
Expand Down

0 comments on commit 63c1557

Please sign in to comment.