зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1829630 - [bidi] Use promiseAllocationSite as fallback to fetch rejected promise stacktrace r=webdriver-reviewers,Sasha
Differential Revision: https://phabricator.services.mozilla.com/D176353
This commit is contained in:
Родитель
46bc1b971c
Коммит
93f5685ca6
|
@ -126,7 +126,13 @@ class ScriptModule extends WindowGlobalBiDiModule {
|
|||
exception = realm.globalObjectReference.makeDebuggeeValue(
|
||||
asyncException
|
||||
);
|
||||
stack = rv.return.promiseResolutionSite;
|
||||
|
||||
// If the returned promise was rejected by calling its reject callback
|
||||
// the stack will be available on promiseResolutionSite.
|
||||
// Otherwise, (eg. rejected Promise chained with a then() call) we
|
||||
// fallback on the promiseAllocationSite.
|
||||
stack =
|
||||
rv.return.promiseResolutionSite || rv.return.promiseAllocationSite;
|
||||
}
|
||||
} else {
|
||||
// rv.return is a Debugger.Object or a primitive.
|
||||
|
|
Загрузка…
Ссылка в новой задаче