2015-05-03 22:32:37 +03: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: */
|
2012-05-23 20:44:48 +04: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 TestBindingHeader_h
|
|
|
|
#define TestBindingHeader_h
|
|
|
|
|
2012-05-23 20:44:48 +04:00
|
|
|
#include "mozilla/dom/BindingUtils.h"
|
2013-08-22 10:30:38 +04:00
|
|
|
#include "mozilla/dom/Date.h"
|
2014-05-24 01:32:38 +04:00
|
|
|
#include "mozilla/dom/MozMap.h"
|
2012-05-30 07:45:18 +04:00
|
|
|
#include "mozilla/dom/TypedArray.h"
|
2013-08-22 10:30:38 +04:00
|
|
|
#include "mozilla/ErrorResult.h"
|
|
|
|
#include "nsCOMPtr.h"
|
2013-11-05 18:16:24 +04:00
|
|
|
#include "nsGenericHTMLElement.h"
|
2013-08-22 10:30:38 +04:00
|
|
|
#include "nsWrapperCache.h"
|
2013-04-25 19:42:43 +04:00
|
|
|
|
|
|
|
// Forward declare this before we include TestCodeGenBinding.h, because that header relies on including
|
|
|
|
// this one for it, for ParentDict. Hopefully it won't begin to rely on it in more fundamental ways.
|
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
class TestExternalInterface;
|
2015-07-31 20:30:55 +03:00
|
|
|
class Promise;
|
2013-04-25 19:42:43 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
// We don't export TestCodeGenBinding.h, but it's right in our parent dir.
|
|
|
|
#include "../TestCodeGenBinding.h"
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2013-02-19 20:54:41 +04:00
|
|
|
extern bool TestFuncControlledMember(JSContext*, JSObject*);
|
|
|
|
|
2012-05-23 20:44:48 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2012-10-25 00:10:49 +04:00
|
|
|
// IID for nsRenamedInterface
|
|
|
|
#define NS_RENAMED_INTERFACE_IID \
|
|
|
|
{ 0xd4b19ef3, 0xe68b, 0x4e3f, \
|
|
|
|
{ 0x94, 0xbc, 0xc9, 0xde, 0x3a, 0x69, 0xb0, 0xe8 } }
|
|
|
|
|
|
|
|
class nsRenamedInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_RENAMED_INTERFACE_IID)
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
};
|
|
|
|
|
2014-03-28 12:45:02 +04:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(nsRenamedInterface, NS_RENAMED_INTERFACE_IID)
|
|
|
|
|
2012-07-19 22:48:58 +04:00
|
|
|
// IID for the IndirectlyImplementedInterface
|
|
|
|
#define NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID \
|
|
|
|
{ 0xfed55b69, 0x7012, 0x4849, \
|
|
|
|
{ 0xaf, 0x56, 0x4b, 0xa9, 0xee, 0x41, 0x30, 0x89 } }
|
|
|
|
|
|
|
|
class IndirectlyImplementedInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID)
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-11 23:08:24 +04:00
|
|
|
bool IndirectlyImplementedProperty();
|
|
|
|
void IndirectlyImplementedProperty(bool);
|
2012-09-05 17:21:33 +04:00
|
|
|
void IndirectlyImplementedMethod();
|
2012-07-19 22:48:58 +04:00
|
|
|
};
|
|
|
|
|
2014-03-28 12:45:02 +04:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(IndirectlyImplementedInterface, NS_INDIRECTLY_IMPLEMENTED_INTERFACE_IID)
|
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
// IID for the TestExternalInterface
|
|
|
|
#define NS_TEST_EXTERNAL_INTERFACE_IID \
|
|
|
|
{ 0xd5ba0c99, 0x9b1d, 0x4e71, \
|
|
|
|
{ 0x8a, 0x94, 0x56, 0x38, 0x6c, 0xa3, 0xda, 0x3d } }
|
|
|
|
class TestExternalInterface : public nsISupports
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECLARE_STATIC_IID_ACCESSOR(NS_TEST_EXTERNAL_INTERFACE_IID)
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
};
|
|
|
|
|
2014-03-28 12:45:02 +04:00
|
|
|
NS_DEFINE_STATIC_IID_ACCESSOR(TestExternalInterface, NS_TEST_EXTERNAL_INTERFACE_IID)
|
|
|
|
|
2012-06-16 00:25:50 +04:00
|
|
|
class TestNonWrapperCacheInterface : public nsISupports
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
Bug 1117172 part 2. Change the non-wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, Codegen.py, and
StructuredClone.cpp. The rest of this diff was generated by running the following commands:
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/WrapObject\((JSContext *\* *(?:aCx|cx)),(\s*)(JS::MutableHandle<JSObject\*> aReflector)/WrapObject(\1,\2JS::Handle<JSObject*> aGivenProto,\2\3/g'
find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx)), this, aReflector/\1, this, aGivenProto, aReflector/'
2015-03-19 17:13:32 +03:00
|
|
|
bool WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto, JS::MutableHandle<JSObject*> aReflector);
|
2012-06-16 00:25:50 +04:00
|
|
|
};
|
|
|
|
|
2012-07-27 08:09:10 +04:00
|
|
|
class OnlyForUseInConstructor : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
};
|
|
|
|
|
2012-05-23 20:44:48 +04:00
|
|
|
class TestInterface : public nsISupports,
|
2012-05-30 07:45:18 +04:00
|
|
|
public nsWrapperCache
|
2012-05-23 20:44:48 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
2012-05-23 20:44:48 +04:00
|
|
|
// We need a GetParentObject to make binding codegen happy
|
2012-05-23 20:44:48 +04:00
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-05-23 20:44:48 +04:00
|
|
|
// And now our actual WebIDL API
|
2012-06-02 05:26:20 +04:00
|
|
|
// Constructors
|
|
|
|
static
|
2012-12-03 20:07:49 +04:00
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, ErrorResult&);
|
2012-06-02 05:26:20 +04:00
|
|
|
static
|
2012-12-03 20:07:49 +04:00
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, const nsAString&, ErrorResult&);
|
2012-06-02 05:26:20 +04:00
|
|
|
static
|
2012-12-03 20:07:49 +04:00
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, uint32_t, const Nullable<bool>&,
|
|
|
|
ErrorResult&);
|
2012-06-05 05:30:00 +04:00
|
|
|
static
|
2012-12-03 20:07:49 +04:00
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, TestInterface*, ErrorResult&);
|
2012-06-05 05:30:00 +04:00
|
|
|
static
|
2012-12-03 20:07:49 +04:00
|
|
|
already_AddRefed<TestInterface>
|
2013-01-08 22:05:36 +04:00
|
|
|
Constructor(const GlobalObject&, uint32_t, IndirectlyImplementedInterface&, ErrorResult&);
|
2013-05-18 00:52:32 +04:00
|
|
|
|
|
|
|
static
|
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, Date&, ErrorResult&);
|
2015-07-01 21:15:20 +03:00
|
|
|
static
|
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, const ArrayBuffer&, ErrorResult&);
|
|
|
|
static
|
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, const Uint8Array&, ErrorResult&);
|
2012-07-27 08:09:10 +04:00
|
|
|
/* static
|
2012-12-03 20:07:49 +04:00
|
|
|
already_AddRefed<TestInterface>
|
|
|
|
Constructor(const GlobalObject&, uint32_t, uint32_t,
|
|
|
|
const TestInterfaceOrOnlyForUseInConstructor&, ErrorResult&);
|
2012-07-27 08:09:10 +04:00
|
|
|
*/
|
2013-01-22 14:51:15 +04:00
|
|
|
|
|
|
|
static
|
|
|
|
already_AddRefed<TestInterface> Test(const GlobalObject&, ErrorResult&);
|
|
|
|
static
|
|
|
|
already_AddRefed<TestInterface> Test(const GlobalObject&, const nsAString&,
|
|
|
|
ErrorResult&);
|
2013-04-26 03:03:05 +04:00
|
|
|
static
|
2013-06-13 09:18:35 +04:00
|
|
|
already_AddRefed<TestInterface> Test(const GlobalObject&, const nsACString&,
|
|
|
|
ErrorResult&);
|
|
|
|
|
|
|
|
static
|
2013-04-26 03:03:05 +04:00
|
|
|
already_AddRefed<TestInterface> Test2(const GlobalObject&,
|
|
|
|
const DictForConstructor&,
|
2014-02-19 19:13:38 +04:00
|
|
|
JS::Handle<JS::Value>,
|
2013-05-16 20:36:55 +04:00
|
|
|
JS::Handle<JSObject*>,
|
|
|
|
JS::Handle<JSObject*>,
|
2013-04-26 03:03:05 +04:00
|
|
|
const Sequence<Dict>&,
|
2014-02-19 19:13:38 +04:00
|
|
|
JS::Handle<JS::Value>,
|
2013-05-16 20:36:56 +04:00
|
|
|
const Optional<JS::Handle<JSObject*> >&,
|
|
|
|
const Optional<JS::Handle<JSObject*> >&,
|
2013-04-26 03:03:05 +04:00
|
|
|
ErrorResult&);
|
2013-01-22 14:51:15 +04:00
|
|
|
|
2014-06-25 21:25:09 +04:00
|
|
|
static
|
|
|
|
already_AddRefed<TestInterface> Test3(const GlobalObject&,
|
|
|
|
const LongOrAnyMozMap&,
|
|
|
|
ErrorResult&);
|
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
// Integer types
|
2012-09-11 23:08:24 +04:00
|
|
|
int8_t ReadonlyByte();
|
|
|
|
int8_t WritableByte();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetWritableByte(int8_t);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassByte(int8_t);
|
|
|
|
int8_t ReceiveByte();
|
|
|
|
void PassOptionalByte(const Optional<int8_t>&);
|
2013-10-11 20:28:24 +04:00
|
|
|
void PassOptionalByteBeforeRequired(const Optional<int8_t>&, int8_t);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassOptionalByteWithDefault(int8_t);
|
2013-10-11 20:28:24 +04:00
|
|
|
void PassOptionalByteWithDefaultBeforeRequired(int8_t, int8_t);
|
2012-10-18 01:01:55 +04:00
|
|
|
void PassNullableByte(const Nullable<int8_t>&);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassOptionalNullableByte(const Optional< Nullable<int8_t> >&);
|
2012-12-12 02:50:56 +04:00
|
|
|
void PassVariadicByte(const Sequence<int8_t>&);
|
2013-12-04 17:02:17 +04:00
|
|
|
int8_t CachedByte();
|
2013-12-06 22:49:44 +04:00
|
|
|
int8_t CachedConstantByte();
|
2013-12-06 01:31:04 +04:00
|
|
|
int8_t CachedWritableByte();
|
|
|
|
void SetCachedWritableByte(int8_t);
|
2015-01-16 01:39:01 +03:00
|
|
|
int8_t SideEffectFreeByte();
|
|
|
|
int8_t SetSideEffectFreeByte(int8_t);
|
|
|
|
int8_t DomDependentByte();
|
|
|
|
int8_t SetDomDependentByte(int8_t);
|
|
|
|
int8_t ConstantByte();
|
2015-01-16 01:39:01 +03:00
|
|
|
int8_t DeviceStateDependentByte();
|
2015-01-16 01:39:01 +03:00
|
|
|
int8_t ReturnByteSideEffectFree();
|
|
|
|
int8_t ReturnDOMDependentByte();
|
|
|
|
int8_t ReturnConstantByte();
|
2015-01-16 01:39:01 +03:00
|
|
|
int8_t ReturnDeviceStateDependentByte();
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2014-08-21 03:32:19 +04:00
|
|
|
void UnsafePrerenderMethod();
|
|
|
|
int32_t UnsafePrerenderWritable();
|
|
|
|
void SetUnsafePrerenderWritable(int32_t);
|
|
|
|
int32_t UnsafePrerenderReadonly();
|
2012-09-11 23:08:24 +04:00
|
|
|
int16_t ReadonlyShort();
|
|
|
|
int16_t WritableShort();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetWritableShort(int16_t);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassShort(int16_t);
|
|
|
|
int16_t ReceiveShort();
|
|
|
|
void PassOptionalShort(const Optional<int16_t>&);
|
|
|
|
void PassOptionalShortWithDefault(int16_t);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2012-09-11 23:08:24 +04:00
|
|
|
int32_t ReadonlyLong();
|
|
|
|
int32_t WritableLong();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetWritableLong(int32_t);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassLong(int32_t);
|
|
|
|
int16_t ReceiveLong();
|
|
|
|
void PassOptionalLong(const Optional<int32_t>&);
|
|
|
|
void PassOptionalLongWithDefault(int32_t);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2012-09-11 23:08:24 +04:00
|
|
|
int64_t ReadonlyLongLong();
|
|
|
|
int64_t WritableLongLong();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetWritableLongLong(int64_t);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassLongLong(int64_t);
|
|
|
|
int64_t ReceiveLongLong();
|
|
|
|
void PassOptionalLongLong(const Optional<int64_t>&);
|
|
|
|
void PassOptionalLongLongWithDefault(int64_t);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2012-09-11 23:08:24 +04:00
|
|
|
uint8_t ReadonlyOctet();
|
|
|
|
uint8_t WritableOctet();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetWritableOctet(uint8_t);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassOctet(uint8_t);
|
|
|
|
uint8_t ReceiveOctet();
|
|
|
|
void PassOptionalOctet(const Optional<uint8_t>&);
|
|
|
|
void PassOptionalOctetWithDefault(uint8_t);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2012-09-11 23:08:24 +04:00
|
|
|
uint16_t ReadonlyUnsignedShort();
|
|
|
|
uint16_t WritableUnsignedShort();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetWritableUnsignedShort(uint16_t);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassUnsignedShort(uint16_t);
|
|
|
|
uint16_t ReceiveUnsignedShort();
|
|
|
|
void PassOptionalUnsignedShort(const Optional<uint16_t>&);
|
|
|
|
void PassOptionalUnsignedShortWithDefault(uint16_t);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2012-09-11 23:08:24 +04:00
|
|
|
uint32_t ReadonlyUnsignedLong();
|
|
|
|
uint32_t WritableUnsignedLong();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetWritableUnsignedLong(uint32_t);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassUnsignedLong(uint32_t);
|
|
|
|
uint32_t ReceiveUnsignedLong();
|
|
|
|
void PassOptionalUnsignedLong(const Optional<uint32_t>&);
|
|
|
|
void PassOptionalUnsignedLongWithDefault(uint32_t);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2012-09-11 23:08:24 +04:00
|
|
|
uint64_t ReadonlyUnsignedLongLong();
|
|
|
|
uint64_t WritableUnsignedLongLong();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetWritableUnsignedLongLong(uint64_t);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassUnsignedLongLong(uint64_t);
|
|
|
|
uint64_t ReceiveUnsignedLongLong();
|
|
|
|
void PassOptionalUnsignedLongLong(const Optional<uint64_t>&);
|
|
|
|
void PassOptionalUnsignedLongLongWithDefault(uint64_t);
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2012-11-28 00:32:05 +04:00
|
|
|
float WritableFloat() const;
|
|
|
|
void SetWritableFloat(float);
|
|
|
|
float WritableUnrestrictedFloat() const;
|
|
|
|
void SetWritableUnrestrictedFloat(float);
|
|
|
|
Nullable<float> GetWritableNullableFloat() const;
|
|
|
|
void SetWritableNullableFloat(Nullable<float>);
|
|
|
|
Nullable<float> GetWritableNullableUnrestrictedFloat() const;
|
|
|
|
void SetWritableNullableUnrestrictedFloat(Nullable<float>);
|
|
|
|
double WritableDouble() const;
|
|
|
|
void SetWritableDouble(double);
|
|
|
|
double WritableUnrestrictedDouble() const;
|
|
|
|
void SetWritableUnrestrictedDouble(double);
|
|
|
|
Nullable<double> GetWritableNullableDouble() const;
|
|
|
|
void SetWritableNullableDouble(Nullable<double>);
|
|
|
|
Nullable<double> GetWritableNullableUnrestrictedDouble() const;
|
|
|
|
void SetWritableNullableUnrestrictedDouble(Nullable<double>);
|
|
|
|
void PassFloat(float, float, Nullable<float>, Nullable<float>,
|
|
|
|
double, double, Nullable<double>, Nullable<double>,
|
|
|
|
const Sequence<float>&, const Sequence<float>&,
|
|
|
|
const Sequence<Nullable<float> >&,
|
|
|
|
const Sequence<Nullable<float> >&,
|
|
|
|
const Sequence<double>&, const Sequence<double>&,
|
|
|
|
const Sequence<Nullable<double> >&,
|
|
|
|
const Sequence<Nullable<double> >&);
|
|
|
|
void PassLenientFloat(float, float, Nullable<float>, Nullable<float>,
|
|
|
|
double, double, Nullable<double>, Nullable<double>,
|
|
|
|
const Sequence<float>&, const Sequence<float>&,
|
|
|
|
const Sequence<Nullable<float> >&,
|
|
|
|
const Sequence<Nullable<float> >&,
|
|
|
|
const Sequence<double>&, const Sequence<double>&,
|
|
|
|
const Sequence<Nullable<double> >&,
|
|
|
|
const Sequence<Nullable<double> >&);
|
|
|
|
float LenientFloatAttr() const;
|
|
|
|
void SetLenientFloatAttr(float);
|
|
|
|
double LenientDoubleAttr() const;
|
|
|
|
void SetLenientDoubleAttr(double);
|
|
|
|
|
2013-04-18 20:58:01 +04:00
|
|
|
void PassUnrestricted(float arg1,
|
|
|
|
float arg2,
|
|
|
|
float arg3,
|
|
|
|
float arg4,
|
|
|
|
double arg5,
|
|
|
|
double arg6,
|
|
|
|
double arg7,
|
|
|
|
double arg8);
|
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
// Interface types
|
2012-09-05 17:21:33 +04:00
|
|
|
already_AddRefed<TestInterface> ReceiveSelf();
|
|
|
|
already_AddRefed<TestInterface> ReceiveNullableSelf();
|
|
|
|
TestInterface* ReceiveWeakSelf();
|
|
|
|
TestInterface* ReceiveWeakNullableSelf();
|
|
|
|
void PassSelf(TestInterface&);
|
|
|
|
void PassNullableSelf(TestInterface*);
|
2012-09-11 23:08:24 +04:00
|
|
|
already_AddRefed<TestInterface> NonNullSelf();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetNonNullSelf(TestInterface&);
|
|
|
|
already_AddRefed<TestInterface> GetNullableSelf();
|
2014-02-07 06:08:29 +04:00
|
|
|
already_AddRefed<TestInterface> CachedSelf();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetNullableSelf(TestInterface*);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassOptionalSelf(const Optional<TestInterface*> &);
|
|
|
|
void PassOptionalNonNullSelf(const Optional<NonNull<TestInterface> >&);
|
|
|
|
void PassOptionalSelfWithDefault(TestInterface*);
|
|
|
|
|
|
|
|
already_AddRefed<TestNonWrapperCacheInterface> ReceiveNonWrapperCacheInterface();
|
|
|
|
already_AddRefed<TestNonWrapperCacheInterface> ReceiveNullableNonWrapperCacheInterface();
|
2015-10-18 08:24:48 +03:00
|
|
|
void ReceiveNonWrapperCacheInterfaceSequence(nsTArray<RefPtr<TestNonWrapperCacheInterface> >&);
|
|
|
|
void ReceiveNullableNonWrapperCacheInterfaceSequence(nsTArray<RefPtr<TestNonWrapperCacheInterface> >&);
|
|
|
|
void ReceiveNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<RefPtr<TestNonWrapperCacheInterface> > >&);
|
|
|
|
void ReceiveNullableNonWrapperCacheInterfaceNullableSequence(Nullable<nsTArray<RefPtr<TestNonWrapperCacheInterface> > >&);
|
2012-09-05 17:21:33 +04:00
|
|
|
|
2013-01-08 22:05:36 +04:00
|
|
|
already_AddRefed<IndirectlyImplementedInterface> ReceiveOther();
|
|
|
|
already_AddRefed<IndirectlyImplementedInterface> ReceiveNullableOther();
|
|
|
|
IndirectlyImplementedInterface* ReceiveWeakOther();
|
|
|
|
IndirectlyImplementedInterface* ReceiveWeakNullableOther();
|
|
|
|
void PassOther(IndirectlyImplementedInterface&);
|
|
|
|
void PassNullableOther(IndirectlyImplementedInterface*);
|
|
|
|
already_AddRefed<IndirectlyImplementedInterface> NonNullOther();
|
|
|
|
void SetNonNullOther(IndirectlyImplementedInterface&);
|
|
|
|
already_AddRefed<IndirectlyImplementedInterface> GetNullableOther();
|
|
|
|
void SetNullableOther(IndirectlyImplementedInterface*);
|
|
|
|
void PassOptionalOther(const Optional<IndirectlyImplementedInterface*>&);
|
|
|
|
void PassOptionalNonNullOther(const Optional<NonNull<IndirectlyImplementedInterface> >&);
|
|
|
|
void PassOptionalOtherWithDefault(IndirectlyImplementedInterface*);
|
2012-09-05 17:21:33 +04:00
|
|
|
|
|
|
|
already_AddRefed<TestExternalInterface> ReceiveExternal();
|
|
|
|
already_AddRefed<TestExternalInterface> ReceiveNullableExternal();
|
|
|
|
TestExternalInterface* ReceiveWeakExternal();
|
|
|
|
TestExternalInterface* ReceiveWeakNullableExternal();
|
|
|
|
void PassExternal(TestExternalInterface*);
|
|
|
|
void PassNullableExternal(TestExternalInterface*);
|
2012-09-11 23:08:24 +04:00
|
|
|
already_AddRefed<TestExternalInterface> NonNullExternal();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetNonNullExternal(TestExternalInterface*);
|
|
|
|
already_AddRefed<TestExternalInterface> GetNullableExternal();
|
|
|
|
void SetNullableExternal(TestExternalInterface*);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassOptionalExternal(const Optional<TestExternalInterface*>&);
|
|
|
|
void PassOptionalNonNullExternal(const Optional<TestExternalInterface*>&);
|
|
|
|
void PassOptionalExternalWithDefault(TestExternalInterface*);
|
|
|
|
|
2013-01-28 17:34:31 +04:00
|
|
|
already_AddRefed<TestCallbackInterface> ReceiveCallbackInterface();
|
|
|
|
already_AddRefed<TestCallbackInterface> ReceiveNullableCallbackInterface();
|
|
|
|
TestCallbackInterface* ReceiveWeakCallbackInterface();
|
|
|
|
TestCallbackInterface* ReceiveWeakNullableCallbackInterface();
|
|
|
|
void PassCallbackInterface(TestCallbackInterface&);
|
|
|
|
void PassNullableCallbackInterface(TestCallbackInterface*);
|
|
|
|
already_AddRefed<TestCallbackInterface> NonNullCallbackInterface();
|
|
|
|
void SetNonNullCallbackInterface(TestCallbackInterface&);
|
|
|
|
already_AddRefed<TestCallbackInterface> GetNullableCallbackInterface();
|
|
|
|
void SetNullableCallbackInterface(TestCallbackInterface*);
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassOptionalCallbackInterface(const Optional<RefPtr<TestCallbackInterface> >&);
|
2013-01-28 17:34:31 +04:00
|
|
|
void PassOptionalNonNullCallbackInterface(const Optional<OwningNonNull<TestCallbackInterface> >&);
|
|
|
|
void PassOptionalCallbackInterfaceWithDefault(TestCallbackInterface*);
|
2012-07-19 22:48:58 +04:00
|
|
|
|
2012-09-05 17:21:33 +04:00
|
|
|
already_AddRefed<IndirectlyImplementedInterface> ReceiveConsequentialInterface();
|
|
|
|
void PassConsequentialInterface(IndirectlyImplementedInterface&);
|
2012-07-19 22:48:58 +04:00
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
// Sequence types
|
2013-12-04 17:02:18 +04:00
|
|
|
void GetReadonlySequence(nsTArray<int32_t>&);
|
2013-12-05 20:39:50 +04:00
|
|
|
void GetReadonlySequenceOfDictionaries(JSContext*, nsTArray<Dict>&);
|
2013-12-06 01:07:33 +04:00
|
|
|
void GetReadonlyNullableSequenceOfDictionaries(JSContext*, Nullable<nsTArray<Dict> >&);
|
2013-12-16 22:06:35 +04:00
|
|
|
void GetReadonlyFrozenSequence(JSContext*, nsTArray<Dict>&);
|
|
|
|
void GetReadonlyFrozenNullableSequence(JSContext*, Nullable<nsTArray<Dict>>&);
|
2012-09-05 17:21:33 +04:00
|
|
|
void ReceiveSequence(nsTArray<int32_t>&);
|
|
|
|
void ReceiveNullableSequence(Nullable< nsTArray<int32_t> >&);
|
|
|
|
void ReceiveSequenceOfNullableInts(nsTArray< Nullable<int32_t> >&);
|
|
|
|
void ReceiveNullableSequenceOfNullableInts(Nullable< nsTArray< Nullable<int32_t> > >&);
|
|
|
|
void PassSequence(const Sequence<int32_t> &);
|
|
|
|
void PassNullableSequence(const Nullable< Sequence<int32_t> >&);
|
|
|
|
void PassSequenceOfNullableInts(const Sequence<Nullable<int32_t> >&);
|
|
|
|
void PassOptionalSequenceOfNullableInts(const Optional<Sequence<Nullable<int32_t> > > &);
|
|
|
|
void PassOptionalNullableSequenceOfNullableInts(const Optional<Nullable<Sequence<Nullable<int32_t> > > > &);
|
2015-10-18 08:24:48 +03:00
|
|
|
void ReceiveCastableObjectSequence(nsTArray< RefPtr<TestInterface> > &);
|
|
|
|
void ReceiveCallbackObjectSequence(nsTArray< RefPtr<TestCallbackInterface> > &);
|
|
|
|
void ReceiveNullableCastableObjectSequence(nsTArray< RefPtr<TestInterface> > &);
|
|
|
|
void ReceiveNullableCallbackObjectSequence(nsTArray< RefPtr<TestCallbackInterface> > &);
|
|
|
|
void ReceiveCastableObjectNullableSequence(Nullable< nsTArray< RefPtr<TestInterface> > >&);
|
|
|
|
void ReceiveNullableCastableObjectNullableSequence(Nullable< nsTArray< RefPtr<TestInterface> > >&);
|
|
|
|
void ReceiveWeakCastableObjectSequence(nsTArray<RefPtr<TestInterface>> &);
|
|
|
|
void ReceiveWeakNullableCastableObjectSequence(nsTArray<RefPtr<TestInterface>> &);
|
|
|
|
void ReceiveWeakCastableObjectNullableSequence(Nullable< nsTArray<RefPtr<TestInterface>> >&);
|
|
|
|
void ReceiveWeakNullableCastableObjectNullableSequence(Nullable< nsTArray<RefPtr<TestInterface>> >&);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassCastableObjectSequence(const Sequence< OwningNonNull<TestInterface> >&);
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassNullableCastableObjectSequence(const Sequence< RefPtr<TestInterface> > &);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassCastableObjectNullableSequence(const Nullable< Sequence< OwningNonNull<TestInterface> > >&);
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassNullableCastableObjectNullableSequence(const Nullable< Sequence< RefPtr<TestInterface> > >&);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassOptionalSequence(const Optional<Sequence<int32_t> >&);
|
2014-06-24 00:03:57 +04:00
|
|
|
void PassOptionalSequenceWithDefaultValue(const Sequence<int32_t> &);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassOptionalNullableSequence(const Optional<Nullable<Sequence<int32_t> > >&);
|
|
|
|
void PassOptionalNullableSequenceWithDefaultValue(const Nullable< Sequence<int32_t> >&);
|
2014-06-24 00:03:57 +04:00
|
|
|
void PassOptionalNullableSequenceWithDefaultValue2(const Nullable< Sequence<int32_t> >&);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassOptionalObjectSequence(const Optional<Sequence<OwningNonNull<TestInterface> > >&);
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassExternalInterfaceSequence(const Sequence<RefPtr<TestExternalInterface> >&);
|
|
|
|
void PassNullableExternalInterfaceSequence(const Sequence<RefPtr<TestExternalInterface> >&);
|
2012-09-05 17:21:33 +04:00
|
|
|
|
|
|
|
void ReceiveStringSequence(nsTArray<nsString>&);
|
|
|
|
void PassStringSequence(const Sequence<nsString>&);
|
2012-06-12 18:22:05 +04:00
|
|
|
|
2013-06-13 09:18:35 +04:00
|
|
|
void ReceiveByteStringSequence(nsTArray<nsCString>&);
|
|
|
|
void PassByteStringSequence(const Sequence<nsCString>&);
|
|
|
|
|
2012-06-13 19:15:05 +04:00
|
|
|
void ReceiveAnySequence(JSContext*, nsTArray<JS::Value>&);
|
2013-05-16 20:36:55 +04:00
|
|
|
void ReceiveNullableAnySequence(JSContext*, Nullable<nsTArray<JS::Value> >&);
|
|
|
|
void ReceiveAnySequenceSequence(JSContext*, nsTArray<nsTArray<JS::Value> >&);
|
|
|
|
|
|
|
|
void ReceiveObjectSequence(JSContext*, nsTArray<JSObject*>&);
|
|
|
|
void ReceiveNullableObjectSequence(JSContext*, nsTArray<JSObject*>&);
|
2012-06-13 19:15:05 +04:00
|
|
|
|
2013-03-02 10:07:43 +04:00
|
|
|
void PassSequenceOfSequences(const Sequence< Sequence<int32_t> >&);
|
2015-02-09 19:42:27 +03:00
|
|
|
void PassSequenceOfSequencesOfSequences(const Sequence<Sequence<Sequence<int32_t>>>&);
|
2013-04-03 04:20:38 +04:00
|
|
|
void ReceiveSequenceOfSequences(nsTArray< nsTArray<int32_t> >&);
|
2015-02-09 19:42:27 +03:00
|
|
|
void ReceiveSequenceOfSequencesOfSequences(nsTArray<nsTArray<nsTArray<int32_t>>>&);
|
2013-03-02 10:07:43 +04:00
|
|
|
|
2014-05-24 01:32:38 +04:00
|
|
|
// MozMap types
|
|
|
|
void PassMozMap(const MozMap<int32_t> &);
|
|
|
|
void PassNullableMozMap(const Nullable< MozMap<int32_t> >&);
|
|
|
|
void PassMozMapOfNullableInts(const MozMap<Nullable<int32_t> >&);
|
|
|
|
void PassOptionalMozMapOfNullableInts(const Optional<MozMap<Nullable<int32_t> > > &);
|
|
|
|
void PassOptionalNullableMozMapOfNullableInts(const Optional<Nullable<MozMap<Nullable<int32_t> > > > &);
|
|
|
|
void PassCastableObjectMozMap(const MozMap< OwningNonNull<TestInterface> >&);
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassNullableCastableObjectMozMap(const MozMap< RefPtr<TestInterface> > &);
|
2014-05-24 01:32:38 +04:00
|
|
|
void PassCastableObjectNullableMozMap(const Nullable< MozMap< OwningNonNull<TestInterface> > >&);
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassNullableCastableObjectNullableMozMap(const Nullable< MozMap< RefPtr<TestInterface> > >&);
|
2014-05-24 01:32:38 +04:00
|
|
|
void PassOptionalMozMap(const Optional<MozMap<int32_t> >&);
|
|
|
|
void PassOptionalNullableMozMap(const Optional<Nullable<MozMap<int32_t> > >&);
|
|
|
|
void PassOptionalNullableMozMapWithDefaultValue(const Nullable< MozMap<int32_t> >&);
|
|
|
|
void PassOptionalObjectMozMap(const Optional<MozMap<OwningNonNull<TestInterface> > >&);
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassExternalInterfaceMozMap(const MozMap<RefPtr<TestExternalInterface> >&);
|
|
|
|
void PassNullableExternalInterfaceMozMap(const MozMap<RefPtr<TestExternalInterface> >&);
|
2014-05-24 01:32:38 +04:00
|
|
|
void PassStringMozMap(const MozMap<nsString>&);
|
|
|
|
void PassByteStringMozMap(const MozMap<nsCString>&);
|
|
|
|
void PassMozMapOfMozMaps(const MozMap< MozMap<int32_t> >&);
|
2014-05-24 01:32:38 +04:00
|
|
|
void ReceiveMozMap(MozMap<int32_t>&);
|
|
|
|
void ReceiveNullableMozMap(Nullable<MozMap<int32_t>>&);
|
|
|
|
void ReceiveMozMapOfNullableInts(MozMap<Nullable<int32_t>>&);
|
|
|
|
void ReceiveNullableMozMapOfNullableInts(Nullable<MozMap<Nullable<int32_t>>>&);
|
|
|
|
void ReceiveMozMapOfMozMaps(MozMap<MozMap<int32_t>>&);
|
|
|
|
void ReceiveAnyMozMap(JSContext*, MozMap<JS::Value>&);
|
2014-05-24 01:32:38 +04:00
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
// Typed array types
|
2013-08-05 21:40:01 +04:00
|
|
|
void PassArrayBuffer(const ArrayBuffer&);
|
|
|
|
void PassNullableArrayBuffer(const Nullable<ArrayBuffer>&);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassOptionalArrayBuffer(const Optional<ArrayBuffer>&);
|
2013-08-05 21:40:01 +04:00
|
|
|
void PassOptionalNullableArrayBuffer(const Optional<Nullable<ArrayBuffer> >&);
|
|
|
|
void PassOptionalNullableArrayBufferWithDefaultValue(const Nullable<ArrayBuffer>&);
|
|
|
|
void PassArrayBufferView(const ArrayBufferView&);
|
|
|
|
void PassInt8Array(const Int8Array&);
|
|
|
|
void PassInt16Array(const Int16Array&);
|
|
|
|
void PassInt32Array(const Int32Array&);
|
|
|
|
void PassUint8Array(const Uint8Array&);
|
|
|
|
void PassUint16Array(const Uint16Array&);
|
|
|
|
void PassUint32Array(const Uint32Array&);
|
|
|
|
void PassUint8ClampedArray(const Uint8ClampedArray&);
|
|
|
|
void PassFloat32Array(const Float32Array&);
|
|
|
|
void PassFloat64Array(const Float64Array&);
|
2013-08-05 21:40:02 +04:00
|
|
|
void PassSequenceOfArrayBuffers(const Sequence<ArrayBuffer>&);
|
|
|
|
void PassSequenceOfNullableArrayBuffers(const Sequence<Nullable<ArrayBuffer> >&);
|
2014-05-24 01:32:38 +04:00
|
|
|
void PassMozMapOfArrayBuffers(const MozMap<ArrayBuffer>&);
|
|
|
|
void PassMozMapOfNullableArrayBuffers(const MozMap<Nullable<ArrayBuffer> >&);
|
2013-08-05 21:40:02 +04:00
|
|
|
void PassVariadicTypedArray(const Sequence<Float32Array>&);
|
|
|
|
void PassVariadicNullableTypedArray(const Sequence<Nullable<Float32Array> >&);
|
2014-06-12 00:26:52 +04:00
|
|
|
void ReceiveUint8Array(JSContext*, JS::MutableHandle<JSObject*>);
|
2014-08-25 23:07:45 +04:00
|
|
|
void SetUint8ArrayAttr(const Uint8Array&);
|
|
|
|
void GetUint8ArrayAttr(JSContext*, JS::MutableHandle<JSObject*>);
|
2012-05-30 07:45:18 +04:00
|
|
|
|
2013-06-13 09:18:35 +04:00
|
|
|
// DOMString types
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassString(const nsAString&);
|
|
|
|
void PassNullableString(const nsAString&);
|
|
|
|
void PassOptionalString(const Optional<nsAString>&);
|
|
|
|
void PassOptionalStringWithDefaultValue(const nsAString&);
|
|
|
|
void PassOptionalNullableString(const Optional<nsAString>&);
|
|
|
|
void PassOptionalNullableStringWithDefaultValue(const nsAString&);
|
2012-12-12 02:50:56 +04:00
|
|
|
void PassVariadicString(const Sequence<nsString>&);
|
2014-08-02 00:23:48 +04:00
|
|
|
void ReceiveString(DOMString&);
|
2012-05-30 07:45:18 +04:00
|
|
|
|
2013-06-13 09:18:35 +04:00
|
|
|
// ByteString types
|
|
|
|
void PassByteString(const nsCString&);
|
|
|
|
void PassNullableByteString(const nsCString&);
|
|
|
|
void PassOptionalByteString(const Optional<nsCString>&);
|
|
|
|
void PassOptionalNullableByteString(const Optional<nsCString>&);
|
|
|
|
void PassVariadicByteString(const Sequence<nsCString>&);
|
|
|
|
|
2014-11-20 14:58:00 +03:00
|
|
|
// USVString types
|
|
|
|
void PassUSVS(const nsAString&);
|
|
|
|
void PassNullableUSVS(const nsAString&);
|
|
|
|
void PassOptionalUSVS(const Optional<nsAString>&);
|
|
|
|
void PassOptionalUSVSWithDefaultValue(const nsAString&);
|
|
|
|
void PassOptionalNullableUSVS(const Optional<nsAString>&);
|
|
|
|
void PassOptionalNullableUSVSWithDefaultValue(const nsAString&);
|
|
|
|
void PassVariadicUSVS(const Sequence<nsString>&);
|
|
|
|
void ReceiveUSVS(DOMString&);
|
2014-08-02 00:23:48 +04:00
|
|
|
|
2012-10-18 01:01:55 +04:00
|
|
|
// Enumerated types
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassEnum(TestEnum);
|
2013-04-20 07:04:19 +04:00
|
|
|
void PassNullableEnum(const Nullable<TestEnum>&);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassOptionalEnum(const Optional<TestEnum>&);
|
|
|
|
void PassEnumWithDefault(TestEnum);
|
2013-04-20 07:04:19 +04:00
|
|
|
void PassOptionalNullableEnum(const Optional<Nullable<TestEnum> >&);
|
|
|
|
void PassOptionalNullableEnumWithDefaultValue(const Nullable<TestEnum>&);
|
|
|
|
void PassOptionalNullableEnumWithDefaultValue2(const Nullable<TestEnum>&);
|
2012-09-05 17:21:33 +04:00
|
|
|
TestEnum ReceiveEnum();
|
2013-04-20 07:04:19 +04:00
|
|
|
Nullable<TestEnum> ReceiveNullableEnum();
|
2012-09-11 23:08:24 +04:00
|
|
|
TestEnum EnumAttribute();
|
|
|
|
TestEnum ReadonlyEnumAttribute();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetEnumAttribute(TestEnum);
|
2012-05-30 07:45:18 +04:00
|
|
|
|
|
|
|
// Callback types
|
2012-11-09 19:43:58 +04:00
|
|
|
void PassCallback(TestCallback&);
|
|
|
|
void PassNullableCallback(TestCallback*);
|
|
|
|
void PassOptionalCallback(const Optional<OwningNonNull<TestCallback> >&);
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassOptionalNullableCallback(const Optional<RefPtr<TestCallback> >&);
|
2012-11-09 19:43:58 +04:00
|
|
|
void PassOptionalNullableCallbackWithDefaultValue(TestCallback*);
|
|
|
|
already_AddRefed<TestCallback> ReceiveCallback();
|
|
|
|
already_AddRefed<TestCallback> ReceiveNullableCallback();
|
|
|
|
void PassNullableTreatAsNullCallback(TestTreatAsNullCallback*);
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassOptionalNullableTreatAsNullCallback(const Optional<RefPtr<TestTreatAsNullCallback> >&);
|
2012-11-09 19:43:58 +04:00
|
|
|
void PassOptionalNullableTreatAsNullCallbackWithDefaultValue(TestTreatAsNullCallback*);
|
2013-01-03 07:03:25 +04:00
|
|
|
void SetTreatAsNullCallback(TestTreatAsNullCallback&);
|
|
|
|
already_AddRefed<TestTreatAsNullCallback> TreatAsNullCallback();
|
|
|
|
void SetNullableTreatAsNullCallback(TestTreatAsNullCallback*);
|
|
|
|
already_AddRefed<TestTreatAsNullCallback> GetNullableTreatAsNullCallback();
|
2012-05-30 07:45:18 +04:00
|
|
|
|
2016-05-19 20:48:11 +03:00
|
|
|
void ForceCallbackGeneration(TestIntegerReturn&,
|
|
|
|
TestNullableIntegerReturn&,
|
|
|
|
TestBooleanReturn&,
|
|
|
|
TestFloatReturn&,
|
|
|
|
TestStringReturn&,
|
|
|
|
TestEnumReturn&,
|
|
|
|
TestInterfaceReturn&,
|
|
|
|
TestNullableInterfaceReturn&,
|
|
|
|
TestExternalInterfaceReturn&,
|
|
|
|
TestNullableExternalInterfaceReturn&,
|
|
|
|
TestCallbackInterfaceReturn&,
|
|
|
|
TestNullableCallbackInterfaceReturn&,
|
|
|
|
TestCallbackReturn&,
|
|
|
|
TestNullableCallbackReturn&,
|
|
|
|
TestObjectReturn&,
|
|
|
|
TestNullableObjectReturn&,
|
|
|
|
TestTypedArrayReturn&,
|
|
|
|
TestNullableTypedArrayReturn&,
|
|
|
|
TestSequenceReturn&,
|
|
|
|
TestNullableSequenceReturn&,
|
|
|
|
TestIntegerArguments&,
|
|
|
|
TestInterfaceArguments&,
|
|
|
|
TestStringEnumArguments&,
|
|
|
|
TestObjectArguments&,
|
|
|
|
TestOptionalArguments&);
|
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
// Any types
|
2013-05-16 20:36:54 +04:00
|
|
|
void PassAny(JSContext*, JS::Handle<JS::Value>);
|
2013-05-16 20:36:55 +04:00
|
|
|
void PassVariadicAny(JSContext*, const Sequence<JS::Value>&);
|
2014-04-04 07:32:11 +04:00
|
|
|
void PassOptionalAny(JSContext*, JS::Handle<JS::Value>);
|
2013-05-16 20:36:54 +04:00
|
|
|
void PassAnyDefaultNull(JSContext*, JS::Handle<JS::Value>);
|
2013-05-16 20:36:55 +04:00
|
|
|
void PassSequenceOfAny(JSContext*, const Sequence<JS::Value>&);
|
|
|
|
void PassNullableSequenceOfAny(JSContext*, const Nullable<Sequence<JS::Value> >&);
|
|
|
|
void PassOptionalSequenceOfAny(JSContext*, const Optional<Sequence<JS::Value> >&);
|
|
|
|
void PassOptionalNullableSequenceOfAny(JSContext*, const Optional<Nullable<Sequence<JS::Value> > >&);
|
|
|
|
void PassOptionalSequenceOfAnyWithDefaultValue(JSContext*, const Nullable<Sequence<JS::Value> >&);
|
|
|
|
void PassSequenceOfSequenceOfAny(JSContext*, const Sequence<Sequence<JS::Value> >&);
|
|
|
|
void PassSequenceOfNullableSequenceOfAny(JSContext*, const Sequence<Nullable<Sequence<JS::Value> > >&);
|
|
|
|
void PassNullableSequenceOfNullableSequenceOfAny(JSContext*, const Nullable<Sequence<Nullable<Sequence<JS::Value> > > >&);
|
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfAny(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JS::Value> > > > >&);
|
2014-05-24 01:32:38 +04:00
|
|
|
void PassMozMapOfAny(JSContext*, const MozMap<JS::Value>&);
|
|
|
|
void PassNullableMozMapOfAny(JSContext*, const Nullable<MozMap<JS::Value> >&);
|
|
|
|
void PassOptionalMozMapOfAny(JSContext*, const Optional<MozMap<JS::Value> >&);
|
|
|
|
void PassOptionalNullableMozMapOfAny(JSContext*, const Optional<Nullable<MozMap<JS::Value> > >&);
|
|
|
|
void PassOptionalMozMapOfAnyWithDefaultValue(JSContext*, const Nullable<MozMap<JS::Value> >&);
|
|
|
|
void PassMozMapOfMozMapOfAny(JSContext*, const MozMap<MozMap<JS::Value> >&);
|
|
|
|
void PassMozMapOfNullableMozMapOfAny(JSContext*, const MozMap<Nullable<MozMap<JS::Value> > >&);
|
|
|
|
void PassNullableMozMapOfNullableMozMapOfAny(JSContext*, const Nullable<MozMap<Nullable<MozMap<JS::Value> > > >&);
|
|
|
|
void PassOptionalNullableMozMapOfNullableMozMapOfAny(JSContext*, const Optional<Nullable<MozMap<Nullable<MozMap<JS::Value>>>>>&);
|
|
|
|
void PassOptionalNullableMozMapOfNullableSequenceOfAny(JSContext*, const Optional<Nullable<MozMap<Nullable<Sequence<JS::Value>>>>>&);
|
|
|
|
void PassOptionalNullableSequenceOfNullableMozMapOfAny(JSContext*, const Optional<Nullable<Sequence<Nullable<MozMap<JS::Value>>>>>&);
|
2014-06-12 00:26:52 +04:00
|
|
|
void ReceiveAny(JSContext*, JS::MutableHandle<JS::Value>);
|
2012-05-30 07:45:18 +04:00
|
|
|
|
2012-05-19 01:25:47 +04:00
|
|
|
// object types
|
2013-05-16 20:36:55 +04:00
|
|
|
void PassObject(JSContext*, JS::Handle<JSObject*>);
|
2013-05-16 20:36:55 +04:00
|
|
|
void PassVariadicObject(JSContext*, const Sequence<JSObject*>&);
|
2013-05-16 20:36:55 +04:00
|
|
|
void PassNullableObject(JSContext*, JS::Handle<JSObject*>);
|
2013-05-16 20:36:55 +04:00
|
|
|
void PassVariadicNullableObject(JSContext*, const Sequence<JSObject*>&);
|
2013-05-16 20:36:56 +04:00
|
|
|
void PassOptionalObject(JSContext*, const Optional<JS::Handle<JSObject*> >&);
|
|
|
|
void PassOptionalNullableObject(JSContext*, const Optional<JS::Handle<JSObject*> >&);
|
2013-05-16 20:36:55 +04:00
|
|
|
void PassOptionalNullableObjectWithDefaultValue(JSContext*, JS::Handle<JSObject*>);
|
2013-05-16 20:36:55 +04:00
|
|
|
void PassSequenceOfObject(JSContext*, const Sequence<JSObject*>&);
|
|
|
|
void PassSequenceOfNullableObject(JSContext*, const Sequence<JSObject*>&);
|
2013-08-29 08:30:05 +04:00
|
|
|
void PassNullableSequenceOfObject(JSContext*, const Nullable<Sequence<JSObject*> >&);
|
2013-05-16 20:36:55 +04:00
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfObject(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&);
|
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(JSContext*, const Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&);
|
2014-05-24 01:32:38 +04:00
|
|
|
void PassMozMapOfObject(JSContext*, const MozMap<JSObject*>&);
|
2014-06-12 00:26:52 +04:00
|
|
|
void ReceiveObject(JSContext*, JS::MutableHandle<JSObject*>);
|
|
|
|
void ReceiveNullableObject(JSContext*, JS::MutableHandle<JSObject*>);
|
2012-05-30 07:45:18 +04:00
|
|
|
|
2012-05-19 01:25:47 +04:00
|
|
|
// Union types
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassUnion(JSContext*, const ObjectOrLong& arg);
|
2013-05-16 20:36:55 +04:00
|
|
|
void PassUnionWithNullable(JSContext* cx, const ObjectOrNullOrLong& arg)
|
2012-05-19 01:25:47 +04:00
|
|
|
{
|
2013-09-17 19:16:02 +04:00
|
|
|
OwningObjectOrLong returnValue;
|
2012-05-19 01:25:47 +04:00
|
|
|
if (arg.IsNull()) {
|
|
|
|
} else if (arg.IsObject()) {
|
2013-05-16 20:36:55 +04:00
|
|
|
JS::Rooted<JSObject*> obj(cx, arg.GetAsObject());
|
|
|
|
JS_GetClass(obj);
|
2013-09-17 19:16:02 +04:00
|
|
|
returnValue.SetAsObject() = obj;
|
2012-05-19 01:25:47 +04:00
|
|
|
} else {
|
|
|
|
int32_t i = arg.GetAsLong();
|
|
|
|
i += 1;
|
2013-09-17 19:16:02 +04:00
|
|
|
returnValue.SetAsLong() = i;
|
2012-05-19 01:25:47 +04:00
|
|
|
}
|
|
|
|
}
|
2013-09-26 08:05:00 +04:00
|
|
|
#ifdef DEBUG
|
|
|
|
void PassUnion2(const LongOrBoolean& arg);
|
|
|
|
void PassUnion3(JSContext*, const ObjectOrLongOrBoolean& arg);
|
|
|
|
void PassUnion4(const NodeOrLongOrBoolean& arg);
|
|
|
|
void PassUnion5(JSContext*, const ObjectOrBoolean& arg);
|
|
|
|
void PassUnion6(JSContext*, const ObjectOrString& arg);
|
|
|
|
void PassUnion7(JSContext*, const ObjectOrStringOrLong& arg);
|
|
|
|
void PassUnion8(JSContext*, const ObjectOrStringOrBoolean& arg);
|
|
|
|
void PassUnion9(JSContext*, const ObjectOrStringOrLongOrBoolean& arg);
|
2013-09-26 08:05:00 +04:00
|
|
|
void PassUnion10(const EventInitOrLong& arg);
|
|
|
|
void PassUnion11(JSContext*, const CustomEventInitOrLong& arg);
|
2013-10-28 08:33:15 +04:00
|
|
|
void PassUnion12(const EventInitOrLong& arg);
|
|
|
|
void PassUnion13(JSContext*, const ObjectOrLongOrNull& arg);
|
|
|
|
void PassUnion14(JSContext*, const ObjectOrLongOrNull& arg);
|
2014-06-24 00:03:57 +04:00
|
|
|
void PassUnion15(const LongSequenceOrLong&);
|
|
|
|
void PassUnion16(const Optional<LongSequenceOrLong>&);
|
|
|
|
void PassUnion17(const LongSequenceOrNullOrLong&);
|
|
|
|
void PassUnion18(JSContext*, const ObjectSequenceOrLong&);
|
|
|
|
void PassUnion19(JSContext*, const Optional<ObjectSequenceOrLong>&);
|
2014-06-24 00:03:58 +04:00
|
|
|
void PassUnion20(JSContext*, const ObjectSequenceOrLong&);
|
2014-06-24 00:03:58 +04:00
|
|
|
void PassUnion21(const LongMozMapOrLong&);
|
|
|
|
void PassUnion22(JSContext*, const ObjectMozMapOrLong&);
|
2014-09-08 19:28:57 +04:00
|
|
|
void PassUnion23(const ImageDataSequenceOrLong&);
|
|
|
|
void PassUnion24(const ImageDataOrNullSequenceOrLong&);
|
|
|
|
void PassUnion25(const ImageDataSequenceSequenceOrLong&);
|
|
|
|
void PassUnion26(const ImageDataOrNullSequenceSequenceOrLong&);
|
2014-09-24 17:11:30 +04:00
|
|
|
void PassUnion27(const StringSequenceOrEventInit&);
|
|
|
|
void PassUnion28(const EventInitOrStringSequence&);
|
2014-03-14 22:51:06 +04:00
|
|
|
void PassUnionWithCallback(const EventHandlerNonNullOrNullOrLong& arg);
|
2014-06-19 04:22:09 +04:00
|
|
|
void PassUnionWithByteString(const ByteStringOrLong&);
|
2014-06-25 21:25:09 +04:00
|
|
|
void PassUnionWithMozMap(const StringMozMapOrString&);
|
|
|
|
void PassUnionWithMozMapAndSequence(const StringMozMapOrStringSequence&);
|
|
|
|
void PassUnionWithSequenceAndMozMap(const StringSequenceOrStringMozMap&);
|
2014-11-20 14:58:00 +03:00
|
|
|
void PassUnionWithUSVS(const USVStringOrLong&);
|
2013-09-26 08:05:00 +04:00
|
|
|
#endif
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassNullableUnion(JSContext*, const Nullable<ObjectOrLong>&);
|
|
|
|
void PassOptionalUnion(JSContext*, const Optional<ObjectOrLong>&);
|
|
|
|
void PassOptionalNullableUnion(JSContext*, const Optional<Nullable<ObjectOrLong> >&);
|
|
|
|
void PassOptionalNullableUnionWithDefaultValue(JSContext*, const Nullable<ObjectOrLong>&);
|
|
|
|
//void PassUnionWithInterfaces(const TestInterfaceOrTestExternalInterface& arg);
|
|
|
|
//void PassUnionWithInterfacesAndNullable(const TestInterfaceOrNullOrTestExternalInterface& arg);
|
|
|
|
void PassUnionWithArrayBuffer(const ArrayBufferOrLong&);
|
|
|
|
void PassUnionWithString(JSContext*, const StringOrObject&);
|
|
|
|
//void PassUnionWithEnum(JSContext*, const TestEnumOrObject&);
|
2012-11-09 19:43:58 +04:00
|
|
|
//void PassUnionWithCallback(JSContext*, const TestCallbackOrLong&);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassUnionWithObject(JSContext*, const ObjectOrLong&);
|
2012-05-19 01:25:47 +04:00
|
|
|
|
2013-08-30 07:29:38 +04:00
|
|
|
void PassUnionWithDefaultValue1(const DoubleOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue2(const DoubleOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue3(const DoubleOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue4(const FloatOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue5(const FloatOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue6(const FloatOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue7(const UnrestrictedDoubleOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue8(const UnrestrictedDoubleOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue9(const UnrestrictedDoubleOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue10(const UnrestrictedDoubleOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue11(const UnrestrictedFloatOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue12(const UnrestrictedFloatOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue13(const UnrestrictedFloatOrString& arg);
|
|
|
|
void PassUnionWithDefaultValue14(const UnrestrictedFloatOrString& arg);
|
|
|
|
|
|
|
|
void PassNullableUnionWithDefaultValue1(const Nullable<DoubleOrString>& arg);
|
|
|
|
void PassNullableUnionWithDefaultValue2(const Nullable<DoubleOrString>& arg);
|
|
|
|
void PassNullableUnionWithDefaultValue3(const Nullable<DoubleOrString>& arg);
|
|
|
|
void PassNullableUnionWithDefaultValue4(const Nullable<FloatOrString>& arg);
|
|
|
|
void PassNullableUnionWithDefaultValue5(const Nullable<FloatOrString>& arg);
|
|
|
|
void PassNullableUnionWithDefaultValue6(const Nullable<FloatOrString>& arg);
|
|
|
|
void PassNullableUnionWithDefaultValue7(const Nullable<UnrestrictedDoubleOrString>& arg);
|
|
|
|
void PassNullableUnionWithDefaultValue8(const Nullable<UnrestrictedDoubleOrString>& arg);
|
|
|
|
void PassNullableUnionWithDefaultValue9(const Nullable<UnrestrictedDoubleOrString>& arg);
|
|
|
|
void PassNullableUnionWithDefaultValue10(const Nullable<UnrestrictedFloatOrString>& arg);
|
|
|
|
void PassNullableUnionWithDefaultValue11(const Nullable<UnrestrictedFloatOrString>& arg);
|
|
|
|
void PassNullableUnionWithDefaultValue12(const Nullable<UnrestrictedFloatOrString>& arg);
|
|
|
|
|
2013-12-13 01:11:56 +04:00
|
|
|
void PassSequenceOfUnions(const Sequence<OwningCanvasPatternOrCanvasGradient>&);
|
2014-03-14 22:51:22 +04:00
|
|
|
void PassSequenceOfUnions2(JSContext*, const Sequence<OwningObjectOrLong>&);
|
2013-12-13 01:11:56 +04:00
|
|
|
void PassVariadicUnion(const Sequence<OwningCanvasPatternOrCanvasGradient>&);
|
|
|
|
|
2013-12-18 20:20:43 +04:00
|
|
|
void PassSequenceOfNullableUnions(const Sequence<Nullable<OwningCanvasPatternOrCanvasGradient>>&);
|
|
|
|
void PassVariadicNullableUnion(const Sequence<Nullable<OwningCanvasPatternOrCanvasGradient>>&);
|
2014-05-24 01:32:38 +04:00
|
|
|
void PassMozMapOfUnions(const MozMap<OwningCanvasPatternOrCanvasGradient>&);
|
|
|
|
void PassMozMapOfUnions2(JSContext*, const MozMap<OwningObjectOrLong>&);
|
2013-12-18 20:20:43 +04:00
|
|
|
|
2013-09-17 19:16:02 +04:00
|
|
|
void ReceiveUnion(OwningCanvasPatternOrCanvasGradient&);
|
|
|
|
void ReceiveUnion2(JSContext*, OwningObjectOrLong&);
|
|
|
|
void ReceiveUnionContainingNull(OwningCanvasPatternOrNullOrCanvasGradient&);
|
|
|
|
void ReceiveNullableUnion(Nullable<OwningCanvasPatternOrCanvasGradient>&);
|
|
|
|
void ReceiveNullableUnion2(JSContext*, Nullable<OwningObjectOrLong>&);
|
|
|
|
void GetWritableUnion(OwningCanvasPatternOrCanvasGradient&);
|
2013-07-26 22:25:54 +04:00
|
|
|
void SetWritableUnion(const CanvasPatternOrCanvasGradient&);
|
2013-09-17 19:16:02 +04:00
|
|
|
void GetWritableUnionContainingNull(OwningCanvasPatternOrNullOrCanvasGradient&);
|
2013-07-26 22:25:54 +04:00
|
|
|
void SetWritableUnionContainingNull(const CanvasPatternOrNullOrCanvasGradient&);
|
2013-09-17 19:16:02 +04:00
|
|
|
void GetWritableNullableUnion(Nullable<OwningCanvasPatternOrCanvasGradient>&);
|
2013-07-26 22:25:54 +04:00
|
|
|
void SetWritableNullableUnion(const Nullable<CanvasPatternOrCanvasGradient>&);
|
|
|
|
|
2013-05-02 22:38:20 +04:00
|
|
|
// Date types
|
|
|
|
void PassDate(Date);
|
|
|
|
void PassNullableDate(const Nullable<Date>&);
|
|
|
|
void PassOptionalDate(const Optional<Date>&);
|
|
|
|
void PassOptionalNullableDate(const Optional<Nullable<Date> >&);
|
|
|
|
void PassOptionalNullableDateWithDefaultValue(const Nullable<Date>&);
|
|
|
|
void PassDateSequence(const Sequence<Date>&);
|
2014-05-24 01:32:38 +04:00
|
|
|
void PassDateMozMap(const MozMap<Date>&);
|
2013-05-02 22:38:20 +04:00
|
|
|
void PassNullableDateSequence(const Sequence<Nullable<Date> >&);
|
|
|
|
Date ReceiveDate();
|
|
|
|
Nullable<Date> ReceiveNullableDate();
|
|
|
|
|
2015-07-31 20:30:55 +03:00
|
|
|
// Promise types
|
|
|
|
void PassPromise(Promise&);
|
|
|
|
void PassNullablePromise(Promise*);
|
|
|
|
void PassOptionalPromise(const Optional<OwningNonNull<Promise>>&);
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassOptionalNullablePromise(const Optional<RefPtr<Promise>>&);
|
2015-07-31 20:30:55 +03:00
|
|
|
void PassOptionalNullablePromiseWithDefaultValue(Promise*);
|
|
|
|
void PassPromiseSequence(const Sequence<OwningNonNull<Promise>>&);
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassPromiseMozMap(const MozMap<RefPtr<Promise>>&);
|
|
|
|
void PassNullablePromiseSequence(const Sequence<RefPtr<Promise>> &);
|
2015-07-31 20:30:55 +03:00
|
|
|
Promise* ReceivePromise();
|
|
|
|
already_AddRefed<Promise> ReceiveAddrefedPromise();
|
|
|
|
|
2012-05-19 01:25:47 +04:00
|
|
|
// binaryNames tests
|
2012-09-05 17:21:33 +04:00
|
|
|
void MethodRenamedTo();
|
2014-09-20 06:58:26 +04:00
|
|
|
void OtherMethodRenamedTo();
|
2012-09-05 17:21:33 +04:00
|
|
|
void MethodRenamedTo(int8_t);
|
2012-09-11 23:08:24 +04:00
|
|
|
int8_t AttributeGetterRenamedTo();
|
|
|
|
int8_t AttributeRenamedTo();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetAttributeRenamedTo(int8_t);
|
2014-09-20 06:58:26 +04:00
|
|
|
int8_t OtherAttributeRenamedTo();
|
|
|
|
void SetOtherAttributeRenamedTo(int8_t);
|
2012-05-19 01:25:47 +04:00
|
|
|
|
2012-06-12 18:22:05 +04:00
|
|
|
// Dictionary tests
|
2013-04-18 00:40:54 +04:00
|
|
|
void PassDictionary(JSContext*, const Dict&);
|
2015-04-17 19:13:25 +03:00
|
|
|
void PassDictionary2(JSContext*, const Dict&);
|
2014-02-05 22:38:16 +04:00
|
|
|
void GetReadonlyDictionary(JSContext*, Dict&);
|
|
|
|
void GetReadonlyNullableDictionary(JSContext*, Nullable<Dict>&);
|
|
|
|
void GetWritableDictionary(JSContext*, Dict&);
|
|
|
|
void SetWritableDictionary(JSContext*, const Dict&);
|
|
|
|
void GetReadonlyFrozenDictionary(JSContext*, Dict&);
|
|
|
|
void GetReadonlyFrozenNullableDictionary(JSContext*, Nullable<Dict>&);
|
|
|
|
void GetWritableFrozenDictionary(JSContext*, Dict&);
|
|
|
|
void SetWritableFrozenDictionary(JSContext*, const Dict&);
|
2013-04-18 00:40:54 +04:00
|
|
|
void ReceiveDictionary(JSContext*, Dict&);
|
2013-10-09 20:05:22 +04:00
|
|
|
void ReceiveNullableDictionary(JSContext*, Nullable<Dict>&);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassOtherDictionary(const GrandparentDict&);
|
2013-04-18 00:40:54 +04:00
|
|
|
void PassSequenceOfDictionaries(JSContext*, const Sequence<Dict>&);
|
2014-05-24 01:32:38 +04:00
|
|
|
void PassMozMapOfDictionaries(const MozMap<GrandparentDict>&);
|
2013-04-18 00:40:54 +04:00
|
|
|
void PassDictionaryOrLong(JSContext*, const Dict&);
|
2012-09-05 17:21:33 +04:00
|
|
|
void PassDictionaryOrLong(int32_t);
|
2013-04-18 00:40:54 +04:00
|
|
|
void PassDictContainingDict(JSContext*, const DictContainingDict&);
|
2013-05-16 20:36:55 +04:00
|
|
|
void PassDictContainingSequence(JSContext*, const DictContainingSequence&);
|
|
|
|
void ReceiveDictContainingSequence(JSContext*, DictContainingSequence&);
|
2014-09-19 08:02:33 +04:00
|
|
|
void PassVariadicDictionary(JSContext*, const Sequence<Dict>&);
|
2012-06-12 18:22:05 +04:00
|
|
|
|
2012-09-06 18:23:51 +04:00
|
|
|
// Typedefs
|
|
|
|
void ExerciseTypedefInterfaces1(TestInterface&);
|
|
|
|
already_AddRefed<TestInterface> ExerciseTypedefInterfaces2(TestInterface*);
|
|
|
|
void ExerciseTypedefInterfaces3(TestInterface&);
|
|
|
|
|
2015-04-14 18:03:49 +03:00
|
|
|
// Deprecated methods and attributes
|
|
|
|
int8_t DeprecatedAttribute();
|
|
|
|
int8_t SetDeprecatedAttribute(int8_t);
|
|
|
|
int8_t DeprecatedMethod();
|
|
|
|
int8_t DeprecatedMethodWithContext(JSContext*, JS::Value);
|
|
|
|
|
2012-10-19 11:34:28 +04:00
|
|
|
// Static methods and attributes
|
2012-12-03 20:07:49 +04:00
|
|
|
static void StaticMethod(const GlobalObject&, bool);
|
2014-06-16 20:52:00 +04:00
|
|
|
static void StaticMethodWithContext(const GlobalObject&, JS::Value);
|
2012-12-03 20:07:49 +04:00
|
|
|
static bool StaticAttribute(const GlobalObject&);
|
|
|
|
static void SetStaticAttribute(const GlobalObject&, bool);
|
2016-06-04 10:31:44 +03:00
|
|
|
static void Assert(const GlobalObject&, bool);
|
2012-10-19 11:34:28 +04:00
|
|
|
|
2015-04-14 18:03:49 +03:00
|
|
|
// Deprecated static methods and attributes
|
|
|
|
static int8_t StaticDeprecatedAttribute(const GlobalObject&);
|
|
|
|
static int8_t SetStaticDeprecatedAttribute(const GlobalObject&, int8_t);
|
|
|
|
static int8_t StaticDeprecatedMethod(const GlobalObject&);
|
|
|
|
static int8_t StaticDeprecatedMethodWithContext(const GlobalObject&, JS::Value);
|
|
|
|
|
2012-12-12 02:50:56 +04:00
|
|
|
// Overload resolution tests
|
|
|
|
bool Overload1(TestInterface&);
|
|
|
|
TestInterface* Overload1(const nsAString&, TestInterface&);
|
2013-01-03 23:03:11 +04:00
|
|
|
void Overload2(TestInterface&);
|
2013-04-18 00:40:54 +04:00
|
|
|
void Overload2(JSContext*, const Dict&);
|
2013-07-30 21:39:34 +04:00
|
|
|
void Overload2(bool);
|
2013-01-03 23:03:00 +04:00
|
|
|
void Overload2(const nsAString&);
|
2013-05-02 22:38:20 +04:00
|
|
|
void Overload2(Date);
|
2013-01-03 23:03:11 +04:00
|
|
|
void Overload3(TestInterface&);
|
|
|
|
void Overload3(const TestCallback&);
|
2013-07-30 21:39:34 +04:00
|
|
|
void Overload3(bool);
|
2013-01-03 23:03:11 +04:00
|
|
|
void Overload4(TestInterface&);
|
|
|
|
void Overload4(TestCallbackInterface&);
|
|
|
|
void Overload4(const nsAString&);
|
2013-07-30 21:39:34 +04:00
|
|
|
void Overload5(int32_t);
|
|
|
|
void Overload5(TestEnum);
|
|
|
|
void Overload6(int32_t);
|
|
|
|
void Overload6(bool);
|
|
|
|
void Overload7(int32_t);
|
|
|
|
void Overload7(bool);
|
|
|
|
void Overload7(const nsCString&);
|
|
|
|
void Overload8(int32_t);
|
|
|
|
void Overload8(TestInterface&);
|
2013-10-11 20:28:23 +04:00
|
|
|
void Overload9(const Nullable<int32_t>&);
|
|
|
|
void Overload9(const nsAString&);
|
|
|
|
void Overload10(const Nullable<int32_t>&);
|
|
|
|
void Overload10(JSContext*, JS::Handle<JSObject*>);
|
|
|
|
void Overload11(int32_t);
|
|
|
|
void Overload11(const nsAString&);
|
|
|
|
void Overload12(int32_t);
|
|
|
|
void Overload12(const Nullable<bool>&);
|
|
|
|
void Overload13(const Nullable<int32_t>&);
|
|
|
|
void Overload13(bool);
|
2013-10-11 20:28:24 +04:00
|
|
|
void Overload14(const Optional<int32_t>&);
|
|
|
|
void Overload14(TestInterface&);
|
|
|
|
void Overload15(int32_t);
|
|
|
|
void Overload15(const Optional<NonNull<TestInterface> >&);
|
|
|
|
void Overload16(int32_t);
|
|
|
|
void Overload16(const Optional<TestInterface*>&);
|
2014-06-25 21:25:09 +04:00
|
|
|
void Overload17(const Sequence<int32_t>&);
|
|
|
|
void Overload17(const MozMap<int32_t>&);
|
|
|
|
void Overload18(const MozMap<nsString>&);
|
|
|
|
void Overload18(const Sequence<nsString>&);
|
2014-09-24 17:11:30 +04:00
|
|
|
void Overload19(const Sequence<int32_t>&);
|
|
|
|
void Overload19(JSContext*, const Dict&);
|
|
|
|
void Overload20(JSContext*, const Dict&);
|
|
|
|
void Overload20(const Sequence<int32_t>&);
|
|
|
|
|
2012-12-12 02:50:56 +04:00
|
|
|
// Variadic handling
|
|
|
|
void PassVariadicThirdArg(const nsAString&, int32_t,
|
|
|
|
const Sequence<OwningNonNull<TestInterface> >&);
|
|
|
|
|
2013-02-19 20:54:41 +04:00
|
|
|
// Conditionally exposed methods/attributes
|
|
|
|
bool Prefable1();
|
|
|
|
bool Prefable2();
|
|
|
|
bool Prefable3();
|
|
|
|
bool Prefable4();
|
|
|
|
bool Prefable5();
|
|
|
|
bool Prefable6();
|
|
|
|
bool Prefable7();
|
|
|
|
bool Prefable8();
|
|
|
|
bool Prefable9();
|
|
|
|
void Prefable10();
|
|
|
|
void Prefable11();
|
|
|
|
bool Prefable12();
|
|
|
|
void Prefable13();
|
|
|
|
bool Prefable14();
|
|
|
|
bool Prefable15();
|
|
|
|
bool Prefable16();
|
|
|
|
void Prefable17();
|
|
|
|
void Prefable18();
|
|
|
|
void Prefable19();
|
2014-02-05 22:38:17 +04:00
|
|
|
void Prefable20();
|
|
|
|
void Prefable21();
|
|
|
|
void Prefable22();
|
|
|
|
void Prefable23();
|
|
|
|
void Prefable24();
|
2013-02-19 20:54:41 +04:00
|
|
|
|
2016-05-16 12:04:38 +03:00
|
|
|
// Conditionally exposed methods/attributes involving [SecureContext]
|
|
|
|
bool ConditionalOnSecureContext1();
|
|
|
|
bool ConditionalOnSecureContext2();
|
|
|
|
bool ConditionalOnSecureContext3();
|
|
|
|
bool ConditionalOnSecureContext4();
|
|
|
|
void ConditionalOnSecureContext5();
|
|
|
|
void ConditionalOnSecureContext6();
|
|
|
|
void ConditionalOnSecureContext7();
|
|
|
|
void ConditionalOnSecureContext8();
|
|
|
|
|
2012-09-12 20:24:58 +04:00
|
|
|
// Miscellania
|
|
|
|
int32_t AttrWithLenientThis();
|
|
|
|
void SetAttrWithLenientThis(int32_t);
|
2012-10-25 00:10:49 +04:00
|
|
|
uint32_t UnforgeableAttr();
|
|
|
|
uint32_t UnforgeableAttr2();
|
2014-07-04 17:02:10 +04:00
|
|
|
uint32_t UnforgeableMethod();
|
|
|
|
uint32_t UnforgeableMethod2();
|
2012-11-05 23:40:32 +04:00
|
|
|
void Stringify(nsString&);
|
2012-10-25 00:10:49 +04:00
|
|
|
void PassRenamedInterface(nsRenamedInterface&);
|
2012-08-13 16:20:49 +04:00
|
|
|
TestInterface* PutForwardsAttr();
|
|
|
|
TestInterface* PutForwardsAttr2();
|
|
|
|
TestInterface* PutForwardsAttr3();
|
2014-06-12 00:26:52 +04:00
|
|
|
void GetJsonifierShouldSkipThis(JSContext*, JS::MutableHandle<JS::Value>);
|
2013-07-30 18:04:04 +04:00
|
|
|
void SetJsonifierShouldSkipThis(JSContext*, JS::Rooted<JS::Value>&);
|
|
|
|
TestParentInterface* JsonifierShouldSkipThis2();
|
|
|
|
void SetJsonifierShouldSkipThis2(TestParentInterface&);
|
|
|
|
TestCallbackInterface* JsonifierShouldSkipThis3();
|
|
|
|
void SetJsonifierShouldSkipThis3(TestCallbackInterface&);
|
2012-11-09 20:24:32 +04:00
|
|
|
void ThrowingMethod(ErrorResult& aRv);
|
|
|
|
bool GetThrowingAttr(ErrorResult& aRv) const;
|
|
|
|
void SetThrowingAttr(bool arg, ErrorResult& aRv);
|
|
|
|
bool GetThrowingGetterAttr(ErrorResult& aRv) const;
|
|
|
|
void SetThrowingGetterAttr(bool arg);
|
|
|
|
bool ThrowingSetterAttr() const;
|
|
|
|
void SetThrowingSetterAttr(bool arg, ErrorResult& aRv);
|
2013-03-04 23:08:24 +04:00
|
|
|
int16_t LegacyCall(JS::Value, uint32_t, TestInterface&);
|
2013-06-26 18:59:46 +04:00
|
|
|
void PassArgsWithDefaults(JSContext*, const Optional<int32_t>&,
|
|
|
|
TestInterface*, const Dict&, double,
|
|
|
|
const Optional<float>&);
|
2012-09-12 20:24:58 +04:00
|
|
|
|
2014-09-20 06:58:27 +04:00
|
|
|
void SetDashed_attribute(int8_t);
|
|
|
|
int8_t Dashed_attribute();
|
|
|
|
void Dashed_method();
|
|
|
|
|
2012-06-12 02:21:35 +04:00
|
|
|
// Methods and properties imported via "implements"
|
2012-09-11 23:08:24 +04:00
|
|
|
bool ImplementedProperty();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetImplementedProperty(bool);
|
2012-09-05 17:21:33 +04:00
|
|
|
void ImplementedMethod();
|
2012-09-11 23:08:24 +04:00
|
|
|
bool ImplementedParentProperty();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetImplementedParentProperty(bool);
|
2012-09-05 17:21:33 +04:00
|
|
|
void ImplementedParentMethod();
|
2012-09-11 23:08:24 +04:00
|
|
|
bool IndirectlyImplementedProperty();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetIndirectlyImplementedProperty(bool);
|
2012-09-05 17:21:33 +04:00
|
|
|
void IndirectlyImplementedMethod();
|
2012-09-11 23:08:24 +04:00
|
|
|
uint32_t DiamondImplementedProperty();
|
2012-09-06 11:25:03 +04:00
|
|
|
|
|
|
|
// Test EnforceRange/Clamp
|
|
|
|
void DontEnforceRangeOrClamp(int8_t);
|
|
|
|
void DoEnforceRange(int8_t);
|
|
|
|
void DoClamp(int8_t);
|
2013-09-10 06:10:45 +04:00
|
|
|
void SetEnforcedByte(int8_t);
|
|
|
|
int8_t EnforcedByte();
|
|
|
|
void SetClampedByte(int8_t);
|
|
|
|
int8_t ClampedByte();
|
2012-06-12 02:21:35 +04:00
|
|
|
|
2012-05-23 20:44:48 +04:00
|
|
|
private:
|
2012-05-23 20:44:48 +04:00
|
|
|
// We add signatures here that _could_ start matching if the codegen
|
|
|
|
// got data types wrong. That way if it ever does we'll have a call
|
|
|
|
// to these private deleted methods and compilation will fail.
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetReadonlyByte(int8_t) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetWritableByte(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassByte(T) = delete;
|
|
|
|
void PassNullableByte(Nullable<int8_t>&) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalByte(const Optional<T>&) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalByteWithDefault(T) = delete;
|
|
|
|
void PassVariadicByte(Sequence<int8_t>&) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetReadonlyShort(int16_t) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetWritableShort(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassShort(T) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalShort(const Optional<T>&) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalShortWithDefault(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetReadonlyLong(int32_t) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetWritableLong(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassLong(T) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalLong(const Optional<T>&) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalLongWithDefault(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetReadonlyLongLong(int64_t) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetWritableLongLong(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassLongLong(T) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalLongLong(const Optional<T>&) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalLongLongWithDefault(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetReadonlyOctet(uint8_t) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetWritableOctet(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOctet(T) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalOctet(const Optional<T>&) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalOctetWithDefault(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetReadonlyUnsignedShort(uint16_t) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetWritableUnsignedShort(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassUnsignedShort(T) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalUnsignedShort(const Optional<T>&) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalUnsignedShortWithDefault(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetReadonlyUnsignedLong(uint32_t) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetWritableUnsignedLong(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassUnsignedLong(T) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalUnsignedLong(const Optional<T>&) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalUnsignedLongWithDefault(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetReadonlyUnsignedLongLong(uint64_t) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void SetWritableUnsignedLongLong(T) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassUnsignedLongLong(T) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalUnsignedLongLong(const Optional<T>&) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
template<typename T>
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalUnsignedLongLongWithDefault(T) = delete;
|
2012-05-25 09:08:26 +04:00
|
|
|
|
2012-05-30 07:45:18 +04:00
|
|
|
// Enforce that only const things are passed for sequences
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassSequence(Sequence<int32_t> &) = delete;
|
|
|
|
void PassNullableSequence(Nullable< Sequence<int32_t> >&) = delete;
|
|
|
|
void PassOptionalNullableSequenceWithDefaultValue(Nullable< Sequence<int32_t> >&) = delete;
|
|
|
|
void PassSequenceOfAny(JSContext*, Sequence<JS::Value>&) = delete;
|
|
|
|
void PassNullableSequenceOfAny(JSContext*, Nullable<Sequence<JS::Value> >&) = delete;
|
|
|
|
void PassOptionalSequenceOfAny(JSContext*, Optional<Sequence<JS::Value> >&) = delete;
|
|
|
|
void PassOptionalNullableSequenceOfAny(JSContext*, Optional<Nullable<Sequence<JS::Value> > >&) = delete;
|
|
|
|
void PassOptionalSequenceOfAnyWithDefaultValue(JSContext*, Nullable<Sequence<JS::Value> >&) = delete;
|
|
|
|
void PassSequenceOfSequenceOfAny(JSContext*, Sequence<Sequence<JS::Value> >&) = delete;
|
|
|
|
void PassSequenceOfNullableSequenceOfAny(JSContext*, Sequence<Nullable<Sequence<JS::Value> > >&) = delete;
|
|
|
|
void PassNullableSequenceOfNullableSequenceOfAny(JSContext*, Nullable<Sequence<Nullable<Sequence<JS::Value> > > >&) = delete;
|
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfAny(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JS::Value> > > > >&) = delete;
|
|
|
|
void PassSequenceOfObject(JSContext*, Sequence<JSObject*>&) = delete;
|
|
|
|
void PassSequenceOfNullableObject(JSContext*, Sequence<JSObject*>&) = delete;
|
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfObject(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&) = delete;
|
|
|
|
void PassOptionalNullableSequenceOfNullableSequenceOfNullableObject(JSContext*, Optional<Nullable<Sequence<Nullable<Sequence<JSObject*> > > > >&) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
|
|
|
|
// Enforce that only const things are passed for optional
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalByte(Optional<int8_t>&) = delete;
|
|
|
|
void PassOptionalNullableByte(Optional<Nullable<int8_t> >&) = delete;
|
|
|
|
void PassOptionalShort(Optional<int16_t>&) = delete;
|
|
|
|
void PassOptionalLong(Optional<int32_t>&) = delete;
|
|
|
|
void PassOptionalLongLong(Optional<int64_t>&) = delete;
|
|
|
|
void PassOptionalOctet(Optional<uint8_t>&) = delete;
|
|
|
|
void PassOptionalUnsignedShort(Optional<uint16_t>&) = delete;
|
|
|
|
void PassOptionalUnsignedLong(Optional<uint32_t>&) = delete;
|
|
|
|
void PassOptionalUnsignedLongLong(Optional<uint64_t>&) = delete;
|
|
|
|
void PassOptionalSelf(Optional<TestInterface*> &) = delete;
|
|
|
|
void PassOptionalNonNullSelf(Optional<NonNull<TestInterface> >&) = delete;
|
2013-01-08 22:05:36 +04:00
|
|
|
void PassOptionalOther(Optional<IndirectlyImplementedInterface*>&);
|
|
|
|
void PassOptionalNonNullOther(Optional<NonNull<IndirectlyImplementedInterface> >&);
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalExternal(Optional<TestExternalInterface*>&) = delete;
|
|
|
|
void PassOptionalNonNullExternal(Optional<TestExternalInterface*>&) = delete;
|
|
|
|
void PassOptionalSequence(Optional<Sequence<int32_t> >&) = delete;
|
|
|
|
void PassOptionalNullableSequence(Optional<Nullable<Sequence<int32_t> > >&) = delete;
|
|
|
|
void PassOptionalObjectSequence(Optional<Sequence<OwningNonNull<TestInterface> > >&) = delete;
|
|
|
|
void PassOptionalArrayBuffer(Optional<ArrayBuffer>&) = delete;
|
|
|
|
void PassOptionalNullableArrayBuffer(Optional<ArrayBuffer*>&) = delete;
|
|
|
|
void PassOptionalEnum(Optional<TestEnum>&) = delete;
|
|
|
|
void PassOptionalCallback(JSContext*, Optional<OwningNonNull<TestCallback> >&) = delete;
|
2015-10-18 08:24:48 +03:00
|
|
|
void PassOptionalNullableCallback(JSContext*, Optional<RefPtr<TestCallback> >&) = delete;
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassOptionalAny(Optional<JS::Handle<JS::Value> >&) = delete;
|
2012-05-30 07:45:18 +04:00
|
|
|
|
|
|
|
// And test that string stuff is always const
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassString(nsAString&) = delete;
|
|
|
|
void PassNullableString(nsAString&) = delete;
|
|
|
|
void PassOptionalString(Optional<nsAString>&) = delete;
|
|
|
|
void PassOptionalStringWithDefaultValue(nsAString&) = delete;
|
|
|
|
void PassOptionalNullableString(Optional<nsAString>&) = delete;
|
|
|
|
void PassOptionalNullableStringWithDefaultValue(nsAString&) = delete;
|
|
|
|
void PassVariadicString(Sequence<nsString>&) = delete;
|
2013-04-26 03:03:06 +04:00
|
|
|
|
2013-06-13 09:18:35 +04:00
|
|
|
// cstrings should be const as well
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassByteString(nsCString&) = delete;
|
|
|
|
void PassNullableByteString(nsCString&) = delete;
|
|
|
|
void PassOptionalByteString(Optional<nsCString>&) = delete;
|
|
|
|
void PassOptionalNullableByteString(Optional<nsCString>&) = delete;
|
|
|
|
void PassVariadicByteString(Sequence<nsCString>&) = delete;
|
2013-06-13 09:18:35 +04:00
|
|
|
|
2013-04-26 03:03:06 +04:00
|
|
|
// Make sure dictionary arguments are always const
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassDictionary(JSContext*, Dict&) = delete;
|
|
|
|
void PassOtherDictionary(GrandparentDict&) = delete;
|
|
|
|
void PassSequenceOfDictionaries(JSContext*, Sequence<Dict>&) = delete;
|
|
|
|
void PassDictionaryOrLong(JSContext*, Dict&) = delete;
|
|
|
|
void PassDictContainingDict(JSContext*, DictContainingDict&) = delete;
|
|
|
|
void PassDictContainingSequence(DictContainingSequence&) = delete;
|
2013-04-26 03:03:06 +04:00
|
|
|
|
|
|
|
// Make sure various nullable things are always const
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassNullableEnum(Nullable<TestEnum>&) = delete;
|
2013-04-26 03:03:07 +04:00
|
|
|
|
|
|
|
// Make sure unions are always const
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassUnion(JSContext*, ObjectOrLong& arg) = delete;
|
|
|
|
void PassUnionWithNullable(JSContext*, ObjectOrNullOrLong& arg) = delete;
|
|
|
|
void PassNullableUnion(JSContext*, Nullable<ObjectOrLong>&) = delete;
|
|
|
|
void PassOptionalUnion(JSContext*, Optional<ObjectOrLong>&) = delete;
|
|
|
|
void PassOptionalNullableUnion(JSContext*, Optional<Nullable<ObjectOrLong> >&) = delete;
|
|
|
|
void PassOptionalNullableUnionWithDefaultValue(JSContext*, Nullable<ObjectOrLong>&) = delete;
|
2013-05-02 22:38:20 +04:00
|
|
|
|
|
|
|
// Make sure various date stuff is const as needed
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassNullableDate(Nullable<Date>&) = delete;
|
|
|
|
void PassOptionalDate(Optional<Date>&) = delete;
|
|
|
|
void PassOptionalNullableDate(Optional<Nullable<Date> >&) = delete;
|
|
|
|
void PassOptionalNullableDateWithDefaultValue(Nullable<Date>&) = delete;
|
|
|
|
void PassDateSequence(Sequence<Date>&) = delete;
|
|
|
|
void PassNullableDateSequence(Sequence<Nullable<Date> >&) = delete;
|
2013-05-16 20:36:55 +04:00
|
|
|
|
|
|
|
// Make sure variadics are const as needed
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassVariadicAny(JSContext*, Sequence<JS::Value>&) = delete;
|
|
|
|
void PassVariadicObject(JSContext*, Sequence<JSObject*>&) = delete;
|
|
|
|
void PassVariadicNullableObject(JSContext*, Sequence<JSObject*>&) = delete;
|
2013-07-22 16:15:43 +04:00
|
|
|
|
|
|
|
// Ensure NonNull does not leak in
|
2015-01-07 02:35:02 +03:00
|
|
|
void PassSelf(NonNull<TestInterface>&) = delete;
|
|
|
|
void PassSelf(OwningNonNull<TestInterface>&) = delete;
|
|
|
|
void PassSelf(const NonNull<TestInterface>&) = delete;
|
|
|
|
void PassSelf(const OwningNonNull<TestInterface>&) = delete;
|
|
|
|
void PassOther(NonNull<IndirectlyImplementedInterface>&) = delete;
|
|
|
|
void PassOther(const NonNull<IndirectlyImplementedInterface>&) = delete;
|
|
|
|
void PassOther(OwningNonNull<IndirectlyImplementedInterface>&) = delete;
|
|
|
|
void PassOther(const OwningNonNull<IndirectlyImplementedInterface>&) = delete;
|
|
|
|
void PassCallbackInterface(OwningNonNull<TestCallbackInterface>&) = delete;
|
|
|
|
void PassCallbackInterface(const OwningNonNull<TestCallbackInterface>&) = delete;
|
|
|
|
void PassCallbackInterface(NonNull<TestCallbackInterface>&) = delete;
|
|
|
|
void PassCallbackInterface(const NonNull<TestCallbackInterface>&) = delete;
|
|
|
|
void PassCallback(OwningNonNull<TestCallback>&) = delete;
|
|
|
|
void PassCallback(const OwningNonNull<TestCallback>&) = delete;
|
|
|
|
void PassCallback(NonNull<TestCallback>&) = delete;
|
|
|
|
void PassCallback(const NonNull<TestCallback>&) = delete;
|
|
|
|
void PassString(const NonNull<nsAString>&) = delete;
|
|
|
|
void PassString(NonNull<nsAString>&) = delete;
|
|
|
|
void PassString(const OwningNonNull<nsAString>&) = delete;
|
|
|
|
void PassString(OwningNonNull<nsAString>&) = delete;
|
2012-05-23 20:44:48 +04:00
|
|
|
};
|
|
|
|
|
2012-05-22 17:46:20 +04:00
|
|
|
class TestIndexedGetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 17:21:33 +04:00
|
|
|
uint32_t IndexedGetter(uint32_t, bool&);
|
2015-01-07 02:35:02 +03:00
|
|
|
uint32_t IndexedGetter(uint32_t&) = delete;
|
2012-09-05 17:21:33 +04:00
|
|
|
uint32_t Item(uint32_t&);
|
2015-01-07 02:35:02 +03:00
|
|
|
uint32_t Item(uint32_t, bool&) = delete;
|
2012-09-11 23:08:24 +04:00
|
|
|
uint32_t Length();
|
2014-03-06 07:48:03 +04:00
|
|
|
void LegacyCall(JS::Handle<JS::Value>);
|
2012-05-22 17:46:20 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestNamedGetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 17:21:33 +04:00
|
|
|
void NamedGetter(const nsAString&, bool&, nsAString&);
|
2016-05-10 05:25:40 +03:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-05-22 17:46:20 +04:00
|
|
|
};
|
|
|
|
|
2012-11-06 20:00:57 +04:00
|
|
|
class TestIndexedGetterAndSetterAndNamedGetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
void NamedGetter(const nsAString&, bool&, nsAString&);
|
2016-05-10 05:25:40 +03:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-11-06 20:00:57 +04:00
|
|
|
int32_t IndexedGetter(uint32_t, bool&);
|
|
|
|
void IndexedSetter(uint32_t, int32_t);
|
|
|
|
uint32_t Length();
|
|
|
|
};
|
|
|
|
|
2012-05-22 17:46:20 +04:00
|
|
|
class TestIndexedAndNamedGetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 17:21:33 +04:00
|
|
|
uint32_t IndexedGetter(uint32_t, bool&);
|
|
|
|
void NamedGetter(const nsAString&, bool&, nsAString&);
|
|
|
|
void NamedItem(const nsAString&, nsAString&);
|
2012-09-11 23:08:24 +04:00
|
|
|
uint32_t Length();
|
2016-05-10 05:25:40 +03:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-05-22 17:46:20 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestIndexedSetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 17:21:33 +04:00
|
|
|
void IndexedSetter(uint32_t, const nsAString&);
|
2012-11-05 20:58:03 +04:00
|
|
|
void IndexedGetter(uint32_t, bool&, nsString&);
|
|
|
|
uint32_t Length();
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetItem(uint32_t, const nsAString&);
|
2012-05-22 17:46:20 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestNamedSetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 17:21:33 +04:00
|
|
|
void NamedSetter(const nsAString&, TestIndexedSetterInterface&);
|
2012-11-05 20:58:03 +04:00
|
|
|
TestIndexedSetterInterface* NamedGetter(const nsAString&, bool&);
|
2016-05-10 05:25:40 +03:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-05-22 17:46:20 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestIndexedAndNamedSetterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
2012-09-05 17:21:33 +04:00
|
|
|
void IndexedSetter(uint32_t, TestIndexedSetterInterface&);
|
2012-11-05 20:58:03 +04:00
|
|
|
TestIndexedSetterInterface* IndexedGetter(uint32_t, bool&);
|
|
|
|
uint32_t Length();
|
2012-09-05 17:21:33 +04:00
|
|
|
void NamedSetter(const nsAString&, TestIndexedSetterInterface&);
|
2012-11-05 20:58:03 +04:00
|
|
|
TestIndexedSetterInterface* NamedGetter(const nsAString&, bool&);
|
2012-09-05 17:21:33 +04:00
|
|
|
void SetNamedItem(const nsAString&, TestIndexedSetterInterface&);
|
2016-05-10 05:25:40 +03:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-05-22 17:46:20 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestIndexedAndNamedGetterAndSetterInterface : public TestIndexedSetterInterface
|
|
|
|
{
|
|
|
|
public:
|
2012-09-05 17:21:33 +04:00
|
|
|
uint32_t IndexedGetter(uint32_t, bool&);
|
|
|
|
uint32_t Item(uint32_t);
|
|
|
|
void NamedGetter(const nsAString&, bool&, nsAString&);
|
|
|
|
void NamedItem(const nsAString&, nsAString&);
|
|
|
|
void IndexedSetter(uint32_t, int32_t&);
|
2015-01-07 02:35:02 +03:00
|
|
|
void IndexedSetter(uint32_t, const nsAString&) = delete;
|
2012-09-05 17:21:33 +04:00
|
|
|
void NamedSetter(const nsAString&, const nsAString&);
|
2012-05-22 17:46:20 +04:00
|
|
|
void Stringify(nsAString&);
|
2012-09-11 23:08:24 +04:00
|
|
|
uint32_t Length();
|
2016-05-10 05:25:40 +03:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-05-22 17:46:20 +04:00
|
|
|
};
|
|
|
|
|
2012-10-31 16:36:20 +04:00
|
|
|
class TestCppKeywordNamedMethodsInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
bool Continue();
|
|
|
|
bool Delete();
|
|
|
|
int32_t Volatile();
|
|
|
|
};
|
|
|
|
|
2012-11-05 20:58:02 +04:00
|
|
|
class TestIndexedDeleterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
void IndexedDeleter(uint32_t, bool&);
|
2015-01-07 02:35:02 +03:00
|
|
|
void IndexedDeleter(uint32_t) = delete;
|
2012-11-05 20:58:03 +04:00
|
|
|
long IndexedGetter(uint32_t, bool&);
|
|
|
|
uint32_t Length();
|
2012-11-05 20:58:02 +04:00
|
|
|
void DelItem(uint32_t);
|
2015-01-07 02:35:02 +03:00
|
|
|
void DelItem(uint32_t, bool&) = delete;
|
2012-11-05 20:58:02 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestIndexedDeleterWithRetvalInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
bool IndexedDeleter(uint32_t, bool&);
|
2015-01-07 02:35:02 +03:00
|
|
|
bool IndexedDeleter(uint32_t) = delete;
|
2012-11-05 20:58:03 +04:00
|
|
|
long IndexedGetter(uint32_t, bool&);
|
|
|
|
uint32_t Length();
|
2012-11-05 20:58:02 +04:00
|
|
|
bool DelItem(uint32_t);
|
2015-01-07 02:35:02 +03:00
|
|
|
bool DelItem(uint32_t, bool&) = delete;
|
2012-11-05 20:58:02 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestNamedDeleterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
void NamedDeleter(const nsAString&, bool&);
|
2012-11-05 20:58:03 +04:00
|
|
|
long NamedGetter(const nsAString&, bool&);
|
2016-05-10 05:25:40 +03:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-11-05 20:58:02 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestNamedDeleterWithRetvalInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
bool NamedDeleter(const nsAString&, bool&);
|
2015-01-07 02:35:02 +03:00
|
|
|
bool NamedDeleter(const nsAString&) = delete;
|
2012-11-05 20:58:03 +04:00
|
|
|
long NamedGetter(const nsAString&, bool&);
|
2012-11-05 20:58:02 +04:00
|
|
|
bool DelNamedItem(const nsAString&);
|
2015-01-07 02:35:02 +03:00
|
|
|
bool DelNamedItem(const nsAString&, bool&) = delete;
|
2016-05-10 05:25:40 +03:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-11-05 20:58:02 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
class TestIndexedAndNamedDeleterInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
|
|
|
|
void IndexedDeleter(uint32_t, bool&);
|
2012-11-05 20:58:03 +04:00
|
|
|
long IndexedGetter(uint32_t, bool&);
|
|
|
|
uint32_t Length();
|
2012-11-05 20:58:02 +04:00
|
|
|
|
|
|
|
void NamedDeleter(const nsAString&, bool&);
|
2015-01-07 02:35:02 +03:00
|
|
|
void NamedDeleter(const nsAString&) = delete;
|
2012-11-05 20:58:03 +04:00
|
|
|
long NamedGetter(const nsAString&, bool&);
|
2012-11-05 20:58:02 +04:00
|
|
|
void DelNamedItem(const nsAString&);
|
2015-01-07 02:35:02 +03:00
|
|
|
void DelNamedItem(const nsAString&, bool&) = delete;
|
2016-05-10 05:25:40 +03:00
|
|
|
void GetSupportedNames(nsTArray<nsString>&);
|
2012-11-05 20:58:02 +04:00
|
|
|
};
|
|
|
|
|
2013-03-04 23:08:24 +04:00
|
|
|
class TestParentInterface : public nsISupports,
|
|
|
|
public nsWrapperCache
|
2012-12-14 23:10:50 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
2013-03-04 23:08:24 +04:00
|
|
|
|
|
|
|
// We need a GetParentObject to make binding codegen happy
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
};
|
|
|
|
|
|
|
|
class TestChildInterface : public TestParentInterface
|
|
|
|
{
|
2012-12-14 23:10:50 +04:00
|
|
|
};
|
|
|
|
|
2015-09-28 21:25:04 +03:00
|
|
|
class TestDeprecatedInterface : public nsISupports, public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
static
|
|
|
|
already_AddRefed<TestDeprecatedInterface>
|
|
|
|
Constructor(const GlobalObject&, ErrorResult&);
|
|
|
|
|
|
|
|
static void AlsoDeprecated(const GlobalObject&);
|
|
|
|
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
};
|
|
|
|
|
2015-11-25 23:48:09 +03:00
|
|
|
class TestInterfaceWithPromiseConstructorArg : public nsISupports, public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
static
|
|
|
|
already_AddRefed<TestInterfaceWithPromiseConstructorArg>
|
|
|
|
Constructor(const GlobalObject&, Promise&, ErrorResult&);
|
|
|
|
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
};
|
|
|
|
|
2016-05-16 12:04:38 +03:00
|
|
|
class TestSecureContextInterface : public nsISupports, public nsWrapperCache
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
|
|
|
|
static
|
|
|
|
already_AddRefed<TestSecureContextInterface>
|
|
|
|
Constructor(const GlobalObject&, ErrorResult&);
|
|
|
|
|
|
|
|
static void AlsoSecureContext(const GlobalObject&);
|
|
|
|
|
|
|
|
virtual nsISupports* GetParentObject();
|
|
|
|
};
|
|
|
|
|
2016-06-02 17:34:39 +03:00
|
|
|
class TestNamespace {
|
|
|
|
public:
|
|
|
|
static bool Foo(const GlobalObject&);
|
|
|
|
static int32_t Bar(const GlobalObject&);
|
|
|
|
static void Baz(const GlobalObject&);
|
|
|
|
};
|
|
|
|
|
|
|
|
class TestRenamedNamespace {
|
|
|
|
};
|
|
|
|
|
2016-06-02 17:34:39 +03:00
|
|
|
class TestProtoObjectHackedNamespace {
|
|
|
|
};
|
|
|
|
|
2012-05-23 20:44:48 +04:00
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif /* TestBindingHeader_h */
|