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

Unified Diff: third_party/WebKit/Source/wtf/text/AtomicStringTable.cpp

Issue 2696703008: Adds RefPtr::leakRef method to allow raw pointers that prevent destruct. (Closed)
Patch Set: Added deref in RefPtrTest.LeakRef to avoid memory leak. Created 3 years, 10 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/WebKit/Source/wtf/text/AtomicStringTable.cpp
diff --git a/third_party/WebKit/Source/wtf/text/AtomicStringTable.cpp b/third_party/WebKit/Source/wtf/text/AtomicStringTable.cpp
index bc40b4d64508b2bc236284373b523a2cf0f77d70..2c577689deafc8142913b81db8ac27457bd9641d 100644
--- a/third_party/WebKit/Source/wtf/text/AtomicStringTable.cpp
+++ b/third_party/WebKit/Source/wtf/text/AtomicStringTable.cpp
@@ -137,7 +137,7 @@ struct HashAndUTF8CharactersTranslator {
if (isAllASCII)
newString = StringImpl::create(buffer.characters, buffer.length);
- location = newString.release().leakRef();
+ location = newString.leakRef();
location->setHash(hash);
location->setIsAtomic(true);
}
« third_party/WebKit/Source/wtf/RefPtrTest.cpp ('K') | « third_party/WebKit/Source/wtf/RefPtrTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698