diff options
author | Gireesh Punathil <gpunathi@in.ibm.com> | 2019-02-05 00:00:05 -0500 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-02-08 14:57:42 +0100 |
commit | c70e85372343ab445676cf2115f65a4e44f97c94 (patch) | |
tree | 06da51ee9ec6cc5c0fd78b3718129fdb84ea72b5 /src/node_platform.cc | |
parent | 3a4521a4a2af30bac7f67b5a02b4433a51e9d169 (diff) | |
download | android-node-v8-c70e85372343ab445676cf2115f65a4e44f97c94.tar.gz android-node-v8-c70e85372343ab445676cf2115f65a4e44f97c94.tar.bz2 android-node-v8-c70e85372343ab445676cf2115f65a4e44f97c94.zip |
src: nullcheck on trace controller
Insert a NULLCHECK prior to return. Ideally we do this in the caller,
but the TraceController object is somewhat special as:
1. It is accessed by most threads
2. It's life cycle is managed by Agent::Agent
3. It's getter is invoked through Base Methods (upstream)
Refs: https://github.com/nodejs/node/issues/25814
PR-URL: https://github.com/nodejs/node/pull/25943
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'src/node_platform.cc')
-rw-r--r-- | src/node_platform.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/node_platform.cc b/src/node_platform.cc index b930edb156..139e2ebfc1 100644 --- a/src/node_platform.cc +++ b/src/node_platform.cc @@ -459,6 +459,7 @@ double NodePlatform::CurrentClockTimeMillis() { } TracingController* NodePlatform::GetTracingController() { + CHECK_NOT_NULL(tracing_controller_); return tracing_controller_; } |