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)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: edenchuang, Assigned: edenchuang)

Details

Attachments

(1 file, 2 obsolete files)

PaymentRequest constructor should not be able to use under non-e10s.
Assignee: nobody → echuang
Status: NEW → ASSIGNED
Return false in PaymentRequest::PrefEnabled() while in non-e10s.
Attachment #8920084 - Flags: review?(amarchesini)
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-
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 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+
Fennec is non-e10s, though.
Flags: needinfo?(echuang)
(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)
You can create a normal mochitest and mark it as 'skip-if = e10s' in mochitest.ini
Flags: needinfo?(amarchesini)
modify the configuration in mochitest.ini from "run-if = !e10s" to "skip-if = e10s".
Attachment #8920252 - Attachment is obsolete: true
Attachment #8921287 - Flags: review+
Keywords: checkin-needed
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
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: