Bug 1395172 - Remove "binary" type from Schemas.jsm draft
authorRob Wu <rob@robwu.nl>
Wed, 30 Aug 2017 22:22:47 +0200
changeset 656168 18b589078aaf605b5d1f0a1a6d3e6997032eff21
parent 655774 ab2d700fda2b4934d24227216972dce9fac19b74
child 657601 9fd3e05c9588bb1e8c14cbfbc443d9a9399234a0
child 658331 3c6bb746e63b9c75f7c73358844498db2c1fb416
push id77101
push userbmo:rob@robwu.nl
push dateWed, 30 Aug 2017 20:24:50 +0000
bugs1395172
milestone57.0a1
Bug 1395172 - Remove "binary" type from Schemas.jsm MozReview-Commit-ID: JaHnb37czrA
toolkit/components/extensions/Schemas.jsm
--- a/toolkit/components/extensions/Schemas.jsm
+++ b/toolkit/components/extensions/Schemas.jsm
@@ -245,21 +245,18 @@ function parsePattern(pattern) {
 
 function getValueBaseType(value) {
   let type = typeof value;
   switch (type) {
     case "object":
       if (value === null) {
         return "null";
       }
-      switch (ChromeUtils.getClassName(value, true)) {
-        case "Array":
-          return "array";
-        case "ArrayBuffer":
-          return "binary";
+      if (Array.isArray(value)) {
+        return "array";
       }
       break;
 
     case "number":
       if (value % 1 === 0) {
         return "integer";
       }
   }