Open Bug 1496613 Opened 6 years ago Updated 2 years ago

FrameLoader::loadContext can be null, but the WebIDL doesn't allow that

Categories

(Core :: DOM: Core & HTML, enhancement, P2)

enhancement

Tracking

()

People

(Reporter: jld, Unassigned)

References

(Blocks 1 open bug)

Details

FrameLoader::LoadContext can return null if it's a remote frame that hasn't launched its browser yet and fails to launch it as part of the getter.  (It will fall back to trying to return its local DocShell, which it doesn't have.)

However, the WebIDL declares it as a non-nullable property, so this causes an assertion failure in BindingUtils.  We don't have automated tests that induce this error; I found it by manual testing (after discovering bug 1496608 by inspection and trying to verify it).


Note that returning null also tends to cause exceptions in the code that's reading the property, such as https://searchfox.org/mozilla-central/rev/924e3d96d81a40d2f0eec1db5f74fc6594337128/toolkit/content/widgets/browser.xml#999, because it's not expecting failure.
Priority: -- → P2
QA Contact: overholt
QA Contact: overholt
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.