Upgraded to SM 60

This commit is contained in:
Alan Jeffrey 2018-06-01 17:24:25 -05:00 committed by Josh Matthews
parent d34403047e
commit 74c1e00d81
290 changed files with 26572 additions and 1178 deletions

View file

@ -31,8 +31,7 @@ use js::{JSCLASS_IS_DOMJSCLASS, JSCLASS_IS_GLOBAL};
use js::glue::{IsWrapper, UnwrapObject};
use js::jsapi::{CurrentGlobalOrNull, GetGlobalForObjectCrossCompartment};
use js::jsapi::{JSAutoCompartment, JSContext};
use js::jsapi::{JSObject, JS_GetContext};
use js::jsapi::JS_GetObjectRuntime;
use js::jsapi::JSObject;
use js::panic::maybe_resume_unwind;
use js::rust::{CompileOptionsWrapper, Runtime, get_object_class};
use js::rust::{HandleValue, MutableHandleValue};
@ -229,16 +228,8 @@ impl GlobalScope {
GlobalScope::from_object(obj)
}
#[allow(unsafe_code)]
pub fn get_cx(&self) -> *mut JSContext {
unsafe {
let runtime = JS_GetObjectRuntime(
self.reflector().get_jsobject().get());
assert!(!runtime.is_null());
let context = JS_GetContext(runtime);
assert!(!context.is_null());
context
}
Runtime::get()
}
pub fn crypto(&self) -> DomRoot<Crypto> {