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

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 2554563002: [pdf] Reset defer_page_unload to original value. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pdf/pdfium/pdfium_engine.cc
diff --git a/pdf/pdfium/pdfium_engine.cc b/pdf/pdfium/pdfium_engine.cc
index 0853d79beb294ae9a103eb0e065615401ec53148..3dab6dbcb86f8c95dbcfec97919af478d1bcacb2 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -2470,9 +2470,10 @@ int PDFiumEngine::GetMostVisiblePage() {
// to defer the page deletion otherwise we could potentially delete the page
// that originated the calling JS request and destroy the objects that are
// currently being used.
+ bool old_defer_page_unload = defer_page_unload_;
Tom Sepez 2016/12/05 17:54:05 base::AutoReset maybe?
dsinclair 2016/12/05 20:07:48 Done.
defer_page_unload_ = true;
CalculateVisiblePages();
- defer_page_unload_ = false;
+ defer_page_unload_ = old_defer_page_unload;
return most_visible_page_;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698