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

Unified Diff: mojo/edk/system/dispatcher.cc

Issue 1403033003: Last set of fixes to make the src/mojo/edk pass the page cycler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes now that OnError can be called multiple times Created 5 years, 2 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
Index: mojo/edk/system/dispatcher.cc
diff --git a/mojo/edk/system/dispatcher.cc b/mojo/edk/system/dispatcher.cc
index e7426e513f284b9becdb38f31f72d4cb8bd0c331..e5f078793610b383816210371029c2a36b0ff1aa 100644
--- a/mojo/edk/system/dispatcher.cc
+++ b/mojo/edk/system/dispatcher.cc
@@ -453,6 +453,7 @@ void Dispatcher::StartSerialize(size_t* max_size,
DCHECK(max_size);
DCHECK(max_platform_handles);
DCHECK(!is_closed_);
+ base::AutoLock locker(lock_);
StartSerializeImplNoLock(max_size, max_platform_handles);
}
@@ -467,13 +468,7 @@ bool Dispatcher::EndSerializeAndClose(void* destination,
// shouldn't be in |Core|'s handle table.
is_closed_ = true;
-#if !defined(NDEBUG)
- // See the comment above |EndSerializeAndCloseImplNoLock()|. In brief: Locking
- // isn't actually needed, but we need to satisfy assertions (which we don't
- // want to remove or weaken).
base::AutoLock locker(lock_);
-#endif
-
return EndSerializeAndCloseImplNoLock(destination, actual_size,
platform_handles);
}

Powered by Google App Engine
This is Rietveld 408576698