Auto merge of #23587 - jdm:smup67, r=asajeffrey

Upgrade to SpiderMonkey 67

<!-- 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/23587)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2019-06-26 18:51:14 -04:00 committed by GitHub
commit 57205318c5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 260 additions and 139 deletions

View file

@ -845,11 +845,16 @@ impl ScriptThread {
}
// https://html.spec.whatwg.org/multipage/#await-a-stable-state
#[allow(unsafe_code)]
pub fn await_stable_state(task: Microtask) {
SCRIPT_THREAD_ROOT.with(|root| {
if let Some(script_thread) = root.get() {
let script_thread = unsafe { &*script_thread };
script_thread.microtask_queue.enqueue(task);
unsafe {
let script_thread = &*script_thread;
script_thread
.microtask_queue
.enqueue(task, script_thread.get_cx());
}
}
});
}
@ -1123,6 +1128,8 @@ impl ScriptThread {
devtools_port: devtools_port,
devtools_sender: ipc_devtools_sender,
microtask_queue: runtime.microtask_queue.clone(),
js_runtime: Rc::new(runtime),
topmost_mouse_over_target: MutNullableDom::new(Default::default()),
closed_pipelines: DomRefCell::new(HashSet::new()),
@ -1133,8 +1140,6 @@ impl ScriptThread {
content_process_shutdown_chan: state.content_process_shutdown_chan,
microtask_queue: Default::default(),
mutation_observer_microtask_queued: Default::default(),
mutation_observers: Default::default(),
@ -3544,13 +3549,17 @@ impl ScriptThread {
}
}
#[allow(unsafe_code)]
pub fn enqueue_microtask(job: Microtask) {
SCRIPT_THREAD_ROOT.with(|root| {
let script_thread = unsafe { &*root.get().unwrap() };
script_thread.microtask_queue.enqueue(job);
SCRIPT_THREAD_ROOT.with(|root| unsafe {
let script_thread = &*root.get().unwrap();
script_thread
.microtask_queue
.enqueue(job, script_thread.get_cx());
});
}
#[allow(unsafe_code)]
fn perform_a_microtask_checkpoint(&self) {
let globals = self
.documents
@ -3559,8 +3568,13 @@ impl ScriptThread {
.map(|(_id, document)| document.global())
.collect();
self.microtask_queue
.checkpoint(|id| self.documents.borrow().find_global(id), globals)
unsafe {
self.microtask_queue.checkpoint(
self.get_cx(),
|id| self.documents.borrow().find_global(id),
globals,
)
}
}
}