The default bug view has changed. See this FAQ.

Use IDL for Components.(utils.)reportError

RESOLVED FIXED in mozilla11

Status

()

Core
XPConnect
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla11
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 579691 [details] [diff] [review]
Patch v1
Attachment #579691 - Flags: review?(bobbyholley+bmo)
Comment on attachment 579691 [details] [diff] [review]
Patch v1

>+    [deprecated,implicit_jscontext] void reportError(in jsval error);

I think we could use a space between the attributes (above as well).

>+nsXPCComponents_Utils::ReportError(const JS::Value& error, JSContext* cx)

The star and ampersand should be fixed (in a few other places as well).


>-    JSString* msgstr = JS_ValueToString(cx, argv[0]);

For a second there, I thought you were naming a variable after yourself. ;-)


>+    NS_ENSURE_SUCCESS(scripterr->InitWithWindowID(
>+            reinterpret_cast<const PRUnichar *>(msgchars),
>+            NS_ConvertUTF8toUTF16(fileName).get(),
>+            nsnull, lineNo, 0, 0, "XPConnect JavaScript", innerWindowID),
>+        NS_OK);

I'm not really a fan of this, because I find it jarring to see non-error-handing code wrapped up on an NS_ENSURE_* macro. I'd prefer to use an rv, and do NS_ENSURE_SUCCESS(rv, NS_OK).

r=bholley with that.
Attachment #579691 - Flags: review?(bobbyholley+bmo) → review+
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/mozilla-central/rev/b456317ba3e4
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla11
You need to log in before you can comment on or make changes to this bug.