Bug 617910 - Broken instanceof checks in head_cookies.js. r=sdwilsh
authorDão Gottwald <dao@mozilla.com>
Thu, 09 Dec 2010 20:10:30 +0100
changeset 59013 5a8817833fdac609d732255cee88941b12e3c371
parent 59012 e968527f1f6ffc1892924a0571e3cebe22ffed3a
child 59014 2c7df2c32e3a116219807375cb1efa7ba826826f
push id1
push usershaver@mozilla.com
push dateTue, 04 Jan 2011 17:58:04 +0000
reviewerssdwilsh
bugs617910
milestone2.0b8pre
Bug 617910 - Broken instanceof checks in head_cookies.js. r=sdwilsh
extensions/cookie/test/unit/head_cookies.js
--- a/extensions/cookie/test/unit/head_cookies.js
+++ b/extensions/cookie/test/unit/head_cookies.js
@@ -393,17 +393,17 @@ function CookieDatabaseConnection(file, 
     do_throw("unrecognized schemaVersion!");
   }
 }
 
 CookieDatabaseConnection.prototype =
 {
   insertCookie: function(cookie)
   {
-    if (!cookie instanceof Cookie)
+    if (!(cookie instanceof Cookie))
       do_throw("not a cookie");
 
     switch (this.schema)
     {
     case 1:
       this.stmtInsert.bindByName("id", cookie.creationTime);
       this.stmtInsert.bindByName("name", cookie.name);
       this.stmtInsert.bindByName("value", cookie.value);
@@ -456,17 +456,17 @@ CookieDatabaseConnection.prototype =
       do_throw("unrecognized schemaVersion!");
     }
 
     do_execute_stmt(this.stmtInsert);
   },
 
   deleteCookie: function(cookie)
   {
-    if (!cookie instanceof Cookie)
+    if (!(cookie instanceof Cookie))
       do_throw("not a cookie");
 
     switch (this.db.schemaVersion)
     {
     case 1:
     case 2:
     case 3:
       this.stmtDelete.bindByName("id", cookie.creationTime);
@@ -482,17 +482,17 @@ CookieDatabaseConnection.prototype =
       do_throw("unrecognized schemaVersion!");
     }
 
     do_execute_stmt(this.stmtDelete);
   },
 
   updateCookie: function(cookie)
   {
-    if (!cookie instanceof Cookie)
+    if (!(cookie instanceof Cookie))
       do_throw("not a cookie");
 
     switch (this.db.schemaVersion)
     {
     case 1:
       do_throw("can't update a schema 1 cookie!");
 
     case 2: