aboutsummaryrefslogtreecommitdiffhomepage
path: root/js/debug.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/debug.js')
-rw-r--r--js/debug.js9
1 files changed, 8 insertions, 1 deletions
diff --git a/js/debug.js b/js/debug.js
index 46b24853..0b2c5f6a 100644
--- a/js/debug.js
+++ b/js/debug.js
@@ -74,15 +74,22 @@ jspb.debug.dump = function(message) {
*/
jspb.debug.dump_ = function(thing) {
var type = goog.typeOf(thing);
+ var message = thing; // Copy because we don't want type inference on thing.
if (type == 'number' || type == 'string' || type == 'boolean' ||
type == 'null' || type == 'undefined') {
return thing;
}
+ if (window.Uint8Array) {
+ // Will fail on IE9, where Uint8Array doesn't exist.
+ if (message instanceof Uint8Array) {
+ return thing;
+ }
+ }
+
if (type == 'array') {
goog.asserts.assertArray(thing);
return goog.array.map(thing, jspb.debug.dump_);
}
- var message = thing; // Copy because we don't want type inference on thing.
goog.asserts.assert(message instanceof jspb.Message,
'Only messages expected: ' + thing);
var ctor = message.constructor;