Last Comment Bug 712571 - nsIFilePicker.filterIndex always returns 0
: nsIFilePicker.filterIndex always returns 0
Status: VERIFIED FIXED
[qa!]
: regression
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla12
Assigned To: Jim Mathies [:jimm]
:
Mentors:
Depends on:
Blocks: abp 661991
  Show dependency treegraph
 
Reported: 2011-12-21 00:34 PST by Wladimir Palant
Modified: 2012-02-02 09:04 PST (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
+
verified


Attachments
Restartless extension for testing (931 bytes, application/x-xpinstall)
2011-12-21 00:34 PST, Wladimir Palant
no flags Details
fix (768 bytes, patch)
2011-12-21 09:36 PST, Jim Mathies [:jimm]
neil: review+
akeybl: approval‑mozilla‑aurora+
Details | Diff | Review

Description Wladimir Palant 2011-12-21 00:34:34 PST
Created attachment 583418 [details]
Restartless extension for testing

nsIFilePicker.filterIndex always returns 0 in the current nightly builds regardless of the filter selected by the user. This breaks backup&restore UI in Adblock Plus. Steps to reproduce:

1. Install the attached extension.
2. The file picker dialog will open immediately - select the "Filter2" file filter.
3. Select any file and click "Open".

Expected result:

A message shows up saying: "File filter selected: Filter2". This is what I see in Firefox 8.

Actual result:

A message shows up saying: "File filter selected: Filter1". Reproduced in:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0a1) Gecko/20111220 Firefox/11.0a1)

This is a recent regression, it was working correctly in the nightlies just recently. I suspect bug 661991 as the reason, will check.
Comment 1 Wladimir Palant 2011-12-21 00:45:07 PST
As expected, regression range is http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=fd6ab19f312c&tochange=beac16509534. So this is mostly certain a regression from bug 661991.
Comment 2 Jim Mathies [:jimm] 2011-12-21 09:36:32 PST
Created attachment 583531 [details] [diff] [review]
fix

Sorry about that. Here's the fix.
Comment 3 Jim Mathies [:jimm] 2011-12-21 09:37:49 PST
Comment on attachment 583531 [details] [diff] [review]
fix

Review of attachment 583531 [details] [diff] [review]:
-----------------------------------------------------------------

::: widget/src/windows/nsFilePicker.cpp
@@ +973,5 @@
>  
>    // results
>  
> +  // Remember what filter type the user selected
> +  UINT filterIdxResult = 1;

I really didn't need this assignment, will remove it in the patch I land.
Comment 4 Jim Mathies [:jimm] 2012-01-03 07:01:18 PST
Comment on attachment 583531 [details] [diff] [review]
fix

https://hg.mozilla.org/integration/mozilla-inbound/rev/dd08f68dce1b

Requesting aurora approval for this regression fix. Very safe patch.
Comment 5 Marco Bonardo [::mak] 2012-01-04 04:42:51 PST
https://hg.mozilla.org/mozilla-central/rev/dd08f68dce1b
Comment 6 Alex Keybl [:akeybl] 2012-01-04 17:45:10 PST
[Triage Comment]
Holding in the queue to have this first bake a day on m-c.
Comment 7 Alex Keybl [:akeybl] 2012-01-06 12:45:50 PST
Comment on attachment 583531 [details] [diff] [review]
fix

[Triage Comment]
Regression in 11, now had time to bake on m-c. Approving for Aurora.
Comment 9 Ioana (away) 2012-02-02 09:04:03 PST
Verified as fixed on:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:11.0) Gecko/20100101 Firefox/11.0

The message shows up saying: "File filter selected: Filter2".

Note You need to log in before you can comment on or make changes to this bug.