bug 1166759 - force annotateCrashReport arguments to be UTF-8. r=bsmedberg

--HG--
extra : rebase_source : ffc4ee94de01206b853d5f69b26d0ad62836c2b2
This commit is contained in:
Ted Mielczarek 2015-05-22 10:50:32 -04:00
parent dbe2cfb819
commit 543daa65bc
2 changed files with 4 additions and 2 deletions

View File

@ -39,11 +39,13 @@ function run_test()
// check setting some basic data
do_crash(function() {
crashReporter.annotateCrashReport("TestKey", "TestValue");
crashReporter.annotateCrashReport("\u2665", "\u{1F4A9}");
crashReporter.appendAppNotesToCrashReport("Junk");
crashReporter.appendAppNotesToCrashReport("MoreJunk");
},
function(mdump, extra) {
do_check_eq(extra.TestKey, "TestValue");
do_check_eq(extra["\u2665"], "\u{1F4A9}");
do_check_eq(extra.Notes, "JunkMoreJunk");
});
}

View File

@ -14,7 +14,7 @@ interface nsIURL;
* future releases.
*/
[scriptable, uuid(ee431adc-21dd-42d9-968b-e19b4c62960a)]
[scriptable, uuid(4b74c39a-cf69-4a8a-8e63-169d81ad1ecf)]
interface nsICrashReporter : nsISupports
{
/**
@ -61,7 +61,7 @@ interface nsICrashReporter : nsISupports
* Invalid characters for key are '=' and
* '\n'. Invalid character for data is '\0'.
*/
void annotateCrashReport(in ACString key, in ACString data);
void annotateCrashReport(in AUTF8String key, in AUTF8String data);
/**
* Append some data to the "Notes" field, to be submitted with a crash report.