Closed
Bug 285188
Opened 20 years ago
Closed 20 years ago
nsFrameLoader::GetDocShell should not throw if it can create the docshell
Categories
(Core :: Layout: Images, Video, and HTML Frames, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.8beta2
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
11.89 KB,
patch
|
jst
:
review+
jst
:
superreview+
|
Details | Diff | Splinter Review |
Right now, part of our recursion protection is in nsFrameLoader::EnsureDocShell.
This means that GetDocShell can throw for no really good reason (and if this
happens during frame construction, the document the frame is in will suddenly
have no presentation at best or crash at worst).
I'm going to move all the recursion checking into a single method that's called
from LoadFrame(). Throwing from that method is fine.
Assignee | ||
Comment 1•20 years ago
|
||
This consolidates the recursion checking into a one function. Actual code
changes were kept to a minimum. They are:
1) Return up front if it's not a content docshell, and use GetSameTypeParent
throughout instead of checking type on everything in the parent chain by
hand.
2) If parentURI is not an nsIURL, get the spec from parentURI, not aURI as the
code did (this was clearly a bug in the existing code).
3) Switch some raw pointers to nsCOMPtr + swap(); the existing code was
violating ownership rules...
Attachment #176616 -
Flags: superreview?(jst)
Attachment #176616 -
Flags: review?(jst)
Comment 2•20 years ago
|
||
Comment on attachment 176616 [details] [diff] [review]
Patch.
r+sr=jst
Attachment #176616 -
Flags: superreview?(jst)
Attachment #176616 -
Flags: superreview+
Attachment #176616 -
Flags: review?(jst)
Attachment #176616 -
Flags: review+
Assignee | ||
Comment 3•20 years ago
|
||
Fixed
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8beta2
Assignee | ||
Comment 4•19 years ago
|
||
Note: this caused bug 303163.
Updated•6 years ago
|
Product: Core → Core Graveyard
Updated•6 years ago
|
Component: Layout: HTML Frames → Layout: Images
Product: Core Graveyard → Core
You need to log in
before you can comment on or make changes to this bug.
Description
•