Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requestFullScreen in a cross-origin frame panics #26210

Open
jdm opened this issue Apr 17, 2020 · 1 comment
Open

requestFullScreen in a cross-origin frame panics #26210

jdm opened this issue Apr 17, 2020 · 1 comment
Labels
A-content/dom Interacting with the DOM from web content I-panic Servo encounters a panic.

Comments

@jdm
Copy link
Member

jdm commented Apr 17, 2020

I observed this in https://aframe.io/examples/showcase/a-painter/ pressing the button in the bottom right corner of the demo.

No current global object (thread ScriptThread PipelineId { namespace_id: PipelineNamespaceId(1), index: PipelineIndex(1) }, at components/script/dom/window.rs:816)
stack backtrace:
   0: backtrace::backtrace::libunwind::trace
             at /Users/joshmatthews/.cargo/git/checkouts/backtrace-rs-96ebaf1bcb788384/91a0aa4/src/backtrace/libunwind.rs:86
      backtrace::backtrace::trace_unsynchronized
             at /Users/joshmatthews/.cargo/git/checkouts/backtrace-rs-96ebaf1bcb788384/91a0aa4/src/backtrace/mod.rs:66
   1: <servo::backtrace::Print as core::fmt::Debug>::fmt
             at ports/glutin/backtrace.rs:49
   2: core::fmt::write
             at src/libcore/fmt/mod.rs:1069
   3: std::io::Write::write_fmt
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/libstd/io/mod.rs:1504
   4: servo::backtrace::print
             at ports/glutin/backtrace.rs:17
   5: servo::main::{{closure}}
             at ports/glutin/main2.rs:157
   6: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:515
   7: rust_begin_unwind
             at src/libstd/panicking.rs:419
   8: std::panicking::begin_panic
   9: std::panicking::begin_panic
  10: core::option::Option<T>::expect
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/libcore/option.rs:347
  11: <script::dom::window::Window as script::dom::bindings::codegen::Bindings::WindowBinding::WindowBinding::WindowMethods>::GetFrameElement
             at components/script/dom/window.rs:816
  12: script::dom::document::Document::get_allow_fullscreen
             at components/script/dom/document.rs:3404
  13: script::dom::element::Element::fullscreen_element_ready_check
             at components/script/dom/element.rs:1817
  14: <script::dom::element::ElementPerformFullscreenEnter as script::task::TaskOnce>::run_once
             at components/script/dom/element.rs:3599
  15: <T as script::task::TaskBox>::run_box
             at components/script/task.rs:57
  16: script::script_thread::ScriptThread::handle_msg_from_script
             at components/script/script_thread.rs:1944
  17: script::script_thread::ScriptThread::handle_msgs::{{closure}}
             at components/script/script_thread.rs:1550
  18: script::script_thread::ScriptThread::profile_event
             at components/script/script_thread.rs:1782
  19: script::script_thread::ScriptThread::handle_msgs
             at components/script/script_thread.rs:1543
  20: script::script_thread::ScriptThread::start
             at components/script/script_thread.rs:1378
  21: <script::script_thread::ScriptThread as script_traits::ScriptThreadFactory>::create::{{closure}}::{{closure}}
             at components/script/script_thread.rs:803
  22: profile_traits::mem::ProfilerChan::run_with_memory_reporting
             at /Users/joshmatthews/src/servo-master/components/profile_traits/mem.rs:88
  23: <script::script_thread::ScriptThread as script_traits::ScriptThreadFactory>::create::{{closure}}
             at components/script/script_thread.rs:801
  24: std::sys_common::backtrace::__rust_begin_short_backtrace
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/libstd/sys_common/backtrace.rs:130
  25: std::thread::Builder::spawn_unchecked::{{closure}}::{{closure}}
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/libstd/thread/mod.rs:475
  26: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/libstd/panic.rs:318
  27: std::panicking::try::do_call
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/libstd/panicking.rs:331
  28: __rust_try
  29: std::panicking::try
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/libstd/panicking.rs:274
  30: std::panic::catch_unwind
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/libstd/panic.rs:394
  31: std::thread::Builder::spawn_unchecked::{{closure}}
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/libstd/thread/mod.rs:474
  32: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/libcore/ops/function.rs:232
  33: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/liballoc/boxed.rs:1008
  34: <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once
             at /rustc/42abbd8878d3b67238f3611b0587c704ba94f39c/src/liballoc/boxed.rs:1008
      std::sys::unix::thread::Thread::new::thread_start
             at src/libstd/sys/unix/thread.rs:87
  35: <unknown>
@jdm jdm added A-content/dom Interacting with the DOM from web content I-panic Servo encounters a panic. labels Apr 17, 2020
@jdm
Copy link
Member Author

jdm commented Apr 17, 2020

Actually this may not be about cross-origin frames; the panic comes from GlobalScope::current(), which expects a script settings object on the stack that isn't present. It's a method that's being called from a task, not from a JS script, so the assumption about how to obtain the global object is being violated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-content/dom Interacting with the DOM from web content I-panic Servo encounters a panic.
Projects
None yet
Development

No branches or pull requests

1 participant