From 47ef6148e87b5410135e35afe4259344a2a458e4 Mon Sep 17 00:00:00 2001 From: "dmichael@chromium.org" Date: Thu, 26 Jan 2012 21:04:10 +0000 Subject: Tweaks to PPB_VarArrayBuffer in preperation for taking out of Dev. * Add Unmap. * Make ByteLength more consistent with the rest of PPAPI. * Make C++ wrapper not cache the buffer. BUG= TEST= Review URL: http://codereview.chromium.org/9169052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119286 0039d316-1c4b-4281-b951-d872f2087c98 --- ppapi/tests/test_websocket.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ppapi/tests/test_websocket.cc') diff --git a/ppapi/tests/test_websocket.cc b/ppapi/tests/test_websocket.cc index c0073eb..368079e 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; -- cgit v1.1