Bug 1257444: Actually return the desired selection. r=mrbkap, a=ritu
authorKyle Huey <khuey@kylehuey.com>
Thu, 17 Mar 2016 17:27:33 -0700
changeset 323550 1bbfacda02d2fc715ef47f46724e48733f0db357
parent 323549 069a89a99547293cc750c37e1bd9899754b31059
child 323551 77d83926c43db009ed98d9e29f79619be0fda04e
push id5913
push userjlund@mozilla.com
push dateMon, 25 Apr 2016 16:57:49 +0000
treeherdermozilla-beta@dcaf0a6fa115 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap, ritu
bugs1257444
milestone47.0a2
Bug 1257444: Actually return the desired selection. r=mrbkap, a=ritu
embedding/components/find/nsWebBrowserFind.cpp
--- a/embedding/components/find/nsWebBrowserFind.cpp
+++ b/embedding/components/find/nsWebBrowserFind.cpp
@@ -812,17 +812,17 @@ nsWebBrowserFind::GetFrameSelection(nsPI
   if (frame) {
     frame->GetSelectionController(presContext, getter_AddRefs(selCon));
     selCon->GetSelection(nsISelectionController::SELECTION_NORMAL,
                          getter_AddRefs(sel));
     if (sel) {
       int32_t count = -1;
       sel->GetRangeCount(&count);
       if (count > 0) {
-        return nullptr;
+        return sel.forget();
       }
     }
   }
 
   selCon = do_QueryInterface(presShell);
   selCon->GetSelection(nsISelectionController::SELECTION_NORMAL,
                        getter_AddRefs(sel));
   return sel.forget();