Oilpan: Forbid adoptRef(X*) where X is RefCountedGarbageCollected
Once https://codereview.chromium.org/614373007/ lands, the following code doesn't work as expected (It confuses reference counting). class X : public RefCountedGarbageCollected<X> { static PassRefPtr<X> create() { return adoptRef(new X); } } Instead we have to write: class X : public RefCountedGarbageCollected<X> { static X* create() { return new X; } } This CL adds a compile-time verification to detect adoptRef(X*) where X is RefCountedGarbageCollected. BUG=420515 Review URL: https://codereview.chromium.org/647393002 git-svn-id: svn://svn.chromium.org/blink/trunk@185124 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment