Closed Bug 1096011 Opened 10 years ago Closed 10 years ago

Report in NS_WARNING output for which contract id it failed to load the JS implementation (BindingUtils.cpp)

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED
mozilla36

People

(Reporter: mcsmurf, Assigned: bzbarsky)

Details

Attachments

(1 file)

This is basically related to Bug 876602.
Before the patch in that bug the warning message (NS_WARNING) reported the contract id when a JS implementation failed to load:
-    nsCOMPtr<nsISupports> implISupports = do_CreateInstance("${contractId}");
-    if (!implISupports) {
-      NS_WARNING("Failed to get JS implementation for contract \\"${contractId}\\"");
-      aRv.Throw(NS_ERROR_FAILURE);
-      return nullptr;
-    }

The new code in BindingUtils.cpp does not do that:
+    nsCOMPtr<nsISupports> implISupports = do_CreateInstance(aContractId);
+    if (!implISupports) {
+      NS_WARNING("Failed to get JS implementation for contract");
+      aRv.Throw(NS_ERROR_FAILURE);
+      return nullptr;
+    }

I think it should still be possible (and helpful) to add the contract id to the warning text here?
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #8526214 - Flags: review?(peterv) → review+
https://hg.mozilla.org/mozilla-central/rev/d2beb971bb6e
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: