diff options
author | Anthony Ramine <n.oxyde@gmail.com> | 2016-04-09 00:48:19 +0200 |
---|---|---|
committer | Anthony Ramine <n.oxyde@gmail.com> | 2016-05-03 18:36:11 +0200 |
commit | eb94f1a9182c369165ddbf040fcb97c408482689 (patch) | |
tree | 80ac2d439c9e76a8163b001700f1f91f248e0ba8 /components/script/dom/websocket.rs | |
parent | d32648172c711b5d95819c58bcedcee5f50f3018 (diff) | |
download | servo-eb94f1a9182c369165ddbf040fcb97c408482689.tar.gz servo-eb94f1a9182c369165ddbf040fcb97c408482689.zip |
Update SpiderMonkey
Diffstat (limited to 'components/script/dom/websocket.rs')
-rw-r--r-- | components/script/dom/websocket.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/components/script/dom/websocket.rs b/components/script/dom/websocket.rs index 615881e789b..861c91090c8 100644 --- a/components/script/dom/websocket.rs +++ b/components/script/dom/websocket.rs @@ -604,7 +604,9 @@ impl Runnable for MessageReceivedTask { BinaryType::Arraybuffer => { let len = data.len() as uint32_t; let buf = JS_NewArrayBuffer(cx, len); - let buf_data: *mut uint8_t = JS_GetArrayBufferData(buf, ptr::null()); + let mut is_shared = false; + let buf_data: *mut uint8_t = JS_GetArrayBufferData(buf, &mut is_shared, ptr::null()); + assert!(!is_shared); ptr::copy_nonoverlapping(data.as_ptr(), buf_data, len as usize); buf.to_jsval(cx, message.handle_mut()); } |