File tree 1 file changed +11
-3
lines changed
chrome/browser/media/webrtc
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -162,9 +162,17 @@ WebRtcRemoteEventLogManager::~WebRtcRemoteEventLogManager() {
162
162
// while destruction took place, thereby avoiding endless attempts to upload
163
163
// the same file.
164
164
165
- // |network_connection_tracker_| might already have posted a task back to us,
166
- // but it will not run, because |task_runner_| has already been stopped.
167
- network_connection_tracker_->RemoveNetworkConnectionObserver (this );
165
+ if (network_connection_tracker_) {
166
+ // * |network_connection_tracker_| might already have posted a task back
167
+ // to us, but it will not run, because |task_runner_| has already been
168
+ // stopped.
169
+ // * RemoveNetworkConnectionObserver() should generally be called on the
170
+ // same thread as AddNetworkConnectionObserver(), but in this case it's
171
+ // okay to remove on a separate thread, because this only happens during
172
+ // Chrome shutdown, when no others tasks are running; there can be no
173
+ // concurrently executing notification from the tracker.
174
+ network_connection_tracker_->RemoveNetworkConnectionObserver (this );
175
+ }
168
176
}
169
177
170
178
void WebRtcRemoteEventLogManager::SetNetworkConnectionTracker (
You can’t perform that action at this time.
0 commit comments