mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Upgraded to SM 60
This commit is contained in:
parent
d34403047e
commit
74c1e00d81
290 changed files with 26572 additions and 1178 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue