Closed
Bug 709589
Opened 13 years ago
Closed 13 years ago
Some engine manager cleanup found by SeaMonkey reviews
Categories
(Firefox :: Search, defect)
Firefox
Search
Tracking
()
RESOLVED
FIXED
Firefox 13
People
(Reporter: kairo, Assigned: kairo)
References
Details
Attachments
(6 files, 1 obsolete file)
10.39 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
2.07 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
1.02 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
1.04 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
2.31 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
8.61 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
Splitting off the engine manager parts from bug 643172.
Assignee | ||
Updated•13 years ago
|
Assignee: nobody → kairo
Assignee | ||
Comment 1•13 years ago
|
||
Here's the first and probably largest part - Switching engine manager to using Services.jsm, and as it's closely connected, it also removes redundancy in removing the observer, putting it in a common destroy/onunload function, obsoleting the onCancel one.
Attachment #580760 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 2•13 years ago
|
||
This patch fixes the use of engine.name outside the loop where it's declared with a let. This is a generic bug in current engine manager, as there it currently must end up being undefined, the way I'm reading the code (and Neil agreed with that POV in the SeaMonkey reviews).
Attachment #580762 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 3•13 years ago
|
||
Here's a patch for the observer - only "engine-changed" needs to .invalidate() as .rowCountChanged() does the invalidate/update to the tree display anyhow (in an optimized way to only do it for the affected rows), calling .invalidate() there will just be more work with the same effect. This ends up being a slight perf fix.
(Also, the "Not relevant" cases also can now exit the function normally, no need to early return there).
Attachment #580764 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 4•13 years ago
|
||
This patch makes _cloneEngine easier to read and debug (and also makes the object init to be an object and not an array).
When I read this function the first time, I had difficulty wrapping my head around what this intermediate variable was, in the patched version it's clear that it's a cloned object. Also, the function name now correlates with the method name it has in EngineStore.
Attachment #580765 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 5•13 years ago
|
||
This patch makes onSelect better readable, also avoiding another intermittent variable and using the nice fact that if we only have one engine left, it's both the first and last one in the list.
Attachment #580766 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 6•13 years ago
|
||
Actually, this is the correct patch for this (the original comment is correct).
Attachment #580766 -
Attachment is obsolete: true
Attachment #580766 -
Flags: review?(gavin.sharp)
Attachment #580767 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 7•13 years ago
|
||
OK, here's the last patch in this series, consisting of a number of nits - whitespace fixes, superfluous brackets, missing semicolons, superfluous "!important" markers, unneeded spacers, a better understandable button ID - and using the fact that we can use .currentIndex instead of re-calculating the position of the just-selected item another time.
Attachment #580769 -
Flags: review?(gavin.sharp)
Updated•13 years ago
|
Attachment #580765 -
Flags: review?(gavin.sharp) → review+
Updated•13 years ago
|
Attachment #580767 -
Flags: review?(gavin.sharp) → review+
Updated•13 years ago
|
Attachment #580760 -
Flags: review?(gavin.sharp) → review+
Updated•13 years ago
|
Attachment #580764 -
Flags: review?(gavin.sharp) → review+
Comment 8•13 years ago
|
||
Comment on attachment 580762 [details] [diff] [review]
engine.name, v1
This fixes the engine duplicate case, but doesn't properly handle the bookmark duplication case (dupName will be ""), so it's necessary but not sufficient. I guess maybe we need to have two different error messages ("used by 'Someengine'" vs. "used by a bookmark.").
Attachment #580762 -
Flags: review?(gavin.sharp) → review-
Updated•13 years ago
|
Attachment #580769 -
Flags: review?(gavin.sharp) → review+
Comment 9•13 years ago
|
||
Before landing, please make sure that all of these changes together don't break the engine manager with manual testing, if you haven't already.
Thanks for doing this!
Assignee | ||
Comment 10•13 years ago
|
||
(In reply to Gavin Sharp (use gavin@gavinsharp.com for email) from comment #9)
> Before landing, please make sure that all of these changes together don't
> break the engine manager with manual testing, if you haven't already.
I had done this before and did it again (including adding/resorting/keywording/removing engines) before pushing. I also pushed to try to be extra sure (and found something it doesn't like in the bug 643172 patches, still need to investigate that, but the ones here are fine).
> Thanks for doing this!
I just hope it will still be helpful, given that work to move the engine management into add-on manager has been picked up again (which is good in its own respect). ;-)
http://hg.mozilla.org/integration/mozilla-inbound/rev/84becc09d904
http://hg.mozilla.org/integration/mozilla-inbound/rev/79cb693afd54
http://hg.mozilla.org/integration/mozilla-inbound/rev/3374fe9737a9
http://hg.mozilla.org/integration/mozilla-inbound/rev/c8ed809f6a9d
http://hg.mozilla.org/integration/mozilla-inbound/rev/622f1d1e7c52
Comment 11•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/84becc09d904
https://hg.mozilla.org/mozilla-central/rev/79cb693afd54
https://hg.mozilla.org/mozilla-central/rev/3374fe9737a9
https://hg.mozilla.org/mozilla-central/rev/c8ed809f6a9d
https://hg.mozilla.org/mozilla-central/rev/622f1d1e7c52
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
Assignee | ||
Comment 12•13 years ago
|
||
Let's leave the bug open as one patch didn't get the reviews to land right now. I'll look into that one as soon as I have some time.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: Firefox 12 → ---
Comment 13•13 years ago
|
||
Comment on attachment 580762 [details] [diff] [review]
engine.name, v1
Reuben pointed out in bug 728508 that I misunderstood this code - there already are two different strings, and the alert prompt uses the right one depending on whether eduplicate is true. So this patch is fine!
Attachment #580762 -
Flags: review- → review+
Comment 14•13 years ago
|
||
(sorry about that)
Assignee | ||
Comment 15•13 years ago
|
||
OK, pushed this one as well: https://hg.mozilla.org/integration/mozilla-inbound/rev/f21351397aa7
Comment 16•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/f21351397aa7
Robert, please close this if everything has landed.
Target Milestone: --- → Firefox 13
Assignee | ||
Comment 17•13 years ago
|
||
Yes, this one is fixed now (bug 643172 isn't, though).
Status: REOPENED → RESOLVED
Closed: 13 years ago → 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•