Closed Bug 675567 Opened 8 years ago Closed 8 years ago

Fix PRBool/JSBool mixups

Categories

(Core :: XPConnect, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla8

People

(Reporter: mwu, Assigned: mwu)

References

Details

(Whiteboard: [inbound])

Attachments

(1 file)

Attached patch FixSplinter Review
This fixes cases where we use PRBool when we should be using JSBool and vice versa.

It also removes one function where I could not find a user (xpc_SameScope).
Attachment #549719 - Flags: review?(mrbkap)
Attachment #549719 - Flags: review?(mrbkap) → review+
http://hg.mozilla.org/mozilla-central/rev/81dd021d45bd
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Comment on attachment 549719 [details] [diff] [review]
Fix

>--- a/js/src/xpconnect/src/xpcwrappednativejsops.cpp
>+++ b/js/src/xpconnect/src/xpcwrappednativejsops.cpp
>                          JSObject **objp)
> {
>     nsresult rv = NS_OK;
>-    JSBool retval = JS_TRUE;
>+    PRBool retval = JS_TRUE;

Could you fix this mismatch?
(In reply to Ms2ger from comment #3)
> Comment on attachment 549719 [details] [diff] [review] [diff] [details] [review]
> Fix
> 
> >--- a/js/src/xpconnect/src/xpcwrappednativejsops.cpp
> >+++ b/js/src/xpconnect/src/xpcwrappednativejsops.cpp
> >                          JSObject **objp)
> > {
> >     nsresult rv = NS_OK;
> >-    JSBool retval = JS_TRUE;
> >+    PRBool retval = JS_TRUE;
> 
> Could you fix this mismatch?

This isn't the only mismatch and I don't care about this sort of mismatch so much. I'll add a s/JS_TRUE/true/ to the sed in bug 675553 and fix all these at the same time.
You need to log in before you can comment on or make changes to this bug.