Closed
Bug 325381
Opened 19 years ago
Closed 18 years ago
nsWebBrowserPersist::OnWalkDOMNode missing early return?
Categories
(Core :: DOM: Serializers, defect)
Core
DOM: Serializers
Tracking
()
RESOLVED
FIXED
People
(Reporter: Brade, Assigned: sciguyryan)
Details
(Keywords: perf)
Attachments
(1 file)
1.06 KB,
patch
|
Biesinger
:
review+
Biesinger
:
superreview+
|
Details | Diff | Splinter Review |
I was looking at nsWebBrowserPersist::OnWalkDOMNode today:
nsresult nsWebBrowserPersist::OnWalkDOMNode(nsIDOMNode *aNode)
{
// Fixup xml-stylesheet processing instructions
nsCOMPtr<nsIDOMProcessingInstruction> nodeAsPI = do_QueryInterface(aNode);
if (nodeAsPI)
{
nsAutoString target;
nodeAsPI->GetTarget(target);
if (target.EqualsLiteral("xml-stylesheet"))
{
nsAutoString href;
GetXMLStyleSheetLink(nodeAsPI, href);
if (!href.IsEmpty())
{
StoreURI(NS_ConvertUCS2toUTF8(href).get());
}
}
}
It seems like there should be a return NS_OK; after the StoreURI call as there is in the code below. Is there a reason we don't return early?
Assignee | ||
Comment 1•18 years ago
|
||
Patch v1
It should be fine to return any time inside the |nodeAsPI| node as far as I can see.
Assignee: adamlock → sciguyryan
Status: NEW → ASSIGNED
Attachment #265696 -
Flags: superreview?(cbiesinger)
Attachment #265696 -
Flags: review?(cbiesinger)
Updated•18 years ago
|
Attachment #265696 -
Flags: superreview?(cbiesinger)
Attachment #265696 -
Flags: superreview+
Attachment #265696 -
Flags: review?(cbiesinger)
Attachment #265696 -
Flags: review+
Assignee | ||
Updated•18 years ago
|
Whiteboard: [checkin needed]
Comment 2•18 years ago
|
||
Patch v1 checked in. Clearing checkin-needed status.
Whiteboard: [checkin needed]
Assignee | ||
Updated•18 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Updated•18 years ago
|
Flags: in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•