WIP: Accept typed array arguments in codegen

This commit is contained in:
Igor Matuszewski 2018-03-04 20:32:08 +01:00
parent a0f2d618ee
commit e025bbb079
5 changed files with 76 additions and 6 deletions

View file

@ -62,6 +62,8 @@ use js::glue::{CallObjectTracer, CallValueTracer};
use js::jsapi::{GCTraceKindToAscii, Heap, JSObject, JSTracer, TraceKind};
use js::jsval::JSVal;
use js::rust::Runtime;
use js::typedarray::TypedArray;
use js::typedarray::TypedArrayElement;
use metrics::{InteractiveMetrics, InteractiveWindow};
use msg::constellation_msg::{BrowsingContextId, PipelineId, TopLevelBrowsingContextId};
use net_traits::{Metadata, NetworkError, ReferrerPolicy, ResourceThreads};
@ -658,6 +660,12 @@ unsafe impl JSTraceable for StyleLocked<MediaList> {
}
}
unsafe impl<T> JSTraceable for TypedArray<T, Box<Heap<*mut JSObject>>> where T: TypedArrayElement {
unsafe fn trace(&self, trc: *mut JSTracer) {
self.underlying_object().trace(trc);
}
}
unsafe impl<S> JSTraceable for DocumentStylesheetSet<S>
where
S: JSTraceable + ::style::stylesheets::StylesheetInDocument + PartialEq + 'static,