Commit 046f66a5 authored by Myk Melez's avatar Myk Melez Committed by James M Snell
Browse files

src: fix building --without-v8-plartform

* declare v8_platform.platform_ unconditionally

  v8_platform.platform_ is referenced by node::Start
  without regard to the value of NODE_USE_V8_PLATFORM,
  so it should be declared unconditionally, otherwise
  Node fails to compile when !NODE_USE_V8_PLATFORM.

* update v8_platform.StartInspector signature

  The call signature of v8_platform.StartInspector needs
  to be the same whether or not NODE_USE_V8_PLATFORM,
  otherwise Node will fail to compile if HAVE_INSPECTOR
  and !NODE_USE_V8_PLATFORM.

* don't call tracing_agent->Start w/nullptr

  node::tracing::Agent::Start can't accept a nullptr
  argument to its platform parameter, so don't call it
  when Node is compiled with NODE_USE_V8_PLATFORM=0.

* refactor tracing_agent into v8_platform

  Move tracing_agent global into the v8_platform struct,
  renaming it to tracing_agent_; CHECK(tracing_agent_ ==
  nullptr) in StartTracingAgent() to detect double calls;
  and relace another tracing_agent->Stop() call with a call
  to StopTracingAgent().

PR-URL: https://github.com/nodejs/node/pull/11088


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
parent 7d2dc90a
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment