From 2c293b3ffc29e9e4bcc82ac383fa9d95aeb71cc9 Mon Sep 17 00:00:00 2001 From: Daniel Bevenius Date: Tue, 23 May 2017 07:40:48 +0200 Subject: [PATCH 1/2] src: fix InspectorStarted macro guard Currently the InspectorStarted function is guarded by the else clause of the NODE_USE_V8_PLATFORM macro. If node is configured --without-ssl then NODE_USE_V8_PLATFORM will be 1 but the nested HAVE_INSPECTOR macro will not be 0 which will lead to that there will be no InspectorStarted function defined. If building --without-inspector or --without-ssl the following compilation error will occur: ../src/node.cc:4470:57: error: no member named 'InspectorStarted' in 'node::(anonymous struct at ../src/node.cc:241:8)' if (debug_options.inspector_enabled() && !v8_platform.InspectorStarted(&env)) ~~~~~~~~~~~ ^ ../src/node.cc:4470:57: error: no member named 'InspectorStarted' in 'node::(anonymous struct at ../src/node.cc:241:8)' if (debug_options.inspector_enabled() && !v8_platform.InspectorStarted(&env)) ~~~~~~~~~~~ ^ 1 error generated. This commit adds a separate if preprocessor directive to catch the case when either --without-ssl/--without-inspector and --without-v8-platform combinations are used to configure node. PR-URL: https://github.com/nodejs/node/pull/13167 Reviewed-By: Ben Noordhuis Reviewed-By: Kyle Farnung --- src/node.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/node.cc b/src/node.cc index 0e3024b4b04..e75ce1f528d 100644 --- a/src/node.cc +++ b/src/node.cc @@ -303,10 +303,13 @@ static struct { "so event tracing is not available.\n"); } void StopTracingAgent() {} +#endif // !NODE_USE_V8_PLATFORM + +#if NODE_USE_V8_PLATFORM == 0 || HAVE_INSPECTOR == 0 bool InspectorStarted(Environment *env) { return false; } -#endif // !NODE_USE_V8_PLATFORM +#endif // !NODE_USE_V8_PLATFORM || !HAVE_INSPECTOR } v8_platform; #ifdef __POSIX__ From 4da26c05fe4b5a189e3f930068075347cada214d Mon Sep 17 00:00:00 2001 From: Kyle Farnung Date: Wed, 24 May 2017 16:29:12 -0700 Subject: [PATCH 2/2] 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. PR-URL: https://github.com/nodejs/node-chakracore/pull/262 Reviewed-By: Kunal Pathak --- configure | 1 + 1 file changed, 1 insertion(+) 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