DescriptionAdds RefPtr::leakRef method to allow raw pointers that prevent destruct.
Part of the removal of PassRefPtr.
Adds RefPtr::leakRef method which returns a raw pointer while
maintaining a ref to the RefCounted object. This creates a hanging ref
on the object.
RefPtr::leakRef is intended to replace PassRefPtr::leakRef.
Also replaces all conversions of RefPtr objects to PassRefPtr objects
in order to use PassRefPtr::leakRef (i.e. through .release().leakRef())
with direct usage of the new RefPtr::leakRef method.
BUG=494719
Review-Url: https://codereview.chromium.org/2696703008
Cr-Commit-Position: refs/heads/master@{#451658}
Committed: https://chromium.googlesource.com/chromium/src/+/1da78e8df793d7a431a3f29662e59116736a7cd5
Patch Set 1 #Patch Set 2 : Added unit test for new RefPtr::leakRef method. #Patch Set 3 : Added deref in RefPtrTest.LeakRef to avoid memory leak. #
Total comments: 1
Messages
Total messages: 26 (18 generated)
|