Closed
Bug 1379925
Opened 8 years ago
Closed 8 years ago
Crash while testing PaymentRequest.onshippingaddresschange/onshippingoptionchange
Categories
(Core :: DOM: Web Payments, defect)
Core
DOM: Web Payments
Tracking
()
RESOLVED
FIXED
mozilla56
Tracking | Status | |
---|---|---|
firefox56 | --- | fixed |
People
(Reporter: ben.tian, Assigned: ben.tian)
References
(Blocks 1 open bug)
Details
Attachments
(2 files, 2 obsolete files)
1013 bytes,
patch
|
baku
:
review+
alchen
:
feedback+
|
Details | Diff | Splinter Review |
2.36 KB,
patch
|
Details | Diff | Splinter Review |
Crash occurs while running web platform tests for payment request shippingaddresschange/shippingoptionchange
https://w3c-test.org/payment-request/payment-request-onshippingaddresschange-attribute.https.html
https://w3c-test.org/payment-request/payment-request-onshippingoptionchange-attribute.https.html
The crash disappears if [1] is commented out.
[1] https://github.com/w3c/web-platform-tests/blob/master/payment-request/payment-request-onshippingaddresschange-attribute.https.html#L36
Assignee | ||
Comment 1•8 years ago
|
||
The crash results from [1] with log [2] and disappears with [1] commented out. Keep checking.
[1] http://searchfox.org/mozilla-central/rev/5dadcbe55b4ddd1e448c06c77390ff6483aa009b/dom/payments/PaymentRequestUpdateEvent.cpp#53
[2] Hit MOZ_CRASH(DOMEventTargetHelper not thread-safe) at /Users/bentian/Workspace/central/xpcom/base/nsISupportsImpl.cpp:43
Assignee | ||
Comment 2•8 years ago
|
||
(In reply to Ben Tian [:btian] from comment #1)
> [1]
> http://searchfox.org/mozilla-central/rev/
> 5dadcbe55b4ddd1e448c06c77390ff6483aa009b/dom/payments/
> PaymentRequestUpdateEvent.cpp#53
|aOwner| is NOT a payment request if the event is created from WebIDL constructor. Will revise to set |mRequest| only when the event is created by a payment request.
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → btian
Assignee | ||
Comment 3•8 years ago
|
||
The patch adds extra argument |aIsOwnerPaymentRequest| to tell event constructor whether the event target is a payment request or not.
Attachment #8886008 -
Flags: review?(amarchesini)
Attachment #8886008 -
Flags: feedback?(alchen)
Assignee | ||
Updated•8 years ago
|
Blocks: paymentrequest-wpt
![]() |
||
Updated•8 years ago
|
Attachment #8886008 -
Flags: feedback?(alchen) → feedback+
Assignee | ||
Comment 4•8 years ago
|
||
Comment on attachment 8886008 [details] [diff] [review]
Bug 1379925 - Set PaymentRequestUpdateEvent.mRequest only if event target is a payment request
updateWith may need to throw InvalidStateError if event's target is not PaymentRequest (i.e., mRequest == nullptr) per [1]. Cancel r? to revise.
[1] https://github.com/w3c/browser-payment-api/pull/547#issuecomment-307305938
Attachment #8886008 -
Flags: review?(amarchesini)
Assignee | ||
Comment 5•8 years ago
|
||
Change:
Instead of in event constructor, |mRequest| is set by |PaymentRequest::DispatchUpdateEvent| after |SetTrusted|, to allow |IsTrusted| assertion check before event sets |Request|.
Attachment #8886008 -
Attachment is obsolete: true
Attachment #8886455 -
Flags: review?(amarchesini)
Attachment #8886455 -
Flags: feedback?(alchen)
Assignee | ||
Comment 6•8 years ago
|
||
The patch revises |updateWith| flow based on spec changes [1][2]. This patch also ensures |mRequest| is only accessible by trusted event.
[1] https://github.com/w3c/browser-payment-api/commit/cac8a0cd20bd4446f98fdecdc046fa809016cdb4
[2] https://github.com/w3c/browser-payment-api/commit/3b7f783be9161de0907add494e32a365a411d345
Attachment #8886457 -
Flags: review?(amarchesini)
Attachment #8886457 -
Flags: feedback?(alchen)
Comment 7•8 years ago
|
||
Comment on attachment 8886455 [details] [diff] [review]
Patch 1 (v1): Set PaymentRequestUpdateEvent.mRequest only when event target is a PaymentRequest
Review of attachment 8886455 [details] [diff] [review]:
-----------------------------------------------------------------
::: dom/payments/PaymentRequestUpdateEvent.cpp
@@ +117,5 @@
>
> +void
> +PaymentRequestUpdateEvent::SetRequest(PaymentRequest* aRequest)
> +{
> + MOZ_ASSERT(IsTrusted());
MOZ_ASSERT(!mRequest);
MOZ_ASSERT(aRequest);
Attachment #8886455 -
Flags: review?(amarchesini) → review+
Updated•8 years ago
|
Attachment #8886457 -
Flags: review?(amarchesini) → review+
Assignee | ||
Comment 8•8 years ago
|
||
Revise per reviewer's suggestion.
Assignee | ||
Updated•8 years ago
|
Attachment #8886455 -
Attachment is obsolete: true
Attachment #8886455 -
Flags: feedback?(alchen)
Assignee | ||
Updated•8 years ago
|
Attachment #8886457 -
Attachment description: Patch 2 (v1): Revise method |updateWith| based on spec change → [final] Patch 2: Revise method |updateWith| based on spec change, r=baku
Assignee | ||
Comment 9•8 years ago
|
||
Try result:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=85ec39ac7a936c2749481e5cfde5bff9decf1550
Keywords: checkin-needed
Comment 11•8 years ago
|
||
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/39dc330b3560
Part 1: Set PaymentRequestUpdateEvent.mRequest only when event target is a PaymentRequest. r=baku
https://hg.mozilla.org/integration/mozilla-inbound/rev/10677a3988fc
Part 2: Revise method |updateWith| based on spec change. r=baku
Keywords: checkin-needed
Comment 12•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/39dc330b3560
https://hg.mozilla.org/mozilla-central/rev/10677a3988fc
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox56:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
![]() |
||
Comment 13•8 years ago
|
||
Comment on attachment 8886457 [details] [diff] [review]
[final] Patch 2: Revise method |updateWith| based on spec change, r=baku
Review of attachment 8886457 [details] [diff] [review]:
-----------------------------------------------------------------
LGTM
Attachment #8886457 -
Flags: feedback?(alchen) → feedback+
You need to log in
before you can comment on or make changes to this bug.
Description
•