Closed Bug 1160098 Opened 5 years ago Closed 5 years ago

XULElement::LoadSrc() should check whether we successfully created a new frameLoader before trying to call SetIsPrerendered() on it

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: ttaubert, Assigned: ttaubert)

References

Details

Attachments

(1 file)

1601         slots->mFrameLoader = nsFrameLoader::Create(this, false);
1602         if (AttrValueIs(kNameSpaceID_None, nsGkAtoms::prerendered,
1603                         NS_LITERAL_STRING("true"), eIgnoreCase)) {
1604             nsresult rv = slots->mFrameLoader->SetIsPrerendered();
1605             NS_ENSURE_SUCCESS(rv,rv);
1606         }
1607 
1608         NS_ENSURE_TRUE(slots->mFrameLoader, NS_OK);

The current code checks |slots->mFrameLoader| after trying to call |slots->mFrameLoader->SetIsPrerendered()|.
Attachment #8599794 - Flags: review?(bugs) → review+
https://hg.mozilla.org/mozilla-central/rev/b318ff4e610e
Assignee: nobody → ttaubert
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.