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

Unified Diff: runtime/bin/file_system_watcher_macos.cc

Issue 157813011: Use Thread::Compare instead of ==. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/file_system_watcher_macos.cc
diff --git a/runtime/bin/file_system_watcher_macos.cc b/runtime/bin/file_system_watcher_macos.cc
index 413fcad62b8bee1dedeaeb72d7243a60e650c1c7..afc112719b2f86027bd067d1156a5fe576ba953e 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -97,7 +97,8 @@ class FSEventsWatcher {
static void StartCallback(CFRunLoopTimerRef timer, void* info) {
Node* node = reinterpret_cast<Node*>(info);
- ASSERT(node->watcher_->threadId_ == Thread::GetCurrentThreadId());
+ ASSERT(Thread::Compare(node->watcher_->threadId_,
+ Thread::GetCurrentThreadId());
FSEventStreamContext context;
memset(&context, 0, sizeof(context));
context.info = reinterpret_cast<void*>(node);
@@ -148,7 +149,8 @@ class FSEventsWatcher {
static void StopCallback(CFRunLoopTimerRef timer, void* info) {
Node* node = reinterpret_cast<Node*>(info);
- ASSERT(node->watcher_->threadId_ == Thread::GetCurrentThreadId());
+ ASSERT(Thread::Compare(node->watcher_->threadId_,
+ Thread::GetCurrentThreadId());
FSEventStreamStop(node->ref_);
FSEventStreamInvalidate(node->ref_);
FSEventStreamRelease(node->ref_);
@@ -240,7 +242,8 @@ class FSEventsWatcher {
static void StopCallback(CFRunLoopTimerRef timer, void* info) {
FSEventsWatcher* watcher = reinterpret_cast<FSEventsWatcher*>(info);
- ASSERT(watcher->threadId_ == Thread::GetCurrentThreadId());
+ ASSERT(Thread::Compare(node->watcher_->threadId_,
+ Thread::GetCurrentThreadId());
CFRunLoopStop(watcher->run_loop_);
}
@@ -276,7 +279,8 @@ class FSEventsWatcher {
const FSEventStreamEventFlags event_flags[],
const FSEventStreamEventId event_ids[]) {
Node* node = reinterpret_cast<Node*>(client);
- ASSERT(node->watcher()->threadId_ == Thread::GetCurrentThreadId());
+ ASSERT(Thread::Compare(node->watcher_->threadId_,
+ Thread::GetCurrentThreadId());
// `ready` is set on same thread as this callback is invoked, so we don't
// need to lock here.
if (!node->ready()) return;
« 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