/* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ var util = { // Compare the contents of two ArrayBufferViews memcmp: function util_memcmp(x, y) { if (!x || !y) { return false; } if (x.byteLength !== y.byteLength) { return false; } var xb = new Uint8Array(x.buffer, x.byteOffset, x.byteLength); var yb = new Uint8Array(y.buffer, y.byteOffset, y.byteLength); for (var i=0; i