Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(78)

Side by Side Diff: jingle/glue/thread_wrapper.cc

Issue 2159753002: Do not access member fStop_ variable webrtc::Thread class directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove fStop check Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "jingle/glue/thread_wrapper.h" 5 #include "jingle/glue/thread_wrapper.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 TRACE_EVENT2("webrtc", "JingleThreadWrapper::Dispatch", "src_file_and_line", 154 TRACE_EVENT2("webrtc", "JingleThreadWrapper::Dispatch", "src_file_and_line",
155 message->posted_from.file_and_line(), "src_func", 155 message->posted_from.file_and_line(), "src_func",
156 message->posted_from.function_name()); 156 message->posted_from.function_name());
157 message->phandler->OnMessage(message); 157 message->phandler->OnMessage(message);
158 } 158 }
159 159
160 void JingleThreadWrapper::Send(const rtc::Location& posted_from, 160 void JingleThreadWrapper::Send(const rtc::Location& posted_from,
161 rtc::MessageHandler* handler, 161 rtc::MessageHandler* handler,
162 uint32_t id, 162 uint32_t id,
163 rtc::MessageData* data) { 163 rtc::MessageData* data) {
164 if (fStop_)
165 return;
166
167 JingleThreadWrapper* current_thread = JingleThreadWrapper::current(); 164 JingleThreadWrapper* current_thread = JingleThreadWrapper::current();
168 DCHECK(current_thread != nullptr) << "Send() can be called only from a " 165 DCHECK(current_thread != nullptr) << "Send() can be called only from a "
169 "thread that has JingleThreadWrapper."; 166 "thread that has JingleThreadWrapper.";
170 167
171 rtc::Message message; 168 rtc::Message message;
172 message.posted_from = posted_from; 169 message.posted_from = posted_from;
173 message.phandler = handler; 170 message.phandler = handler;
174 message.message_id = id; 171 message.message_id = id;
175 message.pdata = data; 172 message.pdata = data;
176 173
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 325
329 void JingleThreadWrapper::Stop() { 326 void JingleThreadWrapper::Stop() {
330 NOTREACHED(); 327 NOTREACHED();
331 } 328 }
332 329
333 void JingleThreadWrapper::Run() { 330 void JingleThreadWrapper::Run() {
334 NOTREACHED(); 331 NOTREACHED();
335 } 332 }
336 333
337 } // namespace jingle_glue 334 } // namespace jingle_glue
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698