summaryrefslogtreecommitdiff
path: root/src/tracing
diff options
context:
space:
mode:
authorGireesh Punathil <gpunathi@in.ibm.com>2019-02-05 00:00:05 -0500
committerAnna Henningsen <anna@addaleax.net>2019-02-08 14:57:42 +0100
commitc70e85372343ab445676cf2115f65a4e44f97c94 (patch)
tree06da51ee9ec6cc5c0fd78b3718129fdb84ea72b5 /src/tracing
parent3a4521a4a2af30bac7f67b5a02b4433a51e9d169 (diff)
downloadandroid-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/tracing')
-rw-r--r--src/tracing/agent.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tracing/agent.h b/src/tracing/agent.h
index d7d67ce2de..2e95e38582 100644
--- a/src/tracing/agent.h
+++ b/src/tracing/agent.h
@@ -81,7 +81,9 @@ class Agent {
~Agent();
TracingController* GetTracingController() {
- return tracing_controller_.get();
+ TracingController* controller = tracing_controller_.get();
+ CHECK_NOT_NULL(controller);
+ return controller;
}
enum UseDefaultCategoryMode {