diff options
author | Anna Henningsen <anna@addaleax.net> | 2019-02-01 23:47:38 +0100 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-02-05 21:55:54 +0100 |
commit | 39eca841c30e1a54424b85f34e8dd56b2648f930 (patch) | |
tree | 2ab9c7bc285e20f85cefff16c6441c726bbed126 /src/inspector/tracing_agent.cc | |
parent | 8d63f4037e52eda125c5a70dafa602f47c13d0ad (diff) | |
download | android-node-v8-39eca841c30e1a54424b85f34e8dd56b2648f930.tar.gz android-node-v8-39eca841c30e1a54424b85f34e8dd56b2648f930.tar.bz2 android-node-v8-39eca841c30e1a54424b85f34e8dd56b2648f930.zip |
src: split ownsProcessState off isMainThread
Embedders may want to control whether a Node.js instance
controls the current process, similar to what we currently
have with `Worker`s.
Previously, the `isMainThread` flag had a bit of a double usage,
both for indicating whether we are (not) running a Worker and
whether we can modify per-process state.
PR-URL: https://github.com/nodejs/node/pull/25881
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/inspector/tracing_agent.cc')
-rw-r--r-- | src/inspector/tracing_agent.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/inspector/tracing_agent.cc b/src/inspector/tracing_agent.cc index fb8467a1b9..09d213d8ae 100644 --- a/src/inspector/tracing_agent.cc +++ b/src/inspector/tracing_agent.cc @@ -141,7 +141,7 @@ DispatchResponse TracingAgent::start( return DispatchResponse::Error( "Call NodeTracing::end to stop tracing before updating the config"); } - if (!env_->is_main_thread()) { + if (!env_->owns_process_state()) { return DispatchResponse::Error( "Tracing properties can only be changed through main thread sessions"); } |