Just use instanceof Ci.nsIDOMElement for Utils.isDOMElement for bug 582023.
authorEdward Lee <edilee@mozilla.com>
Thu, 29 Jul 2010 13:15:21 -0700
changeset 50232 2ed5b7a3764af49bf814d5ea2d3efd8544e21757
parent 50231 39adb0e18d0e6280330e2dc45c34e8aa4a078868
child 50233 92bcd81d1a79250d9657c7a5e749dab5d6bc3cef
push id15039
push useredward.lee@engineering.uiuc.edu
push dateThu, 12 Aug 2010 19:47:36 +0000
treeherdermozilla-central@5da28c582cc7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs582023
milestone2.0b3pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Just use instanceof Ci.nsIDOMElement for Utils.isDOMElement for bug 582023.
browser/base/content/tabview/modules/utils.js
--- a/browser/base/content/tabview/modules/utils.js
+++ b/browser/base/content/tabview/modules/utils.js
@@ -571,17 +571,17 @@ let Utils = {
   isRightClick: function(event) {
     return event.button == 2;
   },
 
   // ----------
   // Function: isDOMElement
   // Returns true if the given object is a DOM element.
   isDOMElement: function(object) {
-    return (object && typeof(object.nodeType) != 'undefined' ? true : false);
+    return object instanceof Ci.nsIDOMElement;
   },
 
   // ----------
   // Function: isNumber
   // Returns true if the argument is a valid number.
   isNumber: function(n) {
     return (typeof(n) == 'number' && !isNaN(n));
   },