Closed Bug 1558526 Opened 6 years ago Closed 5 years ago

registerProcessor likely crashes if aProcessorCtor.prototype.process is null

Categories

(Core :: Web Audio, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox-esr68 --- wontfix
firefox69 --- wontfix
firefox72 --- wontfix
firefox73 --- wontfix
firefox74 --- fixed

People

(Reporter: bzbarsky, Assigned: karlt)

References

(Regression)

Details

(Keywords: crash, regression)

Attachments

(2 files, 1 obsolete file)

The code looks like this:

  if (!process.isObjectOrNull() || !JS::IsCallable(process.toObjectOrNull())) {
    aRv.ThrowTypeError<MSG_NOT_CALLABLE>(NS_LITERAL_STRING(
        "Argument 2 of AudioWorkletGlobalScope.registerProcessor "
        "constructor.process"));
    return;
  }

but JS::IsCallable assumes it's actually passed an object, not null and will crash if null is passed.

Please add a test.

Blocks: audioworklet
Priority: -- → P2
Assignee: nobody → karlt

Comment on attachment 9112456 [details]
Bug 1558526 Test processor port assignment on processor callback function construction r?bzbarsky

Revision D55228 was moved to bug 1565956. Setting attachment 9112456 [details] to obsolete.

Attachment #9112456 - Attachment is obsolete: true
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9b02e25673b4 remove check for callable process() in registerProcessor() r=bzbarsky
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
Pushed by ktomlinson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f0f2f7500351 test use of 'process' getter for AudioWorkletProcessor callback r=bzbarsky
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/21453 for changes under testing/web-platform/tests
Upstream web-platform-tests status checks passed, PR will merge once commit reaches central.
Regressions: 1611932
Upstream PR merged by moz-wptsync-bot
Has Regression Range: --- → yes
Keywords: regression
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: