Closed
Bug 1430450
Opened 6 years ago
Closed 6 years ago
[Static Analysis][Logically dead code] NoteDirtyElement: Logically dead code
Categories
(Core :: DOM: Core & HTML, enhancement, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
mozilla60
Tracking | Status | |
---|---|---|
firefox60 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: supersonic12910, Mentored)
References
(Blocks 1 open bug)
Details
(Keywords: coverity, Whiteboard: [good first bug][lang=C++][CID 1427555])
Attachments
(1 file)
1.29 KB,
patch
|
emilio
:
review+
|
Details | Diff | Splinter Review |
Here: https://dxr.mozilla.org/mozilla-central/source/dom/base/Element.cpp?q=if+%28%21existingRoot%29+%7B&redirect_type=single#4655 We are exiting the function when existingRoot is null. So, the check with existingRoot on this line: https://dxr.mozilla.org/mozilla-central/source/dom/base/Element.cpp?q=if+%28%21existingRoot%29+%7B&redirect_type=single#4665 is useless We should remove the check line 4665 to replace it by the allocation.
Comment 1•6 years ago
|
||
> We should remove the check line 4665 to replace it by the allocation. Not sure what you mean by "the allocation", but I assume you mean we should replace: uint32_t existingBits = existingRoot ? doc->GetServoRestyleRootDirtyBits() : 0; with uint32_t existingBits = doc->GetServoRestyleRootDirtyBits(); Which we should do (I forgot to simplify this in bug 1398119).
Reporter | ||
Comment 2•6 years ago
|
||
Indeed! I reported that as a good first bug to understand our workflows but you can take it if you want
Comment 3•6 years ago
|
||
I'm a beginner, can I take up this issue?
Reporter | ||
Comment 4•6 years ago
|
||
Sure, just propose a patch for this!
Comment 5•6 years ago
|
||
(In reply to Sylvestre Ledru [:sylvestre] from comment #4) > Sure, just propose a patch for this! Thanks!
Comment 6•6 years ago
|
||
I cannot find the link to the base repo on github, it would be great if someone can provide the same. Thanks!
Comment 7•6 years ago
|
||
(In reply to tanyavedi76 from comment #6) > I cannot find the link to the base repo on github, it would be great if > someone can provide the same. Thanks! I'd recommend having a look at https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Introduction You can also find a semi-official github mirror of the firefox repository (which uses mercurial) at https://github.com/mozilla/gecko
Updated•6 years ago
|
Priority: -- → P3
Assignee | ||
Comment 8•6 years ago
|
||
Do we've to just replace uint32_t existingBits = existingRoot ? doc->GetServoRestyleRootDirtyBits() : 0; with the line uint32_t existingBits = doc->GetServoRestyleRootDirtyBits(); ??
Comment 9•6 years ago
|
||
(In reply to Ashish Daulatabad from comment #8) > Do we've to just replace > uint32_t existingBits = existingRoot ? doc->GetServoRestyleRootDirtyBits() : > 0; > > with the line > > uint32_t existingBits = doc->GetServoRestyleRootDirtyBits(); ?? Yes.
Assignee | ||
Comment 10•6 years ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #9) > Yes. I'll do it then.
Reporter | ||
Updated•6 years ago
|
status-firefox59:
affected → ---
Assignee | ||
Comment 12•6 years ago
|
||
Guys... I'm finding trouble in generating the patch file. Can you please help me out?
Reporter | ||
Comment 13•6 years ago
|
||
here it is: https://developer.mozilla.org/en-US/docs/Mercurial/Using_Mercurial#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F
Assignee | ||
Comment 14•6 years ago
|
||
Reporter | ||
Comment 15•6 years ago
|
||
Comment on attachment 8946313 [details] [diff] [review] Bug 1430450 - Removal of logically dead code. Review of attachment 8946313 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. You should look for a reviewer. Bobby should be enough.
Assignee | ||
Comment 16•6 years ago
|
||
(In reply to Sylvestre Ledru [:sylvestre] from comment #15) > Looks good. You should look for a reviewer. Bobby should be enough. I'm really new to this one. Can you help me??
Comment 17•6 years ago
|
||
Comment on attachment 8946313 [details] [diff] [review] Bug 1430450 - Removal of logically dead code. r=me, thanks a lot! For reference, you can ask for review in a page in the details page of the attachment, like: https://bugzilla.mozilla.org/attachment.cgi?id=8946313&action=edit
Attachment #8946313 -
Flags: review+
Comment 18•6 years ago
|
||
Pushed by ecoal95@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/397ad5120bb0 Remove Logically dead code. r=emilio
Comment 19•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/397ad5120bb0
Status: NEW → RESOLVED
Closed: 6 years ago
status-firefox60:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•