js/ipc/PJavaScript.ipdl
author Randell Jesup <rjesup@jesup.org>
Tue, 30 Sep 2014 16:11:16 -0400
changeset 288354 002f9202019b209a0902b3a5b86ec3fc631455ce
parent 191638 032a08766a8c0ad779acf95d241d70de4fd1a14c
child 204748 9a90a1cf5d5f36d333b04a89364cb48ee6cc8364
permissions -rw-r--r--
Bug 1074548 - Lazy-allocate webrtc trace buffers in RELEASE_BUILDs. r=ted, a=sledru

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 * vim: set ts=4 sw=4 et tw=80:
 *
 * 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 protocol PContent;
include protocol PContentBridge;
include DOMTypes;
include JavaScriptTypes;

using struct mozilla::void_t from "ipc/IPCMessageUtils.h";

namespace mozilla {
namespace jsipc {

intr protocol PJavaScript
{
    manager PContent or PContentBridge;

both:
    // Sent when a CPOW has been finalized and table entries can be freed up.
    async DropObject(uint64_t objId);

    // These roughly map to the ProxyHandler hooks that CPOWs need.
    rpc PreventExtensions(uint64_t objId) returns (ReturnStatus rs);
    rpc GetPropertyDescriptor(uint64_t objId, nsString id) returns (ReturnStatus rs, PPropertyDescriptor result);
    rpc GetOwnPropertyDescriptor(uint64_t objId, nsString id) returns (ReturnStatus rs, PPropertyDescriptor result);
    rpc DefineProperty(uint64_t objId, nsString id, PPropertyDescriptor descriptor) returns (ReturnStatus rs);
    rpc Delete(uint64_t objId, nsString id) returns (ReturnStatus rs, bool successful);

    rpc Has(uint64_t objId, nsString id) returns (ReturnStatus rs, bool has);
    rpc HasOwn(uint64_t objId, nsString id) returns (ReturnStatus rs, bool has);
    rpc Get(uint64_t objId, ObjectVariant receiver, nsString id) returns (ReturnStatus rs, JSVariant result);
    rpc Set(uint64_t objId, ObjectVariant receiver, nsString id, bool strict, JSVariant value) returns (ReturnStatus rs, JSVariant result);

    rpc IsExtensible(uint64_t objId) returns (ReturnStatus rs, bool result);
    rpc CallOrConstruct(uint64_t objId, JSParam[] argv, bool construct) returns (ReturnStatus rs, JSVariant result, JSParam[] outparams);
    rpc ObjectClassIs(uint64_t objId, uint32_t classValue) returns (bool result);
    rpc ClassName(uint64_t objId) returns (nsString name);

    rpc GetPropertyNames(uint64_t objId, uint32_t flags) returns (ReturnStatus rs, nsString[] names);
    rpc InstanceOf(uint64_t objId, JSIID iid) returns (ReturnStatus rs, bool instanceof);
    rpc DOMInstanceOf(uint64_t objId, int prototypeID, int depth) returns (ReturnStatus rs, bool instanceof);

parent:
    async __delete__();
};

}
}