You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Notify global object about rejected promises #15412
Activity
CYBAI commentedon Mar 21, 2018
Hi @jdm , I'd like to work on this one!
jdm commentedon Mar 21, 2018
Great! We should figure out if gecko does anything special to support this.
jdm commentedon Mar 21, 2018
https://searchfox.org/mozilla-central/source/xpcom/base/CycleCollectedJSContext.cpp#129 is where Gecko sets their callback for tracking unhandled rejections. It looks like https://searchfox.org/mozilla-central/source/dom/promise/PromiseDebugging.h and https://searchfox.org/mozilla-central/source/dom/promise/PromiseDebugging.cpp are the places that deal with them. https://searchfox.org/mozilla-central/source/dom/promise/Promise.cpp#481 is what gets called which dispatches the event at the window.
CYBAI commentedon Mar 25, 2018
@jdm After reading the provided files above, let me confirm what I'll need to do.
new_rt_and_cxmethod for initialization inServo, I'll need to registerSetPromiseRejectionTrackerCallbackand also declare two global variable formUncaughtRejectionsandmConsumedRejections.(Not sure if making
mUncaughtRejectionsandmConsumedRejectionsinGlobalScopeis correct or not?)servo/components/script/script_runtime.rs
Line 142 in 3ce3f39
PromiseDebuggingforServoReportRejectedPromiseinpromise.rsjdm commentedon Mar 25, 2018
Yes, I think that all makes sense. Using GlobalScope sounds like the right approach.
CYBAI commentedon Mar 25, 2018
Thanks! I'll start to work on this when I have time!
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
6 remaining items
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=<try>
Auto merge of #20755 - CYBAI:unhandled-rejection, r=jdm
Auto merge of #20755 - CYBAI:unhandled-rejection, r=jdm