Auto merge of #18875 - servo:stable-js, r=nox,jdm

Remove the need for rust-mozjs to use unstable Rust features

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18875)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-10-16 17:07:50 -05:00 committed by GitHub
commit e8a6f2862c
44 changed files with 268 additions and 218 deletions

View file

@ -36,7 +36,7 @@ use html5ever::{LocalName, Namespace};
use layout::data::StyleAndLayoutData;
use layout::wrapper::GetRawData;
use msg::constellation_msg::{BrowsingContextId, PipelineId};
use nonzero::NonZeroUsize;
use nonzero::NonZero;
use range::Range;
use script::layout_exports::{CAN_BE_FRAGMENTED, HAS_DIRTY_DESCENDANTS, IS_IN_DOC};
use script::layout_exports::{CharacterDataTypeId, ElementTypeId, HTMLElementTypeId, NodeTypeId};
@ -235,8 +235,7 @@ impl<'ln> LayoutNode for ServoLayoutNode<'ln> {
let ptr: *mut StyleAndLayoutData =
Box::into_raw(Box::new(StyleAndLayoutData::new()));
let opaque = OpaqueStyleAndLayoutData {
ptr: NonZeroUsize::new_unchecked(ptr as usize),
phantom: PhantomData,
ptr: NonZero::new_unchecked(ptr as *mut StyleData),
};
self.init_style_and_layout_data(opaque);
};