Closed
Bug 1408250
Opened 8 years ago
Closed 8 years ago
Don't expose PaymentRequest Constructor in non-e10s.
Categories
(Core :: DOM: Web Payments, enhancement)
Core
DOM: Web Payments
Tracking
()
RESOLVED
FIXED
mozilla58
| Tracking | Status | |
|---|---|---|
| firefox58 | --- | fixed |
People
(Reporter: edenchuang, Assigned: edenchuang)
Details
Attachments
(1 file, 2 obsolete files)
|
3.98 KB,
patch
|
edenchuang
:
review+
|
Details | Diff | Splinter Review |
PaymentRequest constructor should not be able to use under non-e10s.
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → echuang
Status: NEW → ASSIGNED
| Assignee | ||
Comment 1•8 years ago
|
||
Return false in PaymentRequest::PrefEnabled() while in non-e10s.
Attachment #8920084 -
Flags: review?(amarchesini)
Comment 2•8 years ago
|
||
Comment on attachment 8920084 [details] [diff] [review]
Bug 1408250 - Don't expose PaymentRequest API in non-e10s. r?baku
Review of attachment 8920084 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/payments/PaymentRequest.cpp
@@ +51,5 @@
>
> bool
> PaymentRequest::PrefEnabled(JSContext* aCx, JSObject* aObj)
> {
> + return mozilla::BrowserTabsRemoteAutostart() &&
You want to check if this method is called in the content process.
Probably you want to use XRE_IsContentProcess() ?
Attachment #8920084 -
Flags: review?(amarchesini) → review-
| Assignee | ||
Comment 3•8 years ago
|
||
Update the patch according to comment 2.
Using XRE_IsContentProcess instead of BrowserTabsRemoteAutostart().
Attachment #8920084 -
Attachment is obsolete: true
Attachment #8920252 -
Flags: review?(amarchesini)
Comment 4•8 years ago
|
||
Comment on attachment 8920252 [details] [diff] [review]
Bug 1408250 - Don't expose PaymentRequest API in non-e10s. r?baku
Review of attachment 8920252 [details] [diff] [review]:
-----------------------------------------------------------------
Can you add a test where you disable e10s and check if the payment API is disabled.
Attachment #8920252 -
Flags: review?(amarchesini) → review+
| Assignee | ||
Comment 6•8 years ago
|
||
(In reply to Andrea Marchesini [:baku] from comment #4)
> Comment on attachment 8920252 [details] [diff] [review]
> Bug 1408250 - Don't expose PaymentRequest API in non-e10s. r?baku
>
> Review of attachment 8920252 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Can you add a test where you disable e10s and check if the payment API is
> disabled.
The patch includes a test, test_block_none10s.html, which is specified to run with non-e10s in mochitest.ini.
Do you mean that we need another test that disabling e10s in manual and then testing Payment API?
If yes, there is one problem with disabling e10s in manual. We can set e10s prefs, such as browser.tabs.remote.autostart.2 and others, to disable e10s, but we need to restart the browser to apply the prefs changes, however, I don't know how to restart the browser in the mochitest environment. One thing we probably can do is opening a non-e10s tab for testing Payment API, but it seems to be different with disabling e10s in manual.(In reply to Andrew Overholt [:overholt] from comment #5)
> Fennec is non-e10s, though.
Yes, according to Product's plan, currently we only support WebPayment on desktop. Maybe they a plan for mobile, I will check with them.
Flags: needinfo?(echuang) → needinfo?(amarchesini)
Comment 7•8 years ago
|
||
You can create a normal mochitest and mark it as 'skip-if = e10s' in mochitest.ini
Flags: needinfo?(amarchesini)
| Assignee | ||
Comment 8•8 years ago
|
||
| Assignee | ||
Comment 9•8 years ago
|
||
modify the configuration in mochitest.ini from "run-if = !e10s" to "skip-if = e10s".
Attachment #8920252 -
Attachment is obsolete: true
Attachment #8921287 -
Flags: review+
| Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 10•8 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3d2dad936121
Don't expose PaymentRequest API in non-e10s. r=baku
Keywords: checkin-needed
Comment 11•8 years ago
|
||
| bugherder | ||
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in
before you can comment on or make changes to this bug.
Description
•