[BrowserMixin] Switch all browser API from DOMRequest to .then format

RESOLVED FIXED in 2.1 S8 (7Nov)

Status

RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: alive, Assigned: alive)

Tracking

(Blocks: 1 bug)

unspecified
2.1 S8 (7Nov)
ARM
Gonk (Firefox OS)
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
Created attachment 8515805 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/25751

Support then with backward compatibility.
Attachment #8515805 - Flags: review?(timdream)
Comment on attachment 8515805 [details] [review]
https://github.com/mozilla-b2g/gaia/pull/25751

Not entirely sure the complexity is warranted -- but it we need this we should land it.
Attachment #8515805 - Flags: review?(timdream) → review+
https://github.com/mozilla-b2g/gaia/commit/c2cf0eb9e7e81e2ae6bcf897e6d35ec10103adcb
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #2)
> Comment on attachment 8515805 [details] [review]
> https://github.com/mozilla-b2g/gaia/pull/25751
> 
> Not entirely sure the complexity is warranted -- but it we need this we
> should land it.

According to Kanru, they tend to replace DOMRequest with Promise in bug 1044736, so this is a safe migration before that happens.
I actually meant to ask do we need to maintain backward compatibility (the onsuccess/onerror part) now the that both DOMRequest and Promise are then-able....
Flags: needinfo?(alive)
(In reply to Tim Guan-tin Chien [:timdream] (MoCo-TPE) (please ni?) from comment #5)
> I actually meant to ask do we need to maintain backward compatibility (the
> onsuccess/onerror part) now the that both DOMRequest and Promise are
> then-able....

Just don't want to frustrate who is working on gaia master to force them to flash latest gecko.
But if you think it's redundant, we could drop the backward compatibility.
Flags: needinfo?(alive)
Let's file a follow-up and remove it. It's been 3 weeks since bug 839838 lands IMHO the grace period is enough. Thanks!
Flags: needinfo?(alive)
FWIW I plan to use then syntax only in bug 1094561 very soon. Gaia + Gecko mismatch will be broken by then.
Assignee: nobody → alive
Target Milestone: --- → 2.1 S8 (7Nov)
Blocks: 1094742
filed 1094742
Flags: needinfo?(alive)
You need to log in before you can comment on or make changes to this bug.