Closed Bug 1148191 Opened 5 years ago Closed 5 years ago

getURLAndPostDataForKeyword() is deprecated, please use PlacesUtils.keywords.fetch() instead

Categories

(SeaMonkey :: General, defect)

defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
seamonkey2.37

People

(Reporter: philip.chee, Assigned: neil)

References

Details

Attachments

(2 files)

From Bug 1100294 (Deprecate PlacesUtils.getURLAndPostDataForKeyword)

getURLAndPostDataForKeyword() is deprecated, please use PlacesUtils.keywords.fetch() instead

(In Bug 8583180 comment #0)
> getURIAndPostDataForKeyword should be deprecated in favor of
> PlacesUtils.keywords.fetch(), but first we must fix the consumers.
Duplicate of this bug: 1148415
Blocks: 1149548
Blocks: 1150851
Attached patch Proposed patchSplinter Review
Since promiseShortcutOrURI already returns a promise, all I had to do was to move the code that handled the return from fetch into its then method, which would then resolve to a promise for the value returned from the then method, thus also saving me from manually returning a resolved promise.

Of course returning a promise instead a then method also works; the then then resolves when and to whatever the returned promise resolves.
Assignee: nobody → neil
Status: NEW → ASSIGNED
Attachment #8588166 - Flags: review?(iann_bugzilla)
Attachment #8588166 - Flags: review?(iann_bugzilla) → review+
(In reply to neil@parkwaycc.co.uk from comment #3)
> Of course returning a promise instead a then method also works; the then
> then resolves when and to whatever the returned promise resolves.

Having a method called "then" really confused me when trying to read the above!
Pushed comm-central changeset 83106028dd34.
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.37
You need to log in before you can comment on or make changes to this bug.