mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
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:
commit
8ae008761f
7 changed files with 24 additions and 4 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue