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

Unified Diff: debugger/QT/SkDebuggerGUI.cpp

Issue 849103004: Make SkStream *not* ref counted. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase, just in case. Created 5 years, 11 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 | « bench/nanobench.cpp ('k') | dm/DMSrcSink.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: debugger/QT/SkDebuggerGUI.cpp
diff --git a/debugger/QT/SkDebuggerGUI.cpp b/debugger/QT/SkDebuggerGUI.cpp
index 9e212981a786751393832bdd42b4f6ff8f54e94e..01d8c665e35ce8877a12d1e1831793d0723c4c1a 100644
--- a/debugger/QT/SkDebuggerGUI.cpp
+++ b/debugger/QT/SkDebuggerGUI.cpp
@@ -738,13 +738,12 @@ void SkDebuggerGUI::setupDirectoryWidget(const QString& path) {
void SkDebuggerGUI::loadPicture(const SkString& fileName) {
fFileName = fileName;
fLoading = true;
- SkStream* stream = SkNEW_ARGS(SkFILEStream, (fileName.c_str()));
+ SkAutoTDelete<SkStream> stream(SkNEW_ARGS(SkFILEStream, (fileName.c_str())));
SkPicture* picture = SkPicture::CreateFromStream(stream);
if (NULL == picture) {
QMessageBox::critical(this, "Error loading file", "Couldn't read file, sorry.");
- SkSafeUnref(stream);
return;
}
@@ -756,7 +755,6 @@ void SkDebuggerGUI::loadPicture(const SkString& fileName) {
fSkipCommands[i] = false;
}
- SkSafeUnref(stream);
SkSafeUnref(picture);
fActionProfile.setDisabled(false);
« no previous file with comments | « bench/nanobench.cpp ('k') | dm/DMSrcSink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698