Closed Bug 1581315 Opened 5 years ago Closed 5 years ago

Add MOZ_MUST_RETURN_FROM_CALLER to more ErrorResult methods

Categories

(Core :: DOM: Bindings (WebIDL), task, P1)

task

Tracking

()

RESOLVED FIXED
mozilla71
Tracking Status
firefox71 --- fixed

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

Attachments

(3 files)

ThrowTypeError/ThrowRangeError should probably have the annotation too. Maybe others as well (NoteJSContextException, for example).

Priority: -- → P1

It doesn't really make sense to enforce this behavior for calls on stack
variables (which presumably we then want to do something with) and doesn't
necessarily make sense to enforce it for member variables either.

Our implementation modified the state, in addition to throwing the exception.
And the tests not only didn't test for this, but wouldn't have reached that
code anyway, due to the harness giving up as soon as anything failed.

Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4968ed697e0a part 1. Adjust MOZ_MUST_RETURN_FROM_CALLER to only apply to method calls on arguments. r=nika https://hg.mozilla.org/integration/autoland/rev/be26864d5a00 part 2. Fix incorrect behavior of PannerNode::SetRolloffFactor. r=karlt https://hg.mozilla.org/integration/autoland/rev/395ae88909c6 part 3. Add MOZ_MUST_RETURN_FROM_CALLER_IF_THIS_IS_ARG to more ErrorResult methods. r=smaug
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/19224 for changes under testing/web-platform/tests

The instability in Firefox causing the upstream test failure is a known issue with that test. See bug 1560454 (which is marked fixed, but was "fixed" by disabling the test)...

Flags: needinfo?(bzbarsky) → needinfo?(james)

OK, I'll force merge this once it reaches central.

Flags: needinfo?(james)
Regressions: 1583496
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: