bug 1166759 - force annotateCrashReport arguments to be UTF-8. r=bsmedberg
authorTed Mielczarek <ted@mielczarek.org>
Fri, 22 May 2015 10:50:32 -0400
changeset 245236 6fe131387fb250df3042545b0b7e839265286622
parent 245235 1c42ef3547328942c794dea1780ad9047fc7f196
child 245237 8316f8e3953d1320d833634c73c9f0589de8cdb5
push id28799
push userphilringnalda@gmail.com
push dateSat, 23 May 2015 20:31:44 +0000
treeherdermozilla-central@c3c0928c3cde [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbsmedberg
bugs1166759
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
bug 1166759 - force annotateCrashReport arguments to be UTF-8. r=bsmedberg
toolkit/crashreporter/test/unit/test_crashreporter_crash.js
xpcom/system/nsICrashReporter.idl
--- a/toolkit/crashreporter/test/unit/test_crashreporter_crash.js
+++ b/toolkit/crashreporter/test/unit/test_crashreporter_crash.js
@@ -34,16 +34,18 @@ function run_test()
              }
              if (is_win7_or_newer)
                do_check_true(CrashTestUtils.dumpHasStream(mdump.path, CrashTestUtils.MD_MEMORY_INFO_LIST_STREAM));
            });
 
   // 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");
            });
 }
--- a/xpcom/system/nsICrashReporter.idl
+++ b/xpcom/system/nsICrashReporter.idl
@@ -9,17 +9,17 @@ interface nsIURL;
 
 /**
  * Provides access to crash reporting functionality.
  *
  * @status UNSTABLE - This interface is not frozen and will probably change in
  *                    future releases.
  */
 
-[scriptable, uuid(ee431adc-21dd-42d9-968b-e19b4c62960a)]
+[scriptable, uuid(4b74c39a-cf69-4a8a-8e63-169d81ad1ecf)]
 interface nsICrashReporter : nsISupports
 {
   /**
    * Get the enabled status of the crash reporter.
    */
   readonly attribute boolean enabled;
 
   /**
@@ -56,17 +56,17 @@ interface nsICrashReporter : nsISupports
    * @param data
    *        Data to be added.
    *
    * @throw NS_ERROR_NOT_INITIALIZED if crash reporting not initialized
    * @throw NS_ERROR_INVALID_ARG if key or data contain invalid characters.
    *                             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.
    * Unlike annotateCrashReport, this method will append to existing data.
    *
    * @param data
    *        Data to be added.
    *