Closed Bug 1376929 Opened 7 years ago Closed 7 years ago

Fix places-related mochitests in chrome/ for async-transactions

Categories

(Firefox :: Bookmarks & History, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
Firefox 56
Tracking Status
firefox56 --- fixed

People

(Reporter: standard8, Assigned: mak)

References

Details

(Whiteboard: [fxsearch])

Attachments

(1 file)

There are various tests in chrome/ that fail when we try to turn on async-transactions. We should fix those.
stealing bug.
Assignee: standard8 → mak77
Status: NEW → ASSIGNED
Blocks: 1377864
Looks like there are some failures to look into.
Attachment #8882723 - Flags: review?(standard8)
Comment on attachment 8882723 [details] Bug 1376929 - Fix places-related mochitests in chrome/ for async-transactions. https://reviewboard.mozilla.org/r/153816/#review159302
Attachment #8882723 - Flags: review?(standard8) → review+
Pushed by mak77@bonardo.net: https://hg.mozilla.org/integration/autoland/rev/1f5e741ab2b6 Fix places-related mochitests in chrome/ for async-transactions. r=standard8
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 56
> - if (!aURI || !aTags || !Array.isArray(aTags)) { > - throw Cr.NS_ERROR_INVALID_ARG; > + if (!aURI || !aTags || !Array.isArray(aTags) || aTags.length == 0) { > + throw Components.Exception("Invalid value for tags", Cr.NS_ERROR_INVALID_ARG); Why did you do that? An empty array is still an array. getTagsForURI can return an empty array; why am I not allowed to pass the returned value straight to tagURI? This broke https://addons.mozilla.org/en-US/firefox/addon/bmreplace/.
Flags: needinfo?(mak77)
(In reply to Dmitry Gutov from comment #9) > Why did you do that? An empty array is still an array. getTagsForURI can > return an empty array; why am I not allowed to pass the returned value > straight to tagURI? because trying to tag with an empty array may hide bugs in the code. Suppose some code is trying to add tags, but due to a bug it ends up passing an empty array every time.
Flags: needinfo?(mak77)
> Suppose some code is trying to add tags, but due to a bug it ends up passing an empty array every time. That is silly. An imaginary bug that ends up generating an empty array unintentionally could just as well generate a non-empty array with undesired values. This is a backward incompatible change. Please revert it.
why? the extension can be fixed easily with a simple if, in a few minutes. I prefer having the API helping us finding unexpected behaviors in the UI code.
I doubt this is the only extension that will need to be fixed. And debugging this breakage took more than a few minutes.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: