servo/components/script
CYBAI 28e64fc701 Assert incumbent global is always some in get_incumbent_global hook
While working on module script, I'd like to use Promise with a custom
callback with type `Box<dyn TaskBox>` which means we didn't use web API
callbacks as native handlers. However, we'll get a panic from
`enqueue_promise_job` and the panic says we have a `null` incumbent
global. The main problem here is, the Promise API is strongly tied to JS
engine and it always assumes there's a meaningful answer for "what
specific global is this promise associated with". So, when I don't use
the Promise for a specific web API, our engine cannot find a proper
incumbent global for us so that we get the `null` incumbent global
panic.

To make us catch this case easier in the future, we should add the
assertion inside `get_incumbent_global` hook so that we can know this
quickly next time.

Ref: https://mozilla.logbot.info/servo/20190807#c16525481
2019-08-08 12:39:56 +09:00
..
docs
dom Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
task_source
body.rs Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00
build.rs Generate apis.html and css-properties.json for docs as part of crates’ build scripts 2019-07-30 08:37:33 +02:00
Cargo.toml Update euclid. 2019-07-23 23:09:55 +02:00
clipboard_provider.rs Remove not needed DummyClipboardContext 2019-06-13 20:20:25 +02:00
CMakeLists.txt Generate apis.html and css-properties.json for docs as part of crates’ build scripts 2019-07-30 08:37:33 +02:00
compartments.rs Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00
devtools.rs Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00
document_loader.rs Remove unused code from script* crates 2019-06-02 07:12:26 +02:00
fetch.rs Create a helper API for entering a DOM object's compartment 2019-06-29 19:23:17 +02:00
image_listener.rs
layout_image.rs Implementing the builder pattern for RequestInit 2019-04-10 14:01:30 -03:00
lib.rs Remove uses of mem::uninitialized 2019-07-17 10:48:54 +02:00
mem.rs
microtask.rs Upgrade to Spidermonkey 67. 2019-06-26 18:10:46 -04:00
network_listener.rs Let resources timing entries be added to performance entry buffer. 2019-06-11 09:40:31 -07:00
script_runtime.rs Assert incumbent global is always some in get_incumbent_global hook 2019-08-08 12:39:56 +09:00
script_thread.rs Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
serviceworker_manager.rs
serviceworkerjob.rs Update Worker webidl to support WorkerOptions 2019-05-11 12:14:25 +09:00
stylesheet_loader.rs Revert changes to load media styles as UA styles 2019-07-22 17:40:15 +02:00
stylesheet_set.rs Move StylesheetSetRef to script 2019-04-26 12:00:26 +02:00
task.rs Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
task_manager.rs
task_queue.rs
test.rs
textinput.rs Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
timers.rs Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00
unpremultiplytable.rs
webdriver_handlers.rs Modify *::get_cx methods to return a safe JSContext instead of a raw one 2019-07-24 09:53:10 +01:00