aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skiaserve
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2017-03-14 14:35:02 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-15 19:25:45 +0000
commit0b83319b7f301145b7fc89d7096ddcea91d4a56b (patch)
tree171b46c0446b312c325be0f935c67e3ce8931396 /tools/skiaserve
parent81538ee611c7e12273496d0b33174254e9551749 (diff)
SkDynamicMemoryWStream::detachAsStream() returns unique_ptr
https://crrev.com/2747183002 must land first. Change-Id: I65d1285a24d63c2c2f18662d511dea1c399511e1 Reviewed-on: https://skia-review.googlesource.com/9682 Commit-Queue: Hal Canary <halcanary@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'tools/skiaserve')
-rw-r--r--tools/skiaserve/urlhandlers/PostHandler.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/skiaserve/urlhandlers/PostHandler.cpp b/tools/skiaserve/urlhandlers/PostHandler.cpp
index 34beefae11..634a2e5da2 100644
--- a/tools/skiaserve/urlhandlers/PostHandler.cpp
+++ b/tools/skiaserve/urlhandlers/PostHandler.cpp
@@ -62,7 +62,8 @@ int PostHandler::handle(Request* request, MHD_Connection* connection,
MHD_destroy_post_processor(uc->fPostProcessor);
uc->fPostProcessor = nullptr;
- if (!request->initPictureFromStream(request->fUploadContext->fStream.detachAsStream())) {
+ std::unique_ptr<SkStreamAsset> stream(request->fUploadContext->fStream.detachAsStream());
+ if (!request->initPictureFromStream(stream.get())) {
fprintf(stderr, "Could not create picture from stream.\n");
return MHD_NO;
}