Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Unhandled promise rejection tracking re-enabled for DevTools tests

15 views
Skip to first unread message

J. Ryan Stinnett

unread,
Apr 4, 2016, 11:03:50 AM4/4/16
to dev-developer-tools
Bug 1240804 is now resolved, which means that unhandled promise
rejections that occur during DevTools tests will trigger test failures
once again.

For more background, this was something we had for quite a while, but
then it was accidentally disabled in June 2015 (10 months ago).
Turning it back on was a simple change, but it required also battling
various rejection issues that had sprung up while it was disabled.

After 3 months of hammering away at tests, we now have it back on
again. Thanks to everyone who helped with the tests, including
:pbrosset, :jlongster, :jsantell, :jdescottes, and :mikeratcliffe.

- Ryan

Nick Fitzgerald

unread,
Apr 4, 2016, 11:08:18 AM4/4/16
to J. Ryan Stinnett, dev-developer-tools
Why was it accidentally disabled, and how can we prevent that accidentally
happening again?
> _______________________________________________
> dev-developer-tools mailing list
> dev-devel...@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-developer-tools
>

J. Ryan Stinnett

unread,
Apr 4, 2016, 11:38:01 AM4/4/16
to Nick Fitzgerald, dev-developer-tools
On Mon, Apr 4, 2016 at 10:07 AM, Nick Fitzgerald
<nfitz...@mozilla.com> wrote:
> Why was it accidentally disabled, and how can we prevent that accidentally
> happening again?

It was accidentally disabled by changing the DevTools loader to
instantiate its own instance of Promise.jsm, instead of using the one
from the outer context that the rest of the browser is using. We need
to use the outer instance of Promise.jsm because that's the one the
test harness uses to wire up the tracking of unhandled rejections that
trigger test failures.

As you can see from the patch to re-enable it[1], the change seems
quite benign, and it's not obvious that this would have any effect on
the test harness at all.

As for preventing future regressions, I am not sure exactly... I guess
having a new test that rejects a promise and ensures there is a
failure is the best approach. I'd have to investigate that a bit to
see the best way to ensure a certain number of failures are reported
by the test harness.

[1]: https://hg.mozilla.org/mozilla-central/rev/4317688957ef

- Ryan

J. Ryan Stinnett

unread,
Apr 14, 2016, 10:16:15 PM4/14/16
to Nick Fitzgerald, dev-developer-tools
Alex has landed a test for this over in
https://bugzilla.mozilla.org/show_bug.cgi?id=1263629. Hopefully this
will prevent it from coming back. Thanks Alex!

- Ryan

Nick Fitzgerald

unread,
Apr 15, 2016, 11:29:01 AM4/15/16
to J. Ryan Stinnett, dev-developer-tools
Great!
0 new messages