Last Comment Bug 675567 - Fix PRBool/JSBool mixups
: Fix PRBool/JSBool mixups
Status: RESOLVED FIXED
[inbound]
:
Product: Core
Classification: Components
Component: XPConnect (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla8
Assigned To: Michael Wu [:mwu]
:
Mentors:
Depends on:
Blocks: 675553
  Show dependency treegraph
 
Reported: 2011-07-31 22:37 PDT by Michael Wu [:mwu]
Modified: 2011-08-06 22:10 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Fix (10.01 KB, patch)
2011-07-31 22:37 PDT, Michael Wu [:mwu]
mrbkap: review+
Details | Diff | Splinter Review

Description Michael Wu [:mwu] 2011-07-31 22:37:12 PDT
Created attachment 549719 [details] [diff] [review]
Fix

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).
Comment 2 Marco Bonardo [::mak] (Away 6-20 Aug) 2011-08-04 03:19:12 PDT
http://hg.mozilla.org/mozilla-central/rev/81dd021d45bd
Comment 3 :Ms2ger (⌚ UTC+1/+2) 2011-08-04 05:32:15 PDT
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?
Comment 4 Michael Wu [:mwu] 2011-08-06 22:10:19 PDT
(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.

Note You need to log in before you can comment on or make changes to this bug.