diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /js/xpconnect/tests/idl/xpctest_bug809674.idl | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/xpconnect/tests/idl/xpctest_bug809674.idl')
-rw-r--r-- | js/xpconnect/tests/idl/xpctest_bug809674.idl | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/js/xpconnect/tests/idl/xpctest_bug809674.idl b/js/xpconnect/tests/idl/xpctest_bug809674.idl new file mode 100644 index 0000000000..1e83e244ec --- /dev/null +++ b/js/xpconnect/tests/idl/xpctest_bug809674.idl @@ -0,0 +1,47 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * 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/. */ + +#include "nsISupports.idl" +/* + * Test interface for https://bugzilla.mozilla.org/show_bug.cgi?id=809674 . + * + * This test makes sure that accessing JS-implemented attributes or methods + * marked with [implicit_jscontext] works as expected. + * + * It also makes sure [optional_argc] is not supported on JS-implemented + * methods. + */ + +[scriptable, uuid(2df46559-da21-49bf-b863-0d7b7bbcbc73)] +interface nsIXPCTestBug809674 : nsISupports { + // Various interesting [implicit_jscontext] cases. + [implicit_jscontext] unsigned long addArgs(in unsigned long x, in unsigned long y); + [implicit_jscontext] unsigned long addSubMulArgs(in unsigned long x, in unsigned long y, + out unsigned long subOut, + out unsigned long mulOut); + [implicit_jscontext] jsval addVals(in jsval x, in jsval y); + + [implicit_jscontext] unsigned long methodNoArgs(); + [implicit_jscontext] void methodNoArgsNoRetVal(); + + // When there are many arguments, the context is passed on the stack on + // most platforms. + [implicit_jscontext] unsigned long addMany(in unsigned long x1, + in unsigned long x2, + in unsigned long x3, + in unsigned long x4, + in unsigned long x5, + in unsigned long x6, + in unsigned long x7, + in unsigned long x8); + + // Attributes can use [implicit_jscontext], too. + [implicit_jscontext] attribute jsval valProperty; + [implicit_jscontext] attribute unsigned long uintProperty; + + // [optional_argc] is not supported. + [optional_argc] void methodWithOptionalArgc(); +}; |