Bug 1001094 - Give nsJSID classinfo. r=mrbkap
authorBobby Holley <bobbyholley@gmail.com>
Thu, 24 Apr 2014 13:23:27 -0700
changeset 180444 347ecbf31a6a06e838fefa3992ddab8ef1655e3a
parent 180443 031b49af61a68658a27cf1a5e76bb4081210ad8d
child 180445 b95f1f575327b0544dc28ca55444cd6bc7eb3c15
push id272
push userpvanderbeken@mozilla.com
push dateMon, 05 May 2014 16:31:18 +0000
reviewersmrbkap
bugs1001094
milestone31.0a1
Bug 1001094 - Give nsJSID classinfo. r=mrbkap
js/xpconnect/src/XPCJSID.cpp
js/xpconnect/tests/unit/test_bug1001094.js
js/xpconnect/tests/unit/xpcshell.ini
--- a/js/xpconnect/src/XPCJSID.cpp
+++ b/js/xpconnect/src/XPCJSID.cpp
@@ -13,17 +13,18 @@
 #include "mozilla/StaticPtr.h"
 
 using namespace mozilla::dom;
 using namespace JS;
 
 /***************************************************************************/
 // nsJSID
 
-NS_IMPL_ISUPPORTS1(nsJSID, nsIJSID)
+NS_IMPL_CLASSINFO(nsJSID, nullptr, 0, NS_JS_ID_CID)
+NS_IMPL_ISUPPORTS1_CI(nsJSID, nsIJSID)
 
 char nsJSID::gNoString[] = "";
 
 nsJSID::nsJSID()
     : mID(GetInvalidIID()), mNumber(gNoString), mName(gNoString)
 {
 }
 
new file mode 100644
--- /dev/null
+++ b/js/xpconnect/tests/unit/test_bug1001094.js
@@ -0,0 +1,4 @@
+function run_test() {
+  // Make sure nsJSID implements classinfo.
+  do_check_eq(Components.ID("{a6e2a27f-5521-4b35-8b52-99799a744aee}").equals, Components.ID("{daa47351-7d2e-44a7-b8e3-281802a1eab7}").equals);
+}
--- a/js/xpconnect/tests/unit/xpcshell.ini
+++ b/js/xpconnect/tests/unit/xpcshell.ini
@@ -36,16 +36,17 @@ support-files =
 [test_bug851895.js]
 [test_bug854558.js]
 [test_bug868675.js]
 [test_bug867486.js]
 [test_bug872772.js]
 [test_bug885800.js]
 [test_bug961054.js]
 [test_bug976151.js]
+[test_bug1001094.js]
 [test_bug_442086.js]
 [test_file.js]
 [test_blob.js]
 [test_blob2.js]
 [test_file2.js]
 [test_import.js]
 [test_import_fail.js]
 [test_js_weak_references.js]