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

Unified Diff: pdf/out_of_process_instance.cc

Issue 1323943011: Fix memory leak of PreviewModeClient in PDF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « pdf/out_of_process_instance.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/out_of_process_instance.cc
diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
index 5f60a4bce286e7abce032d2cf657a4b03d87da62..2e62e8bde81eda1937714e5af58452bc8b8ba1c5 100644
--- a/pdf/out_of_process_instance.cc
+++ b/pdf/out_of_process_instance.cc
@@ -782,7 +782,8 @@ void OutOfProcessInstance::DidOpen(int32_t result) {
void OutOfProcessInstance::DidOpenPreview(int32_t result) {
if (result == PP_OK) {
- preview_engine_.reset(PDFEngine::Create(new PreviewModeClient(this)));
+ preview_client_.reset(new PreviewModeClient(this));
+ preview_engine_.reset(PDFEngine::Create(preview_client_.get()));
preview_engine_->HandleDocumentLoad(embed_preview_loader_);
} else {
NOTREACHED();
« no previous file with comments | « pdf/out_of_process_instance.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698