Merge lp://staging/~benji/launchpad/bug-768336 into lp://staging/launchpad
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Brad Crittenden | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 12913 | ||||
Proposed branch: | lp://staging/~benji/launchpad/bug-768336 | ||||
Merge into: | lp://staging/launchpad | ||||
Diff against target: |
135 lines (+26/-34) 3 files modified
lib/lp/bugs/javascript/bugtask_index_portlets.js (+14/-8) lib/lp/bugs/javascript/subscriber.js (+12/-7) lib/lp/bugs/javascript/tests/test_subscriber.js (+0/-19) |
||||
To merge this branch: | bzr merge lp://staging/~benji/launchpad/bug-768336 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brad Crittenden (community) | code | Approve | |
Review via email: mp+58830@code.staging.launchpad.net |
Commit message
[r=bac][bug=768336][no-qa] fix subscriber name race condition
Description of the change
Bug 768336 describes a problem when subscribing to a bug: "on FF4, the
added row in the portlet only contains the person icon and the remove
icon, without my display name."
It turns out that there is a race condition when looking up a
subscriber's information via the web service. The request is dispatched
asynchronously, but the caller expects the results to be available when
the request-dispatching function returns; it often is not.
It looked like I was going to have to refactor the entire call chain to
be asynchronous, but there were two places where functions were called
without needing to return a result and they could be used as the points
to splice in asynchronous behavior without being hacky.
I can no longer reproduce the bug in FF4 and Chrome continues to work.
The existing tests continue to pass, they can be run by loading
lib/lp/
I made a small, related change by removing the unused displaynameload
event and associated test.
This branch is lint-free.
Nice branch Benji. Thanks for removing 'displaynameload' ... that's the sort of thing that could've lived for a long time doing absolutely nothing.
The rest of the branch looks good.