2013-07-03 00:24:32 -07:00
|
|
|
/* -*- 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;
|
2014-06-10 22:44:13 -07:00
|
|
|
include protocol PContentBridge;
|
2013-07-03 00:24:32 -07:00
|
|
|
include DOMTypes;
|
|
|
|
include JavaScriptTypes;
|
|
|
|
|
2013-10-01 12:25:07 -07:00
|
|
|
using struct mozilla::void_t from "ipc/IPCMessageUtils.h";
|
2013-07-03 00:24:32 -07:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace jsipc {
|
|
|
|
|
2014-10-07 21:32:45 -07:00
|
|
|
prio(normal upto high) sync protocol PJavaScript
|
2013-07-03 00:24:32 -07:00
|
|
|
{
|
2014-06-10 22:44:13 -07:00
|
|
|
manager PContent or PContentBridge;
|
2013-07-03 00:24:32 -07:00
|
|
|
|
2014-05-16 16:40:37 -07:00
|
|
|
both:
|
|
|
|
// Sent when a CPOW has been finalized and table entries can be freed up.
|
2013-07-03 00:24:32 -07:00
|
|
|
async DropObject(uint64_t objId);
|
|
|
|
|
|
|
|
// These roughly map to the ProxyHandler hooks that CPOWs need.
|
2015-02-04 10:01:01 -08:00
|
|
|
prio(high) sync PreventExtensions(uint64_t objId) returns (ReturnStatus rs);
|
2014-10-07 21:32:45 -07:00
|
|
|
prio(high) sync GetPropertyDescriptor(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, PPropertyDescriptor result);
|
|
|
|
prio(high) sync GetOwnPropertyDescriptor(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, PPropertyDescriptor result);
|
|
|
|
prio(high) sync DefineProperty(uint64_t objId, JSIDVariant id, PPropertyDescriptor descriptor) returns (ReturnStatus rs);
|
2015-02-04 08:20:04 -08:00
|
|
|
prio(high) sync Delete(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs);
|
2014-10-07 21:32:45 -07:00
|
|
|
|
|
|
|
prio(high) sync Has(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, bool has);
|
|
|
|
prio(high) sync HasOwn(uint64_t objId, JSIDVariant id) returns (ReturnStatus rs, bool has);
|
|
|
|
prio(high) sync Get(uint64_t objId, ObjectVariant receiver, JSIDVariant id) returns (ReturnStatus rs, JSVariant result);
|
Bug 1142794 - Change 'receiver' argument to SetProperty functions and ProxyHandler::set methods to be a HandleValue. r=Waldo.
Also: Change signature of these functions and methods to all have the same arguments in the same order: (cx, obj, id, v, receiver). Also change v from MutableHandleValue to HandleValue.
There is no change in behavior.
In fact the new error message `JSMSG_SET_NON_OBJECT_RECEIVER` is
impossible to trigger from scripts for now, I think (after re-reading
the whole patch with this in mind). JS_ForwardSetPropertyTo is the only
way to get a non-object receiver into the engine, but no caller
currently does so.
We're installing new pipes here, and they should work, but for now it's
the same cold water flowing through as before. Actually hooking up the
hot water is left for another bug (one with tests, not to put too fine a
point on it).
Notes:
* InvokeGetterOrSetter had to be split into two functions:
InvokeGetter takes a MutableHandleValue out-param,
InvokeSetter a HandleValue in-param.
* Watchpoints can still tamper with values being assigned. So can
JSSetterOps. I'm pleased we can support this craziness in a way that
doesn't have to spread via the type system to encompass the entire
codebase.
* Change in GlobalObject::setIntrinsicValue is not really a change.
Yes, it asserted before, but an exception thrown during self-hosting
initialization is not going to go unnoticed either.
* Since the receiver argument to js::SetProperty() is at the end now, it
makes sense for it to be optional. Some callers look nicer.
2015-03-01 11:16:19 -08:00
|
|
|
prio(high) sync Set(uint64_t objId, JSIDVariant id, JSVariant value, JSVariant receiver) returns (ReturnStatus rs);
|
2014-10-07 21:32:45 -07:00
|
|
|
|
|
|
|
prio(high) sync IsExtensible(uint64_t objId) returns (ReturnStatus rs, bool result);
|
|
|
|
prio(high) sync CallOrConstruct(uint64_t objId, JSParam[] argv, bool construct) returns (ReturnStatus rs, JSVariant result, JSParam[] outparams);
|
|
|
|
prio(high) sync HasInstance(uint64_t objId, JSVariant v) returns (ReturnStatus rs, bool has);
|
|
|
|
prio(high) sync ObjectClassIs(uint64_t objId, uint32_t classValue) returns (bool result);
|
2015-03-27 13:12:37 -07:00
|
|
|
prio(high) sync ClassName(uint64_t objId) returns (nsCString name);
|
2015-02-05 14:36:50 -08:00
|
|
|
prio(high) sync GetPrototype(uint64_t objId) returns (ReturnStatus rs, ObjectOrNullVariant result);
|
2014-10-07 21:32:45 -07:00
|
|
|
prio(high) sync RegExpToShared(uint64_t objId) returns (ReturnStatus rs, nsString source, uint32_t flags);
|
|
|
|
|
2014-10-16 09:39:38 -07:00
|
|
|
prio(high) sync GetPropertyKeys(uint64_t objId, uint32_t flags) returns (ReturnStatus rs, JSIDVariant[] ids);
|
2014-10-07 21:32:45 -07:00
|
|
|
prio(high) sync InstanceOf(uint64_t objId, JSIID iid) returns (ReturnStatus rs, bool instanceof);
|
|
|
|
prio(high) sync DOMInstanceOf(uint64_t objId, int prototypeID, int depth) returns (ReturnStatus rs, bool instanceof);
|
|
|
|
|
2013-07-03 00:24:32 -07:00
|
|
|
parent:
|
|
|
|
async __delete__();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|