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

Unified Diff: base/ios/weak_nsobject.h

Issue 2943263003: Make WeakContainer safe when weak_nsobject.h is included from ARC code. (Closed)
Patch Set: Created 3 years, 6 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 | base/ios/weak_nsobject.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/ios/weak_nsobject.h
diff --git a/base/ios/weak_nsobject.h b/base/ios/weak_nsobject.h
index b1b8d1055b9969d981f7b83305048e8983027446..498cdee28c55ebfc47cd46a2a7aa9dca339b63de 100644
--- a/base/ios/weak_nsobject.h
+++ b/base/ios/weak_nsobject.h
@@ -49,7 +49,7 @@ namespace base {
// receives nullify() from the object's sentinel.
class WeakContainer : public base::RefCountedThreadSafe<WeakContainer> {
public:
- explicit WeakContainer(id object) : object_(object) {}
+ explicit WeakContainer(id object);
id object() {
DCHECK(checker_.CalledOnValidThread());
@@ -63,9 +63,9 @@ class WeakContainer : public base::RefCountedThreadSafe<WeakContainer> {
private:
friend base::RefCountedThreadSafe<WeakContainer>;
- ~WeakContainer() {}
+ ~WeakContainer();
base::ThreadChecker checker_;
- id object_;
+ __unsafe_unretained id object_;
};
} // namespace base
« no previous file with comments | « no previous file | base/ios/weak_nsobject.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698