From 8c506d4d7348963af3edaf5d08d0a3fc979a1be6 Mon Sep 17 00:00:00 2001 From: gorhill Date: Sat, 9 May 2015 08:40:32 -0400 Subject: [PATCH] code review --- platform/firefox/vapi-background.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platform/firefox/vapi-background.js b/platform/firefox/vapi-background.js index e923c72..9427f4e 100644 --- a/platform/firefox/vapi-background.js +++ b/platform/firefox/vapi-background.js @@ -1958,8 +1958,12 @@ vAPI.cookies.getAll = function(callback) { var onAsync = function() { var out = []; var enumerator = Services.cookies.enumerator; + var ffcookie; while ( enumerator.hasMoreElements() ) { - out.push(new this.CookieEntry(enumerator.getNext().QueryInterface(Ci.nsICookie))); + ffcookie = enumerator.getNext(); + if ( ffcookie instanceof Ci.nsICookie ) { + out.push(new this.CookieEntry(ffcookie)); + } } callback(out); };