Cleanup nsDocument

RESOLVED FIXED in mozilla23

Status

()

Core
DOM
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dzbarsky, Assigned: dzbarsky)

Tracking

unspecified
mozilla23
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 737755 [details] [diff] [review]
Patch
Attachment #737755 - Flags: review?(Ms2ger)
Comment on attachment 737755 [details] [diff] [review]
Patch

Review of attachment 737755 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/base/src/nsDocument.cpp
@@ +7462,3 @@
>    nsAutoString value;
> +
> +  uint32_t length = nodes ? nodes->Length(true) : 0;

nodes can't be null.

@@ +7467,3 @@
>      NS_ASSERTION(item, "null item in node list!");
>  
>      nsCOMPtr<nsIDOMHTMLInputElement> input = do_QueryInterface(item);

Just inline the call here and drop the 'item' local.

@@ +7491,5 @@
> +  nodes = GetElementsByTagName(NS_LITERAL_STRING("form"));
> +
> +  length = nodes ? nodes->Length(true) : 0;
> +  for (uint32_t i = 0; i < length; ++i) {
> +    item = nodes->Item(i);

Same two comments
Attachment #737755 - Flags: review?(Ms2ger) → review+
Sorry, I backed this out on inbound because something in the push caused build errors in nsWindow on Windows and B2G (and possibly other non-Mac platforms):
https://hg.mozilla.org/integration/mozilla-inbound/rev/583bf36efce8
https://hg.mozilla.org/mozilla-central/rev/465dfbf5f490
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
You need to log in before you can comment on or make changes to this bug.