Closed Bug 1358432 Opened 7 years ago Closed 7 years ago

[Regression]'Add to Bookmarks' share extension does not work on v7.3b2756

Categories

(Firefox for iOS :: General, enhancement)

Other
iOS
enhancement
Not set
normal

Tracking

()

VERIFIED FIXED
Tracking Status
fxios-v7.2 --- unaffected
fxios-v7.3 --- verified
fxios 7.3 ---

People

(Reporter: csuciu, Assigned: st3fan)

Details

Attachments

(2 files)

v7.3b2756

1. Visit a site
2. Open Share menu and select => Firefox => Add to Bookmarks => Add
3. Check Bookmarks panel

Result: The site doesn't show up in the bookmarks list.

Note: This issue is not reproducible on v7.2 (release)
The problem is as follows: insertBookmark(_:title:favicon:intoFolder:withTitle:) is an asynchronous function. It returns a Deferred. But that deferred gets lost in profile.shareItem() and is ignore. So the ShareTo app extension finishes and then closes the database connection too soon.
This patch makes `shareItem` return a `Success` (which is a `Deferred<Maybe<Void>>`) so that the caller can wait for asynchronous database operations to finish. Currently we just call `shareItem()` and then immediately `profile.shutdown()`, which is bad since we are still in the process of adding the bookmark. This patch makes it possible to properly wait.
Assignee: nobody → sarentz
Attachment #8860403 - Flags: review?(sleroux)
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Landed on both v7.x and master
Verifying as fixed in 7.3 (2772) release
Status: RESOLVED → VERIFIED
Attachment #8860403 - Flags: review?(sleroux) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: