mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Fix formatting.
This commit is contained in:
parent
5e5669b945
commit
9ea1399c30
4 changed files with 7 additions and 15 deletions
|
@ -719,8 +719,7 @@ impl Callback for ConsumeBodyPromiseHandler {
|
|||
#[allow(unrooted_must_root)]
|
||||
pub fn consume_body<T: BodyMixin + DomObject>(object: &T, body_type: BodyType) -> Rc<Promise> {
|
||||
let in_realm_proof = AlreadyInRealm::assert();
|
||||
let promise =
|
||||
Promise::new_in_current_realm(InRealm::Already(&in_realm_proof));
|
||||
let promise = Promise::new_in_current_realm(InRealm::Already(&in_realm_proof));
|
||||
|
||||
// Step 1
|
||||
if object.is_disturbed() || object.is_locked() {
|
||||
|
|
|
@ -17,7 +17,8 @@ impl Console {
|
|||
#[allow(unsafe_code)]
|
||||
fn send_to_devtools(global: &GlobalScope, level: LogLevel, message: DOMString) {
|
||||
if let Some(chan) = global.devtools_chan() {
|
||||
let caller = unsafe { describe_scripted_caller(*GlobalScope::get_cx()) }.unwrap_or_default();
|
||||
let caller =
|
||||
unsafe { describe_scripted_caller(*GlobalScope::get_cx()) }.unwrap_or_default();
|
||||
let console_message = ConsoleMessage {
|
||||
message: String::from(message),
|
||||
logLevel: level,
|
||||
|
|
|
@ -3574,8 +3574,7 @@ impl Document {
|
|||
pub fn enter_fullscreen(&self, pending: &Element) -> Rc<Promise> {
|
||||
// Step 1
|
||||
let in_realm_proof = AlreadyInRealm::assert();
|
||||
let promise =
|
||||
Promise::new_in_current_realm(InRealm::Already(&in_realm_proof));
|
||||
let promise = Promise::new_in_current_realm(InRealm::Already(&in_realm_proof));
|
||||
let mut error = false;
|
||||
|
||||
// Step 4
|
||||
|
|
|
@ -424,8 +424,7 @@ impl ModuleTree {
|
|||
let cx = GlobalScope::get_cx();
|
||||
let _ac = JSAutoRealm::new(*cx, *global.reflector().get_jsobject());
|
||||
|
||||
let compile_options =
|
||||
unsafe { CompileOptionsWrapper::new(*cx, url.as_str(), 1) };
|
||||
let compile_options = unsafe { CompileOptionsWrapper::new(*cx, url.as_str(), 1) };
|
||||
|
||||
unsafe {
|
||||
rooted!(in(*cx) let mut module_script = CompileModule1(
|
||||
|
@ -438,10 +437,7 @@ impl ModuleTree {
|
|||
warn!("fail to compile module script of {}", url);
|
||||
|
||||
rooted!(in(*cx) let mut exception = UndefinedValue());
|
||||
assert!(JS_GetPendingException(
|
||||
*cx,
|
||||
&mut exception.handle_mut()
|
||||
));
|
||||
assert!(JS_GetPendingException(*cx, &mut exception.handle_mut()));
|
||||
JS_ClearPendingException(*cx);
|
||||
|
||||
return Err(RethrowError(RootedTraceableBox::from_box(Heap::boxed(
|
||||
|
@ -483,10 +479,7 @@ impl ModuleTree {
|
|||
warn!("fail to link & instantiate module");
|
||||
|
||||
rooted!(in(*cx) let mut exception = UndefinedValue());
|
||||
assert!(JS_GetPendingException(
|
||||
*cx,
|
||||
&mut exception.handle_mut()
|
||||
));
|
||||
assert!(JS_GetPendingException(*cx, &mut exception.handle_mut()));
|
||||
JS_ClearPendingException(*cx);
|
||||
|
||||
Err(RethrowError(RootedTraceableBox::from_box(Heap::boxed(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue