Closed Bug 322971 Opened 19 years ago Closed 19 years ago

Bogus return in XPCNativeWrapper

Categories

(Core :: XPConnect, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9alpha1

People

(Reporter: mrbkap, Assigned: mrbkap)

References

Details

Attachments

(1 file)

Viz,

JS_STATIC_DLL_CALLBACK(JSBool)
XPC_NW_Construct(JSContext *cx, JSObject *obj, uintN argc, jsval *argv,
...
  if (JSVAL_IS_PRIMITIVE(*rval)) {
    return NS_ERROR_ILLEGAL_VALUE;

I think all of our constructors are well-behaved enough that this probably doesn't bite us, not to mention that the primitive value will get turned into a normal object by the engine, but it's bad hygiene and karma and all that.
Attached patch FixSplinter Review
Attachment #208119 - Flags: superreview?(shaver)
Attachment #208119 - Flags: review?(shaver)
Comment on attachment 208119 [details] [diff] [review]
Fix

r+sr+omgthx=shaver
Attachment #208119 - Flags: superreview?(shaver)
Attachment #208119 - Flags: superreview+
Attachment #208119 - Flags: review?(shaver)
Attachment #208119 - Flags: review+
Fix'd. D'oh.
Status: NEW → RESOLVED
Closed: 19 years ago
Priority: -- → P1
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: