Closed Bug 1348224 Opened 5 years ago Closed 5 years ago
Don't do _adjust
Ac Item() if the type of item that about to attach is different from the previous item's type .
59 bytes, text/x-review-board-request
With profile-item binding added, the items' type vary according to result. When we jump around normal field and form-autofill field, and try to reuse existing items, it occurs that we might insensibly fire previous binding's _adjustAcItem() at  due to asynchronous attaching mechanism. This is a regression of bug 1326138, though has not yet broken any existing tests.  https://dxr.mozilla.org/mozilla-central/rev/ff04d410e74b69acfab17ef7e73e7397602d5a68/toolkit/content/widgets/autocomplete.xml#1367-1368
Comment on attachment 8848423 [details] Bug 1348224 - Don't call _adjustAcItem() if result's type is different from existing item's type. https://reviewboard.mozilla.org/r/121332/#review124726 LGTM
Attachment #8848423 - Flags: review?(adw) → review+
Found some tests failed on try server, may take more time to see why. It seems that profile item is the first and only binding using different <content> that causes the error, though I thought this patch is reliable enough to handle all type of binding. If still no better way to pass the existing tests, perhaps adding a early-return check before calling profile item's _adjustAcItem would be the best approach.
Patch updated, I've made a change about the condition of a "reusable" item. It should work fine with all original item and able to safely switch to/from autofill-profile item now.
Try result for updated patch: https://treeherder.mozilla.org/#/jobs?repo=try&revision=090b122a38fdcbf54214ba96cc69312b9efab12b It's seems good to go.
Pushed by firstname.lastname@example.org: https://hg.mozilla.org/integration/autoland/rev/bce8cd297683 Don't call _adjustAcItem() if result's type is different from existing item's type. r=adw
You need to log in before you can comment on or make changes to this bug.