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

Unified Diff: src/pdf/SkPDFDevice.cpp

Issue 1809733002: detach -> release (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: (C) Created 4 years, 9 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 | « src/pathops/SkOpSpan.cpp ('k') | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.cpp
diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp
index 86d4d07acbd3f5d9f79ff04d8407c2126ee7f647..94a103aeb1ad2a8b849d6bc19d9abc40163ef0a7 100644
--- a/src/pdf/SkPDFDevice.cpp
+++ b/src/pdf/SkPDFDevice.cpp
@@ -595,9 +595,9 @@ struct ContentEntry {
// If the stack is too deep we could get Stack Overflow.
// So we manually destruct the object.
~ContentEntry() {
- ContentEntry* val = fNext.detach();
+ ContentEntry* val = fNext.release();
while (val != nullptr) {
- ContentEntry* valNext = val->fNext.detach();
+ ContentEntry* valNext = val->fNext.release();
// When the destructor is called, fNext is nullptr and exits.
delete val;
val = valNext;
@@ -1851,7 +1851,7 @@ ContentEntry* SkPDFDevice::setUpContentEntry(const SkClipStack* clipStack,
contentEntries->reset(entry);
setLastContentEntry(entry);
} else if (xfermode == SkXfermode::kDstOver_Mode) {
- entry->fNext.reset(contentEntries->detach());
+ entry->fNext.reset(contentEntries->release());
contentEntries->reset(entry);
} else {
lastContentEntry->fNext.reset(entry);
@@ -1885,7 +1885,7 @@ void SkPDFDevice::finishContentEntry(SkXfermode::Mode xfermode,
// of the content entries. If nothing was drawn, it needs to be
// removed.
SkAutoTDelete<ContentEntry>* contentEntries = getContentEntries();
- contentEntries->reset(firstContentEntry->fNext.detach());
+ contentEntries->reset(firstContentEntry->fNext.release());
}
return;
}
« no previous file with comments | « src/pathops/SkOpSpan.cpp ('k') | src/pdf/SkPDFDocument.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698