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

Unified Diff: third_party/mojo/src/mojo/public/cpp/bindings/lib/shared_data.h

Issue 1369933004: Revert of Implement a simple ThreadChecker for Mojo and add to |internal::SharedData| and |internal::Router|. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: third_party/mojo/src/mojo/public/cpp/bindings/lib/shared_data.h
diff --git a/third_party/mojo/src/mojo/public/cpp/bindings/lib/shared_data.h b/third_party/mojo/src/mojo/public/cpp/bindings/lib/shared_data.h
index 2676224c82e0ca0044de55d73d131ef167c2f940..54c9346fc98539eaea8569ab1669a99c66dd0e1d 100644
--- a/third_party/mojo/src/mojo/public/cpp/bindings/lib/shared_data.h
+++ b/third_party/mojo/src/mojo/public/cpp/bindings/lib/shared_data.h
@@ -5,9 +5,6 @@
#ifndef MOJO_PUBLIC_CPP_BINDINGS_LIB_SHARED_DATA_H_
#define MOJO_PUBLIC_CPP_BINDINGS_LIB_SHARED_DATA_H_
-#include <assert.h>
-
-#include "mojo/public/cpp/bindings/lib/thread_checker.h"
#include "mojo/public/cpp/system/macros.h"
namespace mojo {
@@ -56,12 +53,8 @@
Holder() : value(), ref_count_(1) {}
Holder(const T& value) : value(value), ref_count_(1) {}
- void Retain() {
- assert(thread_checker_.CalledOnValidThread());
- ++ref_count_;
- }
+ void Retain() { ++ref_count_; }
void Release() {
- assert(thread_checker_.CalledOnValidThread());
if (--ref_count_ == 0)
delete this;
}
@@ -70,7 +63,6 @@
private:
int ref_count_;
- ThreadChecker thread_checker_;
MOJO_DISALLOW_COPY_AND_ASSIGN(Holder);
};

Powered by Google App Engine
This is Rietveld 408576698