Skip to content

Commit f9b7c03

Browse files
author
pmocher
committed
# This is a combination of 39 commits.
# This is the 1st commit message: resolved merge conflict # This is the commit message servo#2: style(capture_webrender): use eprintln for error output # This is the commit message servo#3: Fix some more WebGL methods # This is the commit message servo#4: Implement OES_element_index_uint (fixes servo#20384) # This is the commit message servo#5: Use mozjs 0.4 # This is the commit message servo#6: Add safe `handle` function for rooted heap values # This is the commit message servo#7: Use unsafe Heap::handle wherever needed # This is the commit message servo#8: Change WebGL function signatures accepting typed arrays # This is the commit message servo#9: Adapt function bodies for usage with typed array args # This is the commit message servo#10: Adapt uniform[fv] and similar to accept typed array args # This is the commit message servo#11: Appease test-tidy # This is the commit message servo#12: Fix sanity check in vertex attrib # This is the commit message servo#13: Fix indentation # This is the commit message servo#14: Unify argument auto rooting in codegen # This is the commit message servo#15: Add codegen test for function overloads taking typed array args # This is the commit message servo#16: Use safe to_vec() for typed arrays in WebGL bindings # This is the commit message servo#17: Bug 1448138 - Rename string DataFlags::SHARED to REFCOUNTED to make it clearer to those reading the code. (Servo changes.) r=erahm # This is the commit message servo#18: Used the zip function to iterate over both vectors simultaneously instead of an index variable and unwrapping the result. # This is the commit message servo#19: Implement HTMLCanvasElement.toDataURL for WebGL canvas (fixes servo#19147) # This is the commit message servo#20: Update web-platform-tests to revision d04a8fc02b85bd32799691759c8c05ead07cd939 # This is the commit message servo#21: Implement missing checks in WebGLRenderingContext::GetBufferParameter # This is the commit message servo#22: Implement WebGLRenderingContextBase.getAttachedShaders # This is the commit message servo#23: Implement missing WebGLShader checks Methods compileShader and getShaderParameter should emit an error when the shader has been deleted. # This is the commit message servo#24: Add constructors for typed arrays in DOMMatrix and DOMMatrixReadOnly # This is the commit message servo#25: feat(webidl): expose arraybuffer overload in body idl # This is the commit message servo#26: feat(consume_body): implement consume_body accepts arraybuffer # This is the commit message servo#27: refactor(consume_body): json stored in roottraceablebox # This is the commit message servo#28: test(wpt): update fetch test metadata # This is the commit message servo#29: Implement gl.getParameter(gl.ALIASED_POINT_SIZE_RANGE) # This is the commit message servo#30: TextDecoder's Decode now receives a BufferSource as input # This is the commit message servo#31: Update mozjs. # This is the commit message servo#32: Switches WriteValue to use BufferSource # This is the commit message servo#33: Switches characteristic to use BufferSource # This is the commit message servo#34: Updates Bluetooth type to use BufferSource # This is the commit message servo#35: Websockets send typed arrays now # This is the commit message servo#36: Dedupe lazy_static :tada: :tada: :tada: # This is the commit message servo#37: Statically allocate static atoms. # This is the commit message servo#38: Update web-platform-tests to revision d04a8fc02b85bd32799691759c8c05ead07cd939 # This is the commit message servo#39: refactor(websocket): do not borrow sender anymore
1 parent 873edca commit f9b7c03

File tree

342 files changed

+4024
-3818
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

342 files changed

+4024
-3818
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ Servo.app
2323
.config.mk.last
2424
/glfw
2525
capture_webrender/
26-
/components/compositing/webrender_revision.rs
2726

2827
# Editors
2928

Cargo.lock

Lines changed: 33 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/canvas/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ compositing = {path = "../compositing"}
1616
cssparser = "0.23.0"
1717
euclid = "0.17"
1818
fnv = "1.0"
19-
gleam = "0.4"
19+
gleam = "0.4.29"
2020
ipc-channel = "0.10"
2121
log = "0.3.5"
2222
num-traits = "0.1.32"

components/canvas/webgl_thread.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,9 @@ impl WebGLImpl {
892892
ctx.gl().delete_vertex_arrays(&[id.get()]),
893893
WebGLCommand::BindVertexArray(id) =>
894894
ctx.gl().bind_vertex_array(id.map_or(0, WebGLVertexArrayId::get)),
895+
WebGLCommand::AliasedPointSizeRange(sender) => {
896+
sender.send(ctx.gl().alias_point_size_range()).unwrap()
897+
}
895898
}
896899

897900
// TODO: update test expectations in order to enable debug assertions

components/canvas_traits/webgl.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ pub enum WebGLCommand {
274274
CreateVertexArray(WebGLSender<Option<WebGLVertexArrayId>>),
275275
DeleteVertexArray(WebGLVertexArrayId),
276276
BindVertexArray(Option<WebGLVertexArrayId>),
277+
AliasedPointSizeRange(WebGLSender<(f32, f32)>),
277278
}
278279

279280
macro_rules! define_resource_id_struct {
@@ -546,7 +547,8 @@ impl fmt::Debug for WebGLCommand {
546547
GenerateMipmap(..) => "GenerateMipmap",
547548
CreateVertexArray(..) => "CreateVertexArray",
548549
DeleteVertexArray(..) => "DeleteVertexArray",
549-
BindVertexArray(..) => "BindVertexArray"
550+
BindVertexArray(..) => "BindVertexArray",
551+
AliasedPointSizeRange(..) => "AliasedPointSizeRange",
550552
};
551553

552554
write!(f, "CanvasWebGLMsg::{}(..)", name)

components/compositing/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ path = "lib.rs"
1313
[dependencies]
1414
euclid = "0.17"
1515
gfx_traits = {path = "../gfx_traits"}
16-
gleam = "0.4"
16+
gleam = "0.4.29"
1717
image = "0.18"
1818
ipc-channel = "0.10"
1919
libc = "0.2"

components/compositing/build.rs

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,11 @@ extern crate toml;
77
use std::env;
88
use std::fs::File;
99
use std::io::{Read, Write};
10-
11-
const WEBRENDER_REVISION_TEMPLATE: &'static str =
12-
"/* This Source Code Form is subject to the terms of the Mozilla Public
13-
* License, v. 2.0. If a copy of the MPL was not distributed with this
14-
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
15-
16-
/// auto-generated by cargo. do not manually modify.
17-
pub const REVISION: &'static str = ";
10+
use std::path::Path;
1811

1912
fn main() {
20-
let current_path = env::current_dir().expect("Failed to access path to lockfile");
21-
let lockfile_path = current_path.join("..").join("..").join("Cargo.lock");
22-
let revision_file_path = current_path.join("webrender_revision.rs");
23-
24-
let mut existing_revision_exported = String::new();
25-
match File::open(&revision_file_path) {
26-
Ok(mut f) => {
27-
f.read_to_string(&mut existing_revision_exported).unwrap_or_default();
28-
},
29-
Err(_) => ()
30-
}
13+
let lockfile_path = Path::new(&env::var("CARGO_MANIFEST_DIR").unwrap()).join("..").join("..").join("Cargo.lock");
14+
let revision_file_path = Path::new(&env::var_os("OUT_DIR").unwrap()).join("webrender_revision.rs");
3115

3216
let mut lockfile = String::new();
3317
File::open(lockfile_path).expect("Cannot open lockfile")
@@ -49,13 +33,8 @@ fn main() {
4933
let parsed: Vec<&str> = source.split("#").collect();
5034
let revision = if parsed.len() > 1 { parsed[1] } else { source };
5135

52-
if let Some(_) = existing_revision_exported.find(revision) {
53-
return
54-
}
55-
56-
let revision_contents = format!("{}\"{}\";", WEBRENDER_REVISION_TEMPLATE, revision);
5736
let mut revision_module_file = File::create(&revision_file_path).unwrap();
58-
write!(&mut revision_module_file, "{}", revision_contents).unwrap();
37+
write!(&mut revision_module_file, "{}", format!("\"{}\"", revision)).unwrap();
5938
},
6039
_ => panic!("Cannot find package definitions in lockfile")
6140
}

components/compositing/compositor.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,22 +1547,23 @@ impl<Window: WindowMethods> IOCompositor<Window> {
15471547
let revision_file_path = capture_path.join("wr.txt");
15481548

15491549
if let Err(err) = create_dir_all(&capture_path) {
1550-
println!("Unable to create path '{:?}' for capture: {:?}", capture_path, err);
1550+
eprintln!("Unable to create path '{:?}' for capture: {:?}", capture_path, err);
15511551
return
15521552
}
15531553

15541554
self.webrender_api.save_capture(capture_path, webrender_api::CaptureBits::all());
15551555

15561556
match File::create(revision_file_path) {
15571557
Ok(mut file) => {
1558-
if let Err(err) = write!(&mut file, "{}", REVISION) {
1559-
println!("Unable to write webrender revision: {:?}", err)
1558+
let revision = include!(concat!(env!("OUT_DIR"), "/webrender_revision.rs"));
1559+
if let Err(err) = write!(&mut file, "{}", revision) {
1560+
eprintln!("Unable to write webrender revision: {:?}", err)
15601561
}
15611562
}
1562-
Err(err) => println!("Capture triggered, creating webrender revision info skipped: {:?}", err)
1563+
Err(err) => eprintln!("Capture triggered, creating webrender revision info skipped: {:?}", err)
15631564
}
15641565
},
1565-
Err(err) => println!("Unable to locate path to save captures: {:?}", err)
1566+
Err(err) => eprintln!("Unable to locate path to save captures: {:?}", err)
15661567
}
15671568
}
15681569
}

components/compositing/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ use style_traits::CSSPixel;
3939
mod compositor;
4040
pub mod compositor_thread;
4141
mod touch;
42-
mod webrender_revision;
4342
pub mod windowing;
4443

4544
pub struct SendableFrameTree {

components/malloc_size_of/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ app_units = "0.6"
1616
cssparser = "0.23.0"
1717
euclid = "0.17"
1818
hashglobe = { path = "../hashglobe" }
19-
mozjs = { version = "0.3", features = ["promises"], optional = true }
19+
mozjs = { version = "0.4", features = ["promises"], optional = true }
2020
selectors = { path = "../selectors" }
2121
servo_arc = { path = "../servo_arc" }
2222
smallbitvec = "1.0.3"

components/net/connector.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,9 @@ pub type Connector = HttpsConnector;
5252

5353
pub fn create_ssl_client(ca_file: &PathBuf) -> OpensslClient {
5454
let mut ssl_connector_builder = SslConnectorBuilder::new(SslMethod::tls()).unwrap();
55-
{
56-
let context = ssl_connector_builder.builder_mut();
57-
context.set_ca_file(ca_file).expect("could not set CA file");
58-
context.set_cipher_list(DEFAULT_CIPHERS).expect("could not set ciphers");
59-
context.set_options(SSL_OP_NO_SSLV2 | SSL_OP_NO_SSLV3 | SSL_OP_NO_COMPRESSION);
60-
}
55+
ssl_connector_builder.set_ca_file(ca_file).expect("could not set CA file");
56+
ssl_connector_builder.set_cipher_list(DEFAULT_CIPHERS).expect("could not set ciphers");
57+
ssl_connector_builder.set_options(SSL_OP_NO_SSLV2 | SSL_OP_NO_SSLV3 | SSL_OP_NO_COMPRESSION);
6158
let ssl_connector = ssl_connector_builder.build();
6259
OpensslClient::from(ssl_connector)
6360
}

components/script/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ domobject_derive = {path = "../domobject_derive"}
4545
encoding_rs = "0.7"
4646
euclid = "0.17"
4747
fnv = "1.0"
48-
gleam = "0.4"
48+
gleam = "0.4.29"
4949
half = "1.0"
5050
html5ever = "0.22"
5151
hyper = "0.10"
@@ -62,7 +62,7 @@ metrics = {path = "../metrics"}
6262
mitochondria = "1.1.2"
6363
mime = "0.2.1"
6464
mime_guess = "1.8.0"
65-
mozjs = { version = "0.3", features = ["promises"]}
65+
mozjs = { version = "0.4", features = ["promises"]}
6666
msg = {path = "../msg"}
6767
net_traits = {path = "../net_traits"}
6868
num-traits = "0.1.32"

components/script/body.rs

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,22 @@ use dom::bindings::error::{Error, Fallible};
77
use dom::bindings::reflector::DomObject;
88
use dom::bindings::root::DomRoot;
99
use dom::bindings::str::USVString;
10+
use dom::bindings::trace::RootedTraceableBox;
1011
use dom::blob::{Blob, BlobImpl};
1112
use dom::formdata::FormData;
1213
use dom::globalscope::GlobalScope;
1314
use dom::promise::Promise;
15+
use js::jsapi::Heap;
1416
use js::jsapi::JSContext;
17+
use js::jsapi::JSObject;
1518
use js::jsapi::JS_ClearPendingException;
1619
use js::jsapi::JS_ParseJSON;
1720
use js::jsapi::Value as JSValue;
1821
use js::jsval::UndefinedValue;
22+
use js::typedarray::{ArrayBuffer, CreateWith};
1923
use mime::{Mime, TopLevel, SubLevel};
2024
use std::cell::Ref;
25+
use std::ptr;
2126
use std::rc::Rc;
2227
use std::str;
2328
use url::form_urlencoded;
@@ -27,14 +32,16 @@ pub enum BodyType {
2732
Blob,
2833
FormData,
2934
Json,
30-
Text
35+
Text,
36+
ArrayBuffer
3137
}
3238

3339
pub enum FetchedData {
3440
Text(String),
35-
Json(JSValue),
41+
Json(RootedTraceableBox<Heap<JSValue>>),
3642
BlobData(DomRoot<Blob>),
3743
FormData(DomRoot<FormData>),
44+
ArrayBuffer(RootedTraceableBox<Heap<*mut JSObject>>),
3845
}
3946

4047
// https://fetch.spec.whatwg.org/#concept-body-consume-body
@@ -83,6 +90,7 @@ pub fn consume_body_with_promise<T: BodyOperations + DomObject>(object: &T,
8390
FetchedData::Json(j) => promise.resolve_native(&j),
8491
FetchedData::BlobData(b) => promise.resolve_native(&b),
8592
FetchedData::FormData(f) => promise.resolve_native(&f),
93+
FetchedData::ArrayBuffer(a) => promise.resolve_native(&a)
8694
};
8795
},
8896
Err(err) => promise.reject_error(err),
@@ -104,6 +112,9 @@ fn run_package_data_algorithm<T: BodyOperations + DomObject>(object: &T,
104112
BodyType::Json => run_json_data_algorithm(cx, bytes),
105113
BodyType::Blob => run_blob_data_algorithm(&global, bytes, mime),
106114
BodyType::FormData => run_form_data_algorithm(&global, bytes, mime),
115+
BodyType::ArrayBuffer => unsafe {
116+
run_array_buffer_data_algorithm(cx, bytes)
117+
}
107118
}
108119
}
109120

@@ -126,7 +137,8 @@ fn run_json_data_algorithm(cx: *mut JSContext,
126137
// TODO: See issue #13464. Exception should be thrown instead of cleared.
127138
return Err(Error::Type("Failed to parse JSON".to_string()));
128139
}
129-
Ok(FetchedData::Json(rval.get()))
140+
let rooted_heap = RootedTraceableBox::from_box(Heap::boxed(rval.get()));
141+
Ok(FetchedData::Json(rooted_heap))
130142
}
131143
}
132144

@@ -166,6 +178,17 @@ fn run_form_data_algorithm(root: &GlobalScope, bytes: Vec<u8>, mime: &[u8]) -> F
166178
}
167179
}
168180

181+
#[allow(unsafe_code)]
182+
unsafe fn run_array_buffer_data_algorithm(cx: *mut JSContext, bytes: Vec<u8>) -> Fallible<FetchedData> {
183+
rooted!(in(cx) let mut array_buffer_ptr = ptr::null_mut::<JSObject>());
184+
let arraybuffer = ArrayBuffer::create(cx, CreateWith::Slice(&bytes), array_buffer_ptr.handle_mut());
185+
if arraybuffer.is_err() {
186+
return Err(Error::JSFailed);
187+
}
188+
let rooted_heap = RootedTraceableBox::from_box(Heap::boxed(array_buffer_ptr.get()));
189+
Ok(FetchedData::ArrayBuffer(rooted_heap))
190+
}
191+
169192
pub trait BodyOperations {
170193
fn get_body_used(&self) -> bool;
171194
fn set_body_promise(&self, p: &Rc<Promise>, body_type: BodyType);

components/script/dom/bindings/codegen/CodegenRust.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,8 @@ def pickFirstSignature(condition, filterLambda):
422422
template,
423423
{"val": distinguishingArg},
424424
declType,
425-
"arg%d" % distinguishingIndex)
425+
"arg%d" % distinguishingIndex,
426+
needsAutoRoot=type_needs_auto_root(type))
426427

427428
# Indent by 4, since we need to indent further than our "do" statement
428429
caseBody.append(CGIndenter(testCode, 4))
@@ -1211,7 +1212,8 @@ def wrapObjectTemplate(templateBody, nullValue, isDefinitelyObject, type,
12111212

12121213

12131214
def instantiateJSToNativeConversionTemplate(templateBody, replacements,
1214-
declType, declName):
1215+
declType, declName,
1216+
needsAutoRoot=False):
12151217
"""
12161218
Take the templateBody and declType as returned by
12171219
getJSToNativeConversionInfo, a set of replacements as required by the
@@ -1236,6 +1238,8 @@ def instantiateJSToNativeConversionTemplate(templateBody, replacements,
12361238
else:
12371239
result.append(conversion)
12381240

1241+
if needsAutoRoot:
1242+
result.append(CGGeneric("auto_root!(in(cx) let %s = %s);" % (declName, declName)))
12391243
# Add an empty CGGeneric to get an extra newline after the argument
12401244
# conversion.
12411245
result.append(CGGeneric(""))
@@ -1318,11 +1322,8 @@ def __init__(self, argument, index, args, argc, descriptorProvider,
13181322
arg = "arg%d" % index
13191323

13201324
self.converter = instantiateJSToNativeConversionTemplate(
1321-
template, replacementVariables, declType, arg)
1322-
1323-
# The auto rooting is done only after the conversion is performed
1324-
if type_needs_auto_root(argument.type):
1325-
self.converter.append(CGGeneric("auto_root!(in(cx) let %s = %s);" % (arg, arg)))
1325+
template, replacementVariables, declType, arg,
1326+
needsAutoRoot=type_needs_auto_root(argument.type))
13261327

13271328
else:
13281329
assert argument.optional

components/script/dom/bindings/reflector.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ impl Reflector {
4646
/// Get the reflector.
4747
#[inline]
4848
pub fn get_jsobject(&self) -> HandleObject {
49-
self.object.handle()
49+
// We're rooted, so it's safe to hand out a handle to object in Heap
50+
unsafe { self.object.handle() }
5051
}
5152

5253
/// Initialize the reflector. (May be called only once.)

components/script/dom/bindings/trace.rs

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ use hyper::mime::Mime;
6060
use hyper::status::StatusCode;
6161
use ipc_channel::ipc::{IpcReceiver, IpcSender};
6262
use js::glue::{CallObjectTracer, CallValueTracer};
63-
use js::jsapi::{GCTraceKindToAscii, Heap, JSObject, JSTracer, TraceKind};
63+
use js::jsapi::{GCTraceKindToAscii, Heap, Handle, JSObject, JSTracer, TraceKind};
6464
use js::jsval::JSVal;
65-
use js::rust::Runtime;
65+
use js::rust::{GCMethods, Runtime};
6666
use js::typedarray::TypedArray;
6767
use js::typedarray::TypedArrayElement;
6868
use metrics::{InteractiveMetrics, InteractiveWindow};
@@ -790,6 +790,16 @@ impl<T: JSTraceable + 'static> RootedTraceableBox<T> {
790790
}
791791
}
792792

793+
impl<T> RootedTraceableBox<Heap<T>>
794+
where
795+
Heap<T>: JSTraceable + 'static,
796+
T: GCMethods + Copy,
797+
{
798+
pub fn handle(&self) -> Handle<T> {
799+
unsafe { (*self.ptr).handle() }
800+
}
801+
}
802+
793803
impl<T: JSTraceable + Default> Default for RootedTraceableBox<T> {
794804
fn default() -> RootedTraceableBox<T> {
795805
RootedTraceableBox::new(T::default())

components/script/dom/bluetooth.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use dom::bindings::codegen::Bindings::BluetoothPermissionResultBinding::Bluetoot
1414
use dom::bindings::codegen::Bindings::BluetoothRemoteGATTServerBinding::BluetoothRemoteGATTServerBinding::
1515
BluetoothRemoteGATTServerMethods;
1616
use dom::bindings::codegen::Bindings::PermissionStatusBinding::{PermissionName, PermissionState};
17-
use dom::bindings::codegen::UnionTypes::StringOrUnsignedLong;
17+
use dom::bindings::codegen::UnionTypes::{ArrayBufferViewOrArrayBuffer, StringOrUnsignedLong};
1818
use dom::bindings::error::Error::{self, Network, Security, Type};
1919
use dom::bindings::error::Fallible;
2020
use dom::bindings::refcounted::{Trusted, TrustedPromise};
@@ -442,12 +442,20 @@ fn canonicalize_filter(filter: &BluetoothLEScanFilterInit) -> Fallible<Bluetooth
442442
// https://webbluetoothcg.github.io/web-bluetooth/#bluetoothdatafilterinit-canonicalizing
443443
fn canonicalize_bluetooth_data_filter_init(bdfi: &BluetoothDataFilterInit) -> Fallible<(Vec<u8>, Vec<u8>)> {
444444
// Step 1.
445-
let data_prefix = bdfi.dataPrefix.clone().unwrap_or(vec![]);
445+
let data_prefix = match bdfi.dataPrefix {
446+
Some(ArrayBufferViewOrArrayBuffer::ArrayBufferView(ref avb)) => avb.to_vec(),
447+
Some(ArrayBufferViewOrArrayBuffer::ArrayBuffer(ref ab)) => ab.to_vec(),
448+
None => vec![]
449+
};
446450

447451
// Step 2.
448452
// If no mask present, mask will be a sequence of 0xFF bytes the same length as dataPrefix.
449453
// Masking dataPrefix with this, leaves dataPrefix untouched.
450-
let mask = bdfi.mask.clone().unwrap_or(vec![0xFF; data_prefix.len()]);
454+
let mask = match bdfi.mask {
455+
Some(ArrayBufferViewOrArrayBuffer::ArrayBufferView(ref avb)) => avb.to_vec(),
456+
Some(ArrayBufferViewOrArrayBuffer::ArrayBuffer(ref ab)) => ab.to_vec(),
457+
None => vec![0xFF; data_prefix.len()]
458+
};
451459

452460
// Step 3.
453461
if mask.len() != data_prefix.len() {

0 commit comments

Comments
 (0)