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

Unified Diff: pdf/pdfium/pdfium_engine.cc

Issue 2960753002: Fix bug where Chromium crashes in PDFiumEngine::OnMouseUp(). (Closed)
Patch Set: Created 3 years, 6 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 | « 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 eb7f4cb08fb315aac8cb6540a857b39c3212fd21..ab53670eae00e6efabf1e77e9b88beaf50c5ce7c 100644
--- a/pdf/pdfium/pdfium_engine.cc
+++ b/pdf/pdfium/pdfium_engine.cc
@@ -1857,7 +1857,7 @@ bool PDFiumEngine::OnMouseUp(const pp::MouseInputEvent& event) {
FORM_OnLButtonUp(form_, pages_[page_index]->GetPage(), 0, page_x, page_y);
}
- if (area == PDFiumPage::FORM_TEXT_AREA)
+ if (area == PDFiumPage::FORM_TEXT_AREA && last_page_mouse_down_ != -1)
Lei Zhang 2017/06/27 01:26:51 This will definitely fix the crash, but another qu
dsinclair 2017/06/27 15:24:21 FORM_GetSelectedText returns the text from a text
SetFormSelectedText(form_, pages_[last_page_mouse_down_]->GetPage());
if (!selecting_)
« 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