Bug 683361 - quell GCC over-warning from 90ff7402febc (r=me)
authorLuke Wagner <luke@mozilla.com>
Tue, 27 Sep 2011 23:20:46 -0700
changeset 77745 95bbaf6cb2a6c9a4d3375da8381cb8db909ec4a0
parent 77744 b4f351db9863b881323261ea5087c9f0f6fb4e60
child 77748 4d27c6c86de66bf02b3431bb040bd43d360c5aec
child 77758 01db5a45f8d137ff56ff56602ec845f9b2d3fa54
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewersme
bugs683361
milestone10.0a1
Bug 683361 - quell GCC over-warning from 90ff7402febc (r=me)
js/src/jsobjinlines.h
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -1715,18 +1715,20 @@ class PrimitiveBehavior<double> {
 } /* namespace detail */
 
 inline JSObject *
 NonGenericMethodGuard(JSContext *cx, CallArgs args, Class *clasp, bool *ok)
 {
     const Value &thisv = args.thisv();
     if (thisv.isObject()) {
         JSObject &obj = thisv.toObject();
-        if (obj.getClass() == clasp)
+        if (obj.getClass() == clasp) {
+            *ok = true;  /* quell gcc overwarning */
             return &obj;
+        }
     }
 
     *ok = HandleNonGenericMethodClassMismatch(cx, args, clasp);
     return NULL;
 }
 
 template <typename T>
 inline bool