Last Comment Bug 713519 - getCharsetAlias should throw for unknown character sets
: getCharsetAlias should throw for unknown character sets
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Internationalization (show other bugs)
: unspecified
: x86 Mac OS X
: -- normal (vote)
: mozilla12
Assigned To: Mano (::mano, needinfo? for any questions; not reading general bugmail)
:
Mentors:
Depends on: 718500
Blocks: 710259
  Show dependency treegraph
 
Reported: 2011-12-26 03:40 PST by Mano (::mano, needinfo? for any questions; not reading general bugmail)
Modified: 2012-01-16 12:35 PST (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (8.44 KB, patch)
2011-12-26 04:19 PST, Mano (::mano, needinfo? for any questions; not reading general bugmail)
smontagu: review+
Details | Diff | Splinter Review

Description Mano (::mano, needinfo? for any questions; not reading general bugmail) 2011-12-26 03:40:03 PST
throw Components.classes["@mozilla.org/charset-converter-manager;1"].getService(Components.interfaces.nsICharsetConverterManager).getCharsetAlias("no such thing");

Error: uncaught exception: no such thing
Comment 1 Mano (::mano, needinfo? for any questions; not reading general bugmail) 2011-12-26 04:19:00 PST
Created attachment 584321 [details] [diff] [review]
patch
Comment 2 Mano (::mano, needinfo? for any questions; not reading general bugmail) 2011-12-26 06:42:17 PST
Comment on attachment 584321 [details] [diff] [review]
patch

Cancelling review request as I'm not sure that the properties files covers everything.
Comment 3 Mano (::mano, needinfo? for any questions; not reading general bugmail) 2011-12-26 06:45:17 PST
Comment on attachment 584321 [details] [diff] [review]
patch

Oh well, it actually does. Sorry for the spam
Comment 4 Simon Montagu :smontagu 2011-12-26 09:04:09 PST
Comment on attachment 584321 [details] [diff] [review]
patch

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

::: intl/uconv/tests/unit/test_bug713519.js
@@ +15,5 @@
> +
> +  do_check_eq(svc.getCharsetTitle("windows-1255"), "Hebrew (Windows-1255)");
> +  try {
> +    svc.getCharsetTitle("no such thing");
> +    do_throw("Calling getCharsetAlias with invalid value should throw.");

Change the second error message to "getCharsetTitle".
Comment 5 Mano (::mano, needinfo? for any questions; not reading general bugmail) 2012-01-12 08:27:15 PST
http://hg.mozilla.org/integration/mozilla-inbound/rev/d76bf407d5c1
Comment 6 Marco Bonardo [::mak] 2012-01-13 01:07:30 PST
https://hg.mozilla.org/mozilla-central/rev/d76bf407d5c1

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