mirror of
https://github.com/servo/servo.git
synced 2025-06-21 23:59:00 +01:00
Auto merge of #26875 - servo:jdm-patch-44, r=gterzian
Don't pretend we support SharedArrayBuffer. Fixes #26874.
This commit is contained in:
commit
596e9105c5
14 changed files with 75 additions and 18 deletions
|
@ -137,7 +137,7 @@ pub unsafe fn create_global_object(
|
|||
|
||||
let mut options = RealmOptions::default();
|
||||
options.creationOptions_.traceGlobal_ = Some(trace);
|
||||
options.creationOptions_.sharedMemoryAndAtomics_ = true;
|
||||
options.creationOptions_.sharedMemoryAndAtomics_ = false;
|
||||
options.creationOptions_.streams_ = true;
|
||||
|
||||
rval.set(JS_NewGlobalObject(
|
||||
|
|
|
@ -45,7 +45,6 @@ use js::jsapi::ContextOptionsRef;
|
|||
use js::jsapi::GetPromiseUserInputEventHandlingState;
|
||||
use js::jsapi::InitConsumeStreamCallback;
|
||||
use js::jsapi::InitDispatchToEventLoop;
|
||||
use js::jsapi::JS_SetFutexCanWait;
|
||||
use js::jsapi::MimeType;
|
||||
use js::jsapi::PromiseUserInputEventHandlingState;
|
||||
use js::jsapi::StreamConsumer as JSStreamConsumer;
|
||||
|
@ -451,14 +450,6 @@ unsafe fn new_rt_and_cx_with_parent(
|
|||
let (cx, runtime) = if let Some(parent) = parent {
|
||||
let runtime = RustRuntime::create_with_parent(parent);
|
||||
let cx = runtime.cx();
|
||||
|
||||
// Note: this enables blocking on an Atomics.wait,
|
||||
// which should only be enabled for an agent whose [[CanBlock]] is true.
|
||||
// Currently only a dedicated worker agent uses a parent,
|
||||
// and this agent can block.
|
||||
// See https://html.spec.whatwg.org/multipage/#integration-with-the-javascript-agent-cluster-formalism
|
||||
JS_SetFutexCanWait(cx);
|
||||
|
||||
(cx, runtime)
|
||||
} else {
|
||||
let runtime = RustRuntime::new(JS_ENGINE.lock().unwrap().as_ref().unwrap().clone());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue