Auto merge of #8787 - Jayflux:hotfix/8695, r=mbrubeck

now using external ref_slice instead of the std version fixed #8695

Fixes #8695.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8787)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-12-03 16:10:24 +05:30
commit 8ae008761f
7 changed files with 24 additions and 4 deletions

View file

@ -27,12 +27,13 @@ use js::jsapi::{JS_GetArrayBufferData, JS_NewArrayBuffer};
use js::jsval::UndefinedValue;
use libc::{uint32_t, uint8_t};
use net_traits::hosts::replace_hosts;
use ref_slice::ref_slice;
use script_task::ScriptTaskEventCategory::WebSocketEvent;
use script_task::{CommonScriptMsg, Runnable};
use std::borrow::ToOwned;
use std::cell::Cell;
use std::ptr;
use std::sync::{Arc, Mutex};
use std::{ptr, slice};
use util::str::DOMString;
use util::task::spawn_named;
use websocket::client::receiver::Receiver;
@ -230,7 +231,7 @@ impl WebSocket {
// Step 4.
let protocols: &[DOMString] = protocols
.as_ref()
.map_or(&[], |ref string| slice::ref_slice(string));
.map_or(&[], |ref string| ref_slice(string));
// Step 5.
for (i, protocol) in protocols.iter().enumerate() {