2017-10-26 22:08:41 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2017-05-25 17:50:32 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_PaymentRequestUtils_h
|
|
|
|
#define mozilla_dom_PaymentRequestUtils_h
|
|
|
|
|
2021-03-25 10:19:44 +00:00
|
|
|
#include "js/TypeDecls.h"
|
2017-05-25 17:50:32 +00:00
|
|
|
#include "nsTArray.h"
|
|
|
|
|
2022-05-09 20:41:12 +00:00
|
|
|
namespace mozilla::dom {
|
2017-05-25 17:50:32 +00:00
|
|
|
|
2022-06-05 20:54:59 +00:00
|
|
|
nsresult SerializeFromJSObject(JSContext* aCx, JS::Handle<JSObject*> aObject,
|
2017-06-23 09:15:51 +00:00
|
|
|
nsAString& aSerializedObject);
|
2018-11-30 10:46:48 +00:00
|
|
|
|
2022-06-05 20:54:59 +00:00
|
|
|
nsresult SerializeFromJSVal(JSContext* aCx, JS::Handle<JS::Value> aValue,
|
2017-07-26 08:07:07 +00:00
|
|
|
nsAString& aSerializedValue);
|
2018-11-30 10:46:48 +00:00
|
|
|
|
2017-06-23 09:15:51 +00:00
|
|
|
nsresult DeserializeToJSObject(const nsAString& aSerializedObject,
|
2022-06-05 20:54:59 +00:00
|
|
|
JSContext* aCx,
|
|
|
|
JS::MutableHandle<JSObject*> aObject);
|
2018-11-30 10:46:48 +00:00
|
|
|
|
2017-07-26 08:07:07 +00:00
|
|
|
nsresult DeserializeToJSValue(const nsAString& aSerializedObject,
|
2022-06-05 20:54:59 +00:00
|
|
|
JSContext* aCx,
|
|
|
|
JS::MutableHandle<JS::Value> aValue);
|
2018-11-30 10:46:48 +00:00
|
|
|
|
2022-05-09 20:41:12 +00:00
|
|
|
} // namespace mozilla::dom
|
2017-05-25 17:50:32 +00:00
|
|
|
|
|
|
|
#endif
|