Bug 5855 - (int-144437) net-eal doesn't proxy GLists which means the nsIPromptService.select method will crash
(int-144437)
: net-eal doesn't proxy GLists which means the nsIPromptService.select method w...
Status: RESOLVED WORKSFORME
Product: Browser
User interface
: 5.0/(2.2009.51-1)
: N900 Maemo
: Medium critical (vote)
: 5.0/(10.2010.19-1)
Assigned To: Nagineni Sudarsana Babu
: browser-bugs
:
:
:
:
  Show dependency tree
 
Reported: 2009-10-27 20:12 UTC by timeless
Modified: 2010-10-25 18:49 UTC (History)
1 user (show)

See Also:


Attachments


Note

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


Description timeless (reporter) 2009-10-27 20:12:55 UTC
SOFTWARE VERSION:
41-10

STEPS TO REPRODUCE THE PROBLEM:
0. open a single browser window and then sequentially load each of the urls
from 1 and 2 into that window
1. about:config
2.
javascript:Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService).select(null,
"hello", "world", 1, ["list"], {})

EXPECTED OUTCOME:
some sort of dialog with a single item that i can select or something (the
actual use of such a feature is left as an exercise for some chrome code which
none of our testers apparently found)

ACTUAL OUTCOME:
crash in browser-ui operating on a GList which i believe was marshalled as a
simple pointer.

REPRODUCIBILITY:
always (i think technically there's an infinitely small chance of this not
crashing if you manage to luck out and have a prefilled null value in at least
one field, but I am not particularly familiar w/ GLists, and in testing, i have
always had it crash)

OTHER COMMENTS:
while this is a crash, we might not fix it as so far no one has used this API
and in reality, it's not a particularly common method as xpcom apis go.

based on what the code was trying to do, it's likely that if it had actually
worked, this would result in someone filing a bug like 5829 (because that's in
fact precisely why I was testing it). So the most logical fix is for us to
convert this method call into a proxy of the html:select multiple api.
Comment 1 Andre Klapper maemo.org 2009-12-14 19:40:30 UTC
Cannot reproduce anymore - see internal bug.