mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1519284. Fix rooting hazards in PaymentRequest. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D16891 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
220c6752d7
commit
3bf84b1452
@ -10,6 +10,7 @@
|
||||
#include "mozilla/dom/PaymentRequest.h"
|
||||
#include "mozilla/dom/PaymentRequestChild.h"
|
||||
#include "mozilla/dom/PaymentRequestManager.h"
|
||||
#include "mozilla/dom/RootedDictionary.h"
|
||||
#include "mozilla/intl/LocaleService.h"
|
||||
#include "mozilla/intl/MozLocale.h"
|
||||
#include "mozilla/EventStateManager.h"
|
||||
@ -1080,7 +1081,7 @@ void PaymentRequest::ResolvedCallback(JSContext* aCx,
|
||||
}
|
||||
|
||||
// Converting value to a PaymentDetailsUpdate dictionary
|
||||
PaymentDetailsUpdate details;
|
||||
RootedDictionary<PaymentDetailsUpdate> details(aCx);
|
||||
if (!details.Init(aCx, aValue)) {
|
||||
AbortUpdate(NS_ERROR_DOM_TYPE_ERR);
|
||||
JS_ClearPendingException(aCx);
|
||||
|
@ -5,6 +5,7 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "mozilla/dom/PaymentRequestUpdateEvent.h"
|
||||
#include "mozilla/dom/RootedDictionary.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
@ -61,7 +62,7 @@ void PaymentRequestUpdateEvent::ResolvedCallback(JSContext* aCx,
|
||||
}
|
||||
|
||||
// Converting value to a PaymentDetailsUpdate dictionary
|
||||
PaymentDetailsUpdate details;
|
||||
RootedDictionary<PaymentDetailsUpdate> details(aCx);
|
||||
if (!details.Init(aCx, aValue)) {
|
||||
mRequest->AbortUpdate(NS_ERROR_TYPE_ERR);
|
||||
JS_ClearPendingException(aCx);
|
||||
|
Loading…
Reference in New Issue
Block a user