2018-11-30 22:52:05 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
2018-11-30 18:39:55 +03:00
|
|
|
* vim: set ts=8 sw=2 et tw=80:
|
2014-05-17 03:40:36 +04:00
|
|
|
*
|
|
|
|
* 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/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_jsipc_JavaScriptBase_h__
|
|
|
|
#define mozilla_jsipc_JavaScriptBase_h__
|
|
|
|
|
2014-05-17 03:40:36 +04:00
|
|
|
#include "WrapperAnswer.h"
|
2014-05-17 03:40:36 +04:00
|
|
|
#include "WrapperOwner.h"
|
|
|
|
#include "mozilla/dom/DOMTypes.h"
|
|
|
|
#include "mozilla/jsipc/PJavaScript.h"
|
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace jsipc {
|
|
|
|
|
|
|
|
template <class Base>
|
2014-05-17 03:40:36 +04:00
|
|
|
class JavaScriptBase : public WrapperOwner, public WrapperAnswer, public Base {
|
2020-02-24 14:08:17 +03:00
|
|
|
using Answer = WrapperAnswer;
|
2014-05-17 03:40:36 +04:00
|
|
|
|
|
|
|
public:
|
2020-03-16 16:47:02 +03:00
|
|
|
virtual ~JavaScriptBase() = default;
|
2014-05-17 03:40:37 +04:00
|
|
|
|
2017-11-06 06:37:28 +03:00
|
|
|
virtual void ActorDestroy(WrapperOwner::ActorDestroyReason why) override {
|
2014-05-17 03:40:36 +04:00
|
|
|
WrapperOwner::ActorDestroy(why);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*** IPC handlers ***/
|
|
|
|
|
2017-11-06 06:37:28 +03:00
|
|
|
mozilla::ipc::IPCResult RecvPreventExtensions(const uint64_t& objId,
|
|
|
|
ReturnStatus* rs) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() || !Answer::RecvPreventExtensions(obj.value(), rs)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
|
|
|
mozilla::ipc::IPCResult RecvGetOwnPropertyDescriptor(
|
|
|
|
const uint64_t& objId, const JSIDVariant& id, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
PPropertyDescriptor* out) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() ||
|
|
|
|
!Answer::RecvGetOwnPropertyDescriptor(obj.value(), id, rs, out)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
|
|
|
mozilla::ipc::IPCResult RecvDefineProperty(const uint64_t& objId,
|
|
|
|
const JSIDVariant& id,
|
2017-11-06 06:37:28 +03:00
|
|
|
const PPropertyDescriptor& flags,
|
|
|
|
ReturnStatus* rs) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() ||
|
|
|
|
!Answer::RecvDefineProperty(obj.value(), id, flags, rs)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
|
|
|
mozilla::ipc::IPCResult RecvDelete(const uint64_t& objId,
|
|
|
|
const JSIDVariant& id,
|
2017-11-06 06:37:28 +03:00
|
|
|
ReturnStatus* rs) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() || !Answer::RecvDelete(obj.value(), id, rs)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvHas(const uint64_t& objId, const JSIDVariant& id,
|
2017-11-06 06:37:28 +03:00
|
|
|
ReturnStatus* rs, bool* bp) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() || !Answer::RecvHas(obj.value(), id, rs, bp)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
|
|
|
mozilla::ipc::IPCResult RecvHasOwn(const uint64_t& objId,
|
|
|
|
const JSIDVariant& id, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
bool* bp) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() || !Answer::RecvHasOwn(obj.value(), id, rs, bp)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
|
|
|
mozilla::ipc::IPCResult RecvGet(const uint64_t& objId,
|
|
|
|
const JSVariant& receiverVar,
|
|
|
|
const JSIDVariant& id, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
JSVariant* result) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() ||
|
|
|
|
!Answer::RecvGet(obj.value(), receiverVar, id, rs, result)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
|
|
|
mozilla::ipc::IPCResult RecvSet(const uint64_t& objId, const JSIDVariant& id,
|
|
|
|
const JSVariant& value,
|
2017-11-06 06:37:28 +03:00
|
|
|
const JSVariant& receiverVar,
|
|
|
|
ReturnStatus* rs) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() ||
|
|
|
|
!Answer::RecvSet(obj.value(), id, value, receiverVar, rs)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvIsExtensible(const uint64_t& objId,
|
|
|
|
ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
bool* result) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() || !Answer::RecvIsExtensible(obj.value(), rs, result)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
|
|
|
mozilla::ipc::IPCResult RecvCallOrConstruct(
|
2019-07-10 06:31:42 +03:00
|
|
|
const uint64_t& objId, nsTArray<JSParam>&& argv, const bool& construct,
|
|
|
|
ReturnStatus* rs, JSVariant* result,
|
2017-11-06 06:37:28 +03:00
|
|
|
nsTArray<JSParam>* outparams) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() ||
|
|
|
|
!Answer::RecvCallOrConstruct(obj.value(), std::move(argv), construct,
|
|
|
|
rs, result, outparams)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
mozilla::ipc::IPCResult RecvHasInstance(const uint64_t& objId,
|
|
|
|
const JSVariant& v, ReturnStatus* rs,
|
|
|
|
bool* bp) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() || !Answer::RecvHasInstance(obj.value(), v, rs, bp)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
mozilla::ipc::IPCResult RecvGetBuiltinClass(const uint64_t& objId,
|
|
|
|
ReturnStatus* rs,
|
|
|
|
uint32_t* classValue) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() ||
|
|
|
|
!Answer::RecvGetBuiltinClass(obj.value(), rs, classValue)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
mozilla::ipc::IPCResult RecvIsArray(const uint64_t& objId, ReturnStatus* rs,
|
|
|
|
uint32_t* answer) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() || !Answer::RecvIsArray(obj.value(), rs, answer)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
mozilla::ipc::IPCResult RecvClassName(const uint64_t& objId,
|
|
|
|
nsCString* result) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() || !Answer::RecvClassName(obj.value(), result)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
mozilla::ipc::IPCResult RecvGetPrototype(
|
|
|
|
const uint64_t& objId, ReturnStatus* rs,
|
|
|
|
ObjectOrNullVariant* result) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() || !Answer::RecvGetPrototype(obj.value(), rs, result)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
|
|
|
mozilla::ipc::IPCResult RecvGetPrototypeIfOrdinary(
|
|
|
|
const uint64_t& objId, ReturnStatus* rs, bool* isOrdinary,
|
2017-11-06 06:37:28 +03:00
|
|
|
ObjectOrNullVariant* result) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() || !Answer::RecvGetPrototypeIfOrdinary(
|
|
|
|
obj.value(), rs, isOrdinary, result)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
2016-02-24 00:42:30 +03:00
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
mozilla::ipc::IPCResult RecvRegExpToShared(const uint64_t& objId,
|
|
|
|
ReturnStatus* rs, nsString* source,
|
|
|
|
uint32_t* flags) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() ||
|
|
|
|
!Answer::RecvRegExpToShared(obj.value(), rs, source, flags)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
2014-10-01 19:22:15 +04:00
|
|
|
}
|
2014-05-17 03:40:36 +04:00
|
|
|
|
2016-11-15 06:26:00 +03:00
|
|
|
mozilla::ipc::IPCResult RecvGetPropertyKeys(
|
|
|
|
const uint64_t& objId, const uint32_t& flags, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
nsTArray<JSIDVariant>* ids) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() ||
|
|
|
|
!Answer::RecvGetPropertyKeys(obj.value(), flags, rs, ids)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
|
|
|
mozilla::ipc::IPCResult RecvInstanceOf(const uint64_t& objId,
|
|
|
|
const JSIID& iid, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
bool* instanceof) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() ||
|
|
|
|
!Answer::RecvInstanceOf(obj.value(), iid, rs, instanceof)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
|
|
|
}
|
|
|
|
mozilla::ipc::IPCResult RecvDOMInstanceOf(const uint64_t& objId,
|
|
|
|
const int& prototypeID,
|
|
|
|
const int& depth, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
bool* instanceof) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() ||
|
|
|
|
!Answer::RecvDOMInstanceOf(obj.value(), prototypeID, depth, rs,
|
|
|
|
instanceof)) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
|
|
|
}
|
|
|
|
return IPC_OK();
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
|
|
|
|
2017-11-06 06:37:28 +03:00
|
|
|
mozilla::ipc::IPCResult RecvDropObject(const uint64_t& objId) override {
|
2018-05-31 23:29:03 +03:00
|
|
|
Maybe<ObjectId> obj(ObjectId::deserialize(objId));
|
|
|
|
if (obj.isNothing() || !Answer::RecvDropObject(obj.value())) {
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_FAIL_NO_REASON(this);
|
2014-05-17 03:40:37 +04:00
|
|
|
}
|
2016-11-15 06:26:00 +03:00
|
|
|
return IPC_OK();
|
2018-11-30 13:46:48 +03:00
|
|
|
}
|
2014-05-17 03:40:37 +04:00
|
|
|
|
2014-05-17 03:40:36 +04:00
|
|
|
/*** Dummy call handlers ***/
|
|
|
|
|
2017-11-06 06:37:28 +03:00
|
|
|
bool SendDropObject(const ObjectId& objId) override {
|
2014-09-25 15:13:29 +04:00
|
|
|
return Base::SendDropObject(objId.serialize());
|
2014-05-17 03:40:37 +04:00
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
bool SendPreventExtensions(const ObjectId& objId, ReturnStatus* rs) override {
|
2015-02-04 21:01:01 +03:00
|
|
|
return Base::SendPreventExtensions(objId.serialize(), rs);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2015-03-29 01:22:11 +03:00
|
|
|
bool SendGetOwnPropertyDescriptor(const ObjectId& objId,
|
|
|
|
const JSIDVariant& id, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
PPropertyDescriptor* out) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendGetOwnPropertyDescriptor(objId.serialize(), id, rs, out);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2015-03-29 01:22:11 +03:00
|
|
|
bool SendDefineProperty(const ObjectId& objId, const JSIDVariant& id,
|
|
|
|
const PPropertyDescriptor& flags,
|
2017-11-06 06:37:28 +03:00
|
|
|
ReturnStatus* rs) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendDefineProperty(objId.serialize(), id, flags, rs);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
bool SendDelete(const ObjectId& objId, const JSIDVariant& id,
|
|
|
|
ReturnStatus* rs) override {
|
2015-02-04 19:20:04 +03:00
|
|
|
return Base::SendDelete(objId.serialize(), id, rs);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
|
|
|
|
2015-03-29 01:22:11 +03:00
|
|
|
bool SendHas(const ObjectId& objId, const JSIDVariant& id, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
bool* bp) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendHas(objId.serialize(), id, rs, bp);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2015-03-29 01:22:11 +03:00
|
|
|
bool SendHasOwn(const ObjectId& objId, const JSIDVariant& id,
|
2017-11-06 06:37:28 +03:00
|
|
|
ReturnStatus* rs, bool* bp) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendHasOwn(objId.serialize(), id, rs, bp);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2015-09-18 01:14:41 +03:00
|
|
|
bool SendGet(const ObjectId& objId, const JSVariant& receiverVar,
|
|
|
|
const JSIDVariant& id, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
JSVariant* result) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendGet(objId.serialize(), receiverVar, id, rs, result);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2015-03-29 01:22:11 +03:00
|
|
|
bool SendSet(const ObjectId& objId, const JSIDVariant& id,
|
2017-11-06 06:37:28 +03:00
|
|
|
const JSVariant& value, const JSVariant& receiverVar,
|
|
|
|
ReturnStatus* rs) override {
|
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.
--HG--
extra : rebase_source : e89f916fe267800bc73890e11aceef5c4855b272
2015-03-01 22:16:19 +03:00
|
|
|
return Base::SendSet(objId.serialize(), id, value, receiverVar, rs);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
|
|
|
|
2017-11-06 06:37:28 +03:00
|
|
|
bool SendIsExtensible(const ObjectId& objId, ReturnStatus* rs,
|
|
|
|
bool* result) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendIsExtensible(objId.serialize(), rs, result);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2015-03-29 01:22:11 +03:00
|
|
|
bool SendCallOrConstruct(const ObjectId& objId, const nsTArray<JSParam>& argv,
|
|
|
|
const bool& construct, ReturnStatus* rs,
|
|
|
|
JSVariant* result,
|
2017-11-06 06:37:28 +03:00
|
|
|
nsTArray<JSParam>* outparams) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendCallOrConstruct(objId.serialize(), argv, construct, rs,
|
|
|
|
result, outparams);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
bool SendHasInstance(const ObjectId& objId, const JSVariant& v,
|
|
|
|
ReturnStatus* rs, bool* bp) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendHasInstance(objId.serialize(), v, rs, bp);
|
2014-09-11 04:15:40 +04:00
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
bool SendGetBuiltinClass(const ObjectId& objId, ReturnStatus* rs,
|
|
|
|
uint32_t* classValue) override {
|
2015-08-29 07:55:40 +03:00
|
|
|
return Base::SendGetBuiltinClass(objId.serialize(), rs, classValue);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
bool SendIsArray(const ObjectId& objId, ReturnStatus* rs,
|
|
|
|
uint32_t* answer) override {
|
2015-08-23 11:10:24 +03:00
|
|
|
return Base::SendIsArray(objId.serialize(), rs, answer);
|
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
bool SendClassName(const ObjectId& objId, nsCString* result) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendClassName(objId.serialize(), result);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
bool SendGetPrototype(const ObjectId& objId, ReturnStatus* rs,
|
|
|
|
ObjectOrNullVariant* result) override {
|
2015-02-06 01:36:50 +03:00
|
|
|
return Base::SendGetPrototype(objId.serialize(), rs, result);
|
|
|
|
}
|
2016-02-24 00:42:30 +03:00
|
|
|
bool SendGetPrototypeIfOrdinary(const ObjectId& objId, ReturnStatus* rs,
|
|
|
|
bool* isOrdinary,
|
2017-11-06 06:37:28 +03:00
|
|
|
ObjectOrNullVariant* result) override {
|
2016-02-24 00:42:30 +03:00
|
|
|
return Base::SendGetPrototypeIfOrdinary(objId.serialize(), rs, isOrdinary,
|
|
|
|
result);
|
|
|
|
}
|
2014-05-17 03:40:36 +04:00
|
|
|
|
2015-03-29 01:22:11 +03:00
|
|
|
bool SendRegExpToShared(const ObjectId& objId, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
nsString* source, uint32_t* flags) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendRegExpToShared(objId.serialize(), rs, source, flags);
|
2014-10-01 19:22:15 +04:00
|
|
|
}
|
|
|
|
|
2015-03-29 01:22:11 +03:00
|
|
|
bool SendGetPropertyKeys(const ObjectId& objId, const uint32_t& flags,
|
2017-11-06 06:37:28 +03:00
|
|
|
ReturnStatus* rs,
|
|
|
|
nsTArray<JSIDVariant>* ids) override {
|
2014-10-16 20:39:38 +04:00
|
|
|
return Base::SendGetPropertyKeys(objId.serialize(), flags, rs, ids);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2015-03-29 01:22:11 +03:00
|
|
|
bool SendInstanceOf(const ObjectId& objId, const JSIID& iid, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
bool* instanceof) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendInstanceOf(objId.serialize(), iid, rs, instanceof);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2015-03-29 01:22:11 +03:00
|
|
|
bool SendDOMInstanceOf(const ObjectId& objId, const int& prototypeID,
|
|
|
|
const int& depth, ReturnStatus* rs,
|
2017-11-06 06:37:28 +03:00
|
|
|
bool* instanceof) override {
|
2014-10-08 08:32:45 +04:00
|
|
|
return Base::SendDOMInstanceOf(objId.serialize(), prototypeID, depth, rs,
|
|
|
|
instanceof);
|
2014-05-17 03:40:36 +04:00
|
|
|
}
|
2014-05-17 03:40:37 +04:00
|
|
|
|
|
|
|
/* The following code is needed to suppress a bogus MSVC warning (C4250). */
|
|
|
|
|
2017-11-06 06:37:28 +03:00
|
|
|
virtual bool toObjectVariant(JSContext* cx, JSObject* obj,
|
|
|
|
ObjectVariant* objVarp) override {
|
2014-05-17 03:40:37 +04:00
|
|
|
return WrapperOwner::toObjectVariant(cx, obj, objVarp);
|
|
|
|
}
|
2017-11-06 06:37:28 +03:00
|
|
|
virtual JSObject* fromObjectVariant(JSContext* cx,
|
|
|
|
const ObjectVariant& objVar) override {
|
2014-05-17 03:40:37 +04:00
|
|
|
return WrapperOwner::fromObjectVariant(cx, objVar);
|
|
|
|
}
|
2014-05-17 03:40:36 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace jsipc
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif
|