Bug 1096011. Warning when failing to create a JS implemntation for a Web IDL binding should include the implementation contract. r=peterv
authorBoris Zbarsky <bzbarsky@mit.edu>
Mon, 24 Nov 2014 11:57:49 -0500
changeset 217167 d2beb971bb6ed2f1016fb92fe4ec9a7778804561
parent 217166 e7ae6e804f7c61bb2cbced8ab9122fda85a0bfd9
child 217168 c625a976589d8eee8e93ae8db8ddb1c32c787598
push id52237
push userbzbarsky@mozilla.com
push dateMon, 24 Nov 2014 16:58:32 +0000
treeherdermozilla-inbound@d2beb971bb6e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspeterv
bugs1096011
milestone36.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 1096011. Warning when failing to create a JS implemntation for a Web IDL binding should include the implementation contract. r=peterv
dom/bindings/BindingUtils.cpp
--- a/dom/bindings/BindingUtils.cpp
+++ b/dom/bindings/BindingUtils.cpp
@@ -2084,17 +2084,19 @@ ConstructJSImplementation(JSContext* aCx
   // properly, since those are never exceptions that a spec wants to be thrown.
   {
     AutoNoJSAPI nojsapi;
 
     // Get the XPCOM component containing the JS implementation.
     nsresult rv;
     nsCOMPtr<nsISupports> implISupports = do_CreateInstance(aContractId, &rv);
     if (!implISupports) {
-      NS_WARNING("Failed to get JS implementation for contract");
+      nsPrintfCString msg("Failed to get JS implementation for contract \"%s\"",
+                          aContractId);
+      NS_WARNING(msg.get());
       aRv.Throw(rv);
       return;
     }
     // Initialize the object, if it implements nsIDOMGlobalPropertyInitializer.
     nsCOMPtr<nsIDOMGlobalPropertyInitializer> gpi =
       do_QueryInterface(implISupports);
     if (gpi) {
       JS::Rooted<JS::Value> initReturn(aCx);