Changeset 220980 in webkit
- Timestamp:
- Aug 21, 2017 1:53:16 PM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r220979 r220980 1 2017-08-21 Andy Estes <aestes@apple.com> 2 3 [Payment Request] Use ExistingExceptionError to propagate JS exceptions thrown during JSON stringification 4 https://bugs.webkit.org/show_bug.cgi?id=175776 5 6 Reviewed by Darin Adler. 7 8 * Modules/paymentrequest/PaymentRequest.cpp: 9 (WebCore::PaymentRequest::create): 10 * Modules/paymentrequest/PaymentRequest.h: 11 1 12 2017-08-21 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com> 2 13 -
trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp
r220971 r220980 160 160 // Implements the PaymentRequest Constructor 161 161 // https://www.w3.org/TR/payment-request/#constructor 162 ExceptionOr<Ref Ptr<PaymentRequest>> PaymentRequest::create(Document& document, Vector<PaymentMethodData>&& methodData, PaymentDetailsInit&& details, PaymentOptions&& options)162 ExceptionOr<Ref<PaymentRequest>> PaymentRequest::create(Document& document, Vector<PaymentMethodData>&& methodData, PaymentDetailsInit&& details, PaymentOptions&& options) 163 163 { 164 164 // FIXME: Check if this document is allowed to access the PaymentRequest API based on the allowpaymentrequest attribute. … … 180 180 serializedData = JSONStringify(document.execState(), paymentMethod.data.get(), 0); 181 181 if (scope.exception()) 182 return nullptr;182 return Exception { ExistingExceptionError }; 183 183 } 184 184 serializedMethodData.add(paymentMethod.supportedMethods, WTFMove(serializedData)); … … 233 233 serializedData = JSONStringify(document.execState(), modifier.data.get(), 0); 234 234 if (scope.exception()) 235 return nullptr;235 return Exception { ExistingExceptionError }; 236 236 } 237 237 serializedModifierData.uncheckedAppend(WTFMove(serializedData)); 238 238 } 239 239 240 return adoptRef( new PaymentRequest(document, WTFMove(options), WTFMove(details), WTFMove(serializedModifierData), WTFMove(serializedMethodData), WTFMove(selectedShippingOption)));240 return adoptRef(*new PaymentRequest(document, WTFMove(options), WTFMove(details), WTFMove(serializedModifierData), WTFMove(serializedMethodData), WTFMove(selectedShippingOption))); 241 241 } 242 242 -
trunk/Source/WebCore/Modules/paymentrequest/PaymentRequest.h
r220971 r220980 45 45 class PaymentRequest final : public RefCounted<PaymentRequest>, public ActiveDOMObject, public EventTargetWithInlineData { 46 46 public: 47 static ExceptionOr<Ref Ptr<PaymentRequest>> create(Document&, Vector<PaymentMethodData>&&, PaymentDetailsInit&&, PaymentOptions&&);47 static ExceptionOr<Ref<PaymentRequest>> create(Document&, Vector<PaymentMethodData>&&, PaymentDetailsInit&&, PaymentOptions&&); 48 48 ~PaymentRequest(); 49 49
Note: See TracChangeset
for help on using the changeset viewer.