1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include
"nsISupports.idl"
9 * Test interface for https://bugzilla.mozilla.org/show_bug.cgi?id=809674 .
11 * This test makes sure that accessing JS-implemented attributes or methods
12 * marked with [implicit_jscontext] works as expected.
14 * It also makes sure [optional_argc] is not supported on JS-implemented
18 [scriptable
, uuid(2df46559
-da21
-49bf
-b863
-0d7b7bbcbc73
)]
19 interface nsIXPCTestBug809674
: nsISupports
{
20 // Various interesting [implicit_jscontext] cases.
21 [implicit_jscontext
] unsigned long addArgs
(in unsigned long x
, in unsigned long y
);
22 [implicit_jscontext
] unsigned long addSubMulArgs
(in unsigned long x
, in unsigned long y
,
23 out unsigned long subOut
,
24 out unsigned long mulOut
);
25 [implicit_jscontext
] jsval addVals
(in jsval x
, in jsval y
);
27 [implicit_jscontext
] unsigned long methodNoArgs
();
28 [implicit_jscontext
] void methodNoArgsNoRetVal
();
30 // When there are many arguments, the context is passed on the stack on
32 [implicit_jscontext
] unsigned long addMany
(in unsigned long x1
,
41 // Attributes can use [implicit_jscontext], too.
42 [implicit_jscontext
] attribute jsval valProperty
;
43 [implicit_jscontext
] attribute
unsigned long uintProperty
;
45 // [optional_argc] is not supported.
46 [optional_argc
] void methodWithOptionalArgc
();