Closed Bug 1148191 Opened 5 years ago Closed 5 years ago
URLAnd Post Data For Keyword() is deprecated, please use Places Utils .keywords .fetch() instead
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.
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)
(In reply to email@example.com 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!
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.