Index: ppapi/tests/test_websocket.cc |
diff --git a/ppapi/tests/test_websocket.cc b/ppapi/tests/test_websocket.cc |
index c0073eb24949590eeb6f9e6b319ed47099e7d202..368079e6ffa84d1abc11a301de9263bcf8364e1a 100644 |
--- a/ppapi/tests/test_websocket.cc |
+++ b/ppapi/tests/test_websocket.cc |
@@ -113,7 +113,9 @@ bool TestWebSocket::AreEqualWithString(const PP_Var& var, const char* string) { |
bool TestWebSocket::AreEqualWithBinary(const PP_Var& var, |
const uint8_t* data, |
uint32_t size) { |
- if (arraybuffer_interface_->ByteLength(var) != size) |
+ uint32_t buffer_size = 0; |
+ PP_Bool success = arraybuffer_interface_->ByteLength(var, &buffer_size); |
+ if (!success || buffer_size != size) |
return false; |
if (memcmp(arraybuffer_interface_->Map(var), data, size)) |
return false; |