servo/components
bors-servo 90fb4c3589
Auto merge of #23930 - CYBAI:incumbent-global-assertion, r=jdm
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

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because it should just add assertion inside the hook

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23930)
<!-- Reviewable:end -->
2019-08-09 02:54:33 -04:00
..
allocator
atoms Support end events and end() 2019-07-22 09:32:01 -07:00
background_hang_monitor Remove uses of mem::uninitialized 2019-07-17 10:48:54 +02:00
bluetooth
bluetooth_traits Update regex to 1.1 2019-04-29 22:25:12 +09:00
canvas Drop webgl main thread data during shutdown. 2019-07-29 08:15:59 -04:00
canvas_traits Replace use of callbacks in webxr by channels 2019-07-26 23:36:13 -05:00
compositing Update euclid. 2019-07-23 23:09:55 +02:00
config Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
config_plugins
constellation Remove extra webgl message pumping thread. 2019-07-25 23:07:23 -04:00
debugger Upgrade ws. 2019-06-12 15:01:03 -04:00
deny_public_fields
derive_common Update darling to 0.9 2019-05-23 12:14:56 +02:00
devtools Upgrade headers, headers-core, and hyper_serde. 2019-06-13 11:08:16 -04:00
devtools_traits
dom_struct
domobject_derive
embedder_traits Pass the event loop waker into WebXR 2019-07-25 12:55:26 -05:00
fallible
geometry Update euclid. 2019-07-23 23:09:55 +02:00
gfx Update euclid. 2019-07-23 23:09:55 +02:00
gfx_traits
hashglobe Upgrade ws. 2019-06-12 15:01:03 -04:00
jstraceable_derive
layout Stylo: replace product={gecko,servo} with engine={gecko,servo-2013,servo-2020} 2019-07-29 17:37:03 +02:00
layout_2020 Fix compilation errors due to the rebase 2019-08-01 13:50:52 +02:00
layout_thread Update euclid. 2019-07-23 23:09:55 +02:00
layout_thread_2020 Fix compilation errors due to the rebase 2019-08-01 13:50:52 +02:00
layout_traits Update euclid. 2019-07-23 23:09:55 +02:00
malloc_size_of style: Update to euclid 0.20. 2019-07-23 22:54:08 +02:00
media Update euclid. 2019-07-23 23:09:55 +02:00
metrics
msg Update servo media to include global mute support 2019-07-05 11:01:19 +02:00
net Pass the event loop waker into WebXR 2019-07-25 12:55:26 -05:00
net_traits ISSUE-21257: set redirectEnd on PerformanceResourceTiming 2019-07-19 21:36:24 +02:00
pixels Update euclid. 2019-07-23 23:09:55 +02:00
profile #[global_allocator] is stable 2019-07-01 14:55:01 +02:00
profile_traits Upgrade to rustc 1.38.0-nightly (dddb7fca0 2019-07-30) 2019-07-31 13:34:01 +02:00
rand Upgrade headers, headers-core, and hyper_serde. 2019-06-13 11:08:16 -04:00
range Remove unused code from a bunch of crates 2019-06-03 04:18:12 +02:00
remutex Remove unused code from a bunch of crates 2019-06-03 04:18:12 +02:00
script Auto merge of #23930 - CYBAI:incumbent-global-assertion, r=jdm 2019-08-09 02:54:33 -04:00
script_layout_interface Update euclid. 2019-07-23 23:09:55 +02:00
script_plugins Upgrade to rustc 1.38.0-nightly (273f42b59 2019-07-21) 2019-07-22 09:35:43 +02:00
script_traits Remove extra webgl message pumping thread. 2019-07-25 23:07:23 -04:00
selectors Rustfmt and fix tidy on recent changes. 2019-06-25 13:11:31 +02:00
servo Added gstreamer support to the magicleap port 2019-08-08 16:52:50 -05:00
servo_arc style: Properly refcount-log UniqueArcs created with new_uninitialized(). 2019-07-24 14:52:53 +02:00
size_of_test
std_test_override
style Fix a panic when using layout 2020 2019-08-06 18:07:31 +02:00
style_derive Update darling to 0.9 2019-05-23 12:14:56 +02:00
style_traits Update euclid. 2019-07-23 23:09:55 +02:00
to_shmem Stylo: replace uses of mem::uninitialized with MaybeUninit 2019-07-16 08:03:54 +02:00
to_shmem_derive Update darling to 0.9 2019-05-23 12:14:56 +02:00
url
webdriver_server Auto merge of #23745 - georgeroman:implement_get_element_property_wd_command, r=jdm 2019-07-23 21:24:57 -04:00
webrender_traits Update euclid. 2019-07-23 23:09:55 +02:00
webvr Update euclid. 2019-07-23 23:09:55 +02:00
webvr_traits Update to latest xrtest api 2019-07-01 17:42:46 -07:00