michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * vim: set ts=4 sw=4 et tw=80: michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: include DOMTypes; michael@0: michael@0: using struct mozilla::void_t from "ipc/IPCMessageUtils.h"; michael@0: michael@0: namespace mozilla { michael@0: namespace jsipc { michael@0: michael@0: struct JSIID michael@0: { michael@0: uint32_t m0; michael@0: uint16_t m1; michael@0: uint16_t m2; michael@0: uint8_t m3_0; michael@0: uint8_t m3_1; michael@0: uint8_t m3_2; michael@0: uint8_t m3_3; michael@0: uint8_t m3_4; michael@0: uint8_t m3_5; michael@0: uint8_t m3_6; michael@0: uint8_t m3_7; michael@0: }; michael@0: michael@0: union JSVariant michael@0: { michael@0: void_t; /* |undefined| */ michael@0: nsString; /* StringValue(x) */ michael@0: uint64_t; /* ID that maps to a JSObject (cpow on parent, original on child). */ michael@0: double; /* NumberValue(x) */ michael@0: bool; /* BooleanValue(x) */ michael@0: JSIID; /* XPC nsIID */ michael@0: }; michael@0: michael@0: struct ReturnSuccess michael@0: { michael@0: }; michael@0: michael@0: struct ReturnStopIteration michael@0: { michael@0: }; michael@0: michael@0: struct ReturnException michael@0: { michael@0: JSVariant exn; michael@0: }; michael@0: michael@0: union ReturnStatus michael@0: { michael@0: ReturnSuccess; michael@0: ReturnStopIteration; michael@0: ReturnException; michael@0: }; michael@0: michael@0: union JSParam michael@0: { michael@0: void_t; /* value is strictly an xpc out param */ michael@0: JSVariant; /* actual value to pass through */ michael@0: }; michael@0: michael@0: struct PPropertyDescriptor michael@0: { michael@0: uint64_t objId; michael@0: uint32_t attrs; michael@0: JSVariant value; michael@0: michael@0: // How to interpret these values depends on whether JSPROP_GETTER/SETTER michael@0: // are set. If set, the corresponding value is a CPOW or 0 for NULL. michael@0: // Otherwise, the following table is used: michael@0: // michael@0: // 0 - NULL michael@0: // 1 - Default getter or setter. michael@0: // 2 - js_GetterOnlyPropertyStub (setter only) michael@0: // 3 - Unknown michael@0: uint64_t getter; michael@0: uint64_t setter; michael@0: }; michael@0: michael@0: struct CpowEntry michael@0: { michael@0: nsString name; michael@0: JSVariant value; michael@0: }; michael@0: michael@0: } michael@0: }