diff options
Diffstat (limited to 'chromium/extensions/renderer/resources')
-rw-r--r-- | chromium/extensions/renderer/resources/test_custom_bindings.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/chromium/extensions/renderer/resources/test_custom_bindings.js b/chromium/extensions/renderer/resources/test_custom_bindings.js index 307f19320a7..4bad888c35f 100644 --- a/chromium/extensions/renderer/resources/test_custom_bindings.js +++ b/chromium/extensions/renderer/resources/test_custom_bindings.js @@ -164,7 +164,13 @@ apiBridge.registerCustomHook(function(api) { if (typeof(expected) !== typeof(actual)) return false; + if (Array.isArray(expected) !== Array.isArray(actual)) + return false; + // Handle the ArrayBuffer cases. Bail out in case of type mismatch, to + // prevent the ArrayBuffer from being treated as an empty enumerable below. + if ((actual instanceof ArrayBuffer) !== (expected instanceof ArrayBuffer)) + return false; if ((actual instanceof ArrayBuffer) && (expected instanceof ArrayBuffer)) { if (actual.byteLength != expected.byteLength) return false; |