Closed
Bug 1113811
Opened 10 years ago
Closed 10 years ago
Remove unnecessary null-check of "new css::Declaration" in nsCSSParser
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla37
People
(Reporter: dholbert, Assigned: dholbert)
References
Details
Attachments
(3 files, 1 obsolete file)
1.01 KB,
patch
|
Details | Diff | Splinter Review | |
1.69 KB,
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
1.07 KB,
patch
|
Details | Diff | Splinter Review |
CSSParserImpl::ParseDeclarationBlock has an unnecessary null-check after new (unnecessary because new is infallible). Filing this bug on cleaning that up.
Assignee | ||
Updated•10 years ago
|
OS: Linux → All
Hardware: x86_64 → All
Assignee | ||
Comment 1•10 years ago
|
||
Attachment #8539487 -
Flags: review?(cam)
Assignee | ||
Comment 2•10 years ago
|
||
Updated•10 years ago
|
Attachment #8539487 -
Flags: review?(cam) → review+
Assignee | ||
Comment 3•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/f6a3f2525323
Flags: in-testsuite-
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/2b933356daf7 for apparently breaking all tests: https://treeherder.mozilla.org/ui/#/jobs?repo=mozilla-inbound&revision=f22bb012bf58 (Builds were broken on dholbert's push, so this is the most recent push that built with dholbert's changes.)
Flags: needinfo?(dholbert)
Looks like the patch moved the declaration->CompressFrom() line into the loop, when it shouldn't have. (Should have un-indented it instead of leaving it at its current indent.)
Assignee | ||
Comment 6•10 years ago
|
||
Yup -- looks like I mistakenly deleted the wrong closing-brace. (not the one that corresponded to the "if" condition that I'm removing). (This is equivalent to what dbaron said in comment 5) I think I probably did this because my merge too, "meld", highlighted the wrong one for me, because it was confused about bracing-level by an extra (quoted!) closing-brace in this code: "ExpectSymbol('}', true)" Anyway, I'm going to rebuild & briefly test with that locally, and if all is well, I'll re-push with that fixed.
Flags: needinfo?(dholbert)
Assignee | ||
Comment 7•10 years ago
|
||
Here's the fixed patch. I verified that I can open a browser and open/close tabs, with this patch applied. (I could not, with the previous patch; we crash/abort before that.) I think that's sufficient testing for a patch of this sort (removing an unnecessary null-check). Sorry for not performing it on the earlier patch & catching that mistake earlier. :)
Attachment #8540482 -
Flags: review+
Assignee | ||
Comment 8•10 years ago
|
||
Assignee | ||
Comment 9•10 years ago
|
||
Re-landed: https://hg.mozilla.org/integration/mozilla-inbound/rev/a28c173dbd61
Assignee | ||
Updated•10 years ago
|
Attachment #8539487 -
Attachment is obsolete: true
Comment 10•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/a28c173dbd61
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
You need to log in
before you can comment on or make changes to this bug.
Description
•