mirror of
https://github.com/roytam1/palemoon27.git
synced 2026-05-26 23:06:52 +00:00
2b0b985a18
- pointer style (4cb5b536b)
- Bug 1186696. Event handlers on JS-implemented webidl interfaces should have the same behavior as other event handlers: accept all values, convert non-objects to null. r=smaug (f61a308fb)
- Bug 983301 part 1. Handle JS-to-native conversion for Promise values via calling Promise::Resolve on whatever value was passed in (except if the type is nullable and the passed-in value is null or undefined). r=peterv (4aaf04c66)
- Bug 983301 part 2. Change Promise to not be distinguishable from any other type. r=peterv (0f463a834)
- Bug 1157848 - Fix leak in OwningNonNull constructor from already_AddRefed; r=bz (a2a0aaa7a)
- Bug 983301 Add a test for FetchEvent.respondWith(5). r=bz (5de2ea7d5)
- Bug 1166932 - Part 1: Copy the editor observers array before iterating over it; r=roc (db74b264d)
- Bug 1166932 - Part 2: Make sure that nsTextInputListener doesn't try to perform edit actions if it has been disconnected from the editor object; r=roc (7143bc782)
- Bug 1190823 - Move OwningNonNull.h to xpcom/base/; r=froydnj (77c373751)
- Bug 1163044 - Forward NS_MOUSE_ENTER_WIDGET into content process. r=smaug (46fcb7720)
- Bug 1182358 - RequestSyncService.jsm should use AlarmService instead nsITimer, r=nsm (d0eb0bcd4)
- Bug 1142609 - Fix PEP 8 E111/E113 warnings in dom/bindings's Python code. r=peterv (56bc4b865)
- Bug 1142609 - Fix PEP 8 E121 warnings in dom/bindings's Python code. r=peterv (93f8021f6)
- Bug 1142609 - Fix flake8's E122 warnings in dom/bindings's Python code. r=peterv (32f4cb3a2)
- Bug 1142609 - Fix PEP 8 E126 warnings in dom/bindings's Python code. r=peterv (fd7710f34)
- Bug 1142609 - Fix PEP 8 E124 warnings in dom/bindings's Python code. r=peterv (20d26ce01)
- Bug 1142609 - Fix PEP 8 E125 warnings in dom/bindings's Python code. r=peterv (817ae2eb6)
- Bug 1142609 - Fix PEP 8 E127 warnings in dom/bindings's Python code. r=peterv (031b0026f)
- Bug 1142609 - Fix PEP 8 E128 warnings in dom/bindings's Python code. r=peterv (ec4ab550e)
- Bug 1142609 - Fix PEP 8 E2xx warnings in dom/bindings's Python code. r=peterv (0a65500d3)
- Bug 1157588. Produce a better error message when someone tries to pass a mixin as an argument. r=peterv (33d91a9b0)
- Bug 1142609 - Fix PEP 8 E3xx warnings in dom/bindings's Python code. r=peterv (0cd9b0613)
- Bug 1176236. Make typed array arguments work for constructors of JS-implemented interfaces. r=peterv (31e3d3c82)
- Bug 1162956 part 1. Move forwardDeclareForType to be a method on ForwardDeclarationBuilder. r=peterv (8f5f3ff49)
- Bug 1162956 part 2. Forward-declare things as needed in example codegen. Also, use js/TypeDecls.h for the JSContext declaration and include BindingDeclarations.h so we get things like Optional (which are a pain to forward-declare). r=peterv (9192d061b)
- Bug 1166443. Example codegen should output the right signature for Wrap() when the object is not wrappercached. r=peterv (12ca80503)
- Bug 1177869. Fix example codegen to output the correct return type for WrapObject in the non-wrappercached case. r=peterv (0c44da02c)
- Bug 1025395. Output a #error instead of a nonexistent macro for the CC bits of example codegen, to make it clearer to people using it what they should do with CC. r=peterv (75dce91d4)
- Bug 1173913. Indicate what webidl generated files were generated from, if they were generated for a particular webidl file. r=peterv (aaa86dbe8)
- Bug 1165182 - Stop LE scans when Bluetooth adapter is disconnected from its owner. r=joliu (6a3dbc1ae)
- Bug 1176898 - Remove redundant DisconnectFromOwner of BluetoothDiscoveryHandle. r=btian (7ddae05ad)
- Bug 1156716: Build GATT HAL helpers in Bluetooth v1, r=joliu (0572f1af1)
- Bug 1163499 - Part 1: Revise BluetoothGattInterface and result handler for daemon support. r=tzimmermann (e40f7703f)
- Bug 1163499 - Part 2: Add helpers for Bluetooth daemon GATT client support. r=tzimmermann (9c52b9b0b)
- Bug 1163499 - Part 3: Add GATT module for Bluetooth daemon. r=tzimmermann (730394aac)
- Bug 1163499 - Part 4: Add GATT and GATT client interfaces for Bluetooth daemon. r=tzimmermann (7aefc1c20)
- Bug 1163499 - Part 5: Support GATT profile when using Bluetooth daemon. r=tzimmermann (4e71b4901)
- Bug 1148506: Remove unused variable 'bool result' from code generated by getDeleterBody(), in Codegen.py. r=jorendorff (aa31f486d)
- Bug 1170971 - Part 1: Fix BluetoothGattReadParam unpacking in daemon backend. r=tzimmermann (78e8facce)
- Bug 1142609 - Fix PEP 8 E5xx warnings in dom/bindings's Python code. r=peterv (08f5edc45)
- Bug 1142609 - Fix PEP 8 E7xx warnings in dom/bindings's Python code. r=peterv (7fc970bff)
- Bug 1170971 - Part 2: Fix BluetoothGattAdvData unpacking in daemon backend. r=tzimmermann (4285509b2)
- Bug 603201 - Enable primitive receivers in [[Set]]. r=jorendorff (726d46b63)
- Bug 1174717 - Passing fallible when calling AppendElement method for Sequence types in bluetooth2. r=shuang (557d92545)
- pointer style (8f7275cf4)
- Bug 1192297 - Rephrase Proxy static methods to make it clearer that the handler->hasPrototype() case is the weird case. r=Waldo. (2e68353c3)
- Bug 1105045 - Outerize the receiver passed to proxy hooks. r=efaust. (c00a1db2f)
- Bug 603201 - Change GetProperty receiver argument to Value in JS. r=efaust (f5a87f31b)
- Bug 603201 - Change GetProperty receiver argument to Value in the browser. r=smaug (0b871d846)
- Bug 1175173 - Don't box primitive this values in {Object, Array}.prototype.toLocaleString. r=till (11a66b2b6)
- Bug 1179141 - Remove macro |BT_API2_LOGR|, r=joliu (792fbcde8)
- Bug 1161991: Gatt server neutral-backend interface; r=jocelyn (f093551c3)
221 lines
10 KiB
C++
221 lines
10 KiB
C++
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
* vim: set ts=8 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/. */
|
|
|
|
#ifndef mozilla_jsipc_JavaScriptBase_h__
|
|
#define mozilla_jsipc_JavaScriptBase_h__
|
|
|
|
#include "WrapperAnswer.h"
|
|
#include "WrapperOwner.h"
|
|
#include "mozilla/dom/DOMTypes.h"
|
|
#include "mozilla/jsipc/PJavaScript.h"
|
|
|
|
namespace mozilla {
|
|
namespace jsipc {
|
|
|
|
template<class Base>
|
|
class JavaScriptBase : public WrapperOwner, public WrapperAnswer, public Base
|
|
{
|
|
typedef WrapperAnswer Answer;
|
|
|
|
public:
|
|
explicit JavaScriptBase(JSRuntime* rt)
|
|
: JavaScriptShared(rt),
|
|
WrapperOwner(rt),
|
|
WrapperAnswer(rt)
|
|
{}
|
|
virtual ~JavaScriptBase() {}
|
|
|
|
virtual void ActorDestroy(WrapperOwner::ActorDestroyReason why) {
|
|
WrapperOwner::ActorDestroy(why);
|
|
}
|
|
|
|
/*** IPC handlers ***/
|
|
|
|
bool RecvPreventExtensions(const uint64_t &objId, ReturnStatus* rs) {
|
|
return Answer::RecvPreventExtensions(ObjectId::deserialize(objId), rs);
|
|
}
|
|
bool RecvGetPropertyDescriptor(const uint64_t& objId, const JSIDVariant& id,
|
|
ReturnStatus* rs,
|
|
PPropertyDescriptor* out) {
|
|
return Answer::RecvGetPropertyDescriptor(ObjectId::deserialize(objId), id, rs, out);
|
|
}
|
|
bool RecvGetOwnPropertyDescriptor(const uint64_t& objId,
|
|
const JSIDVariant& id,
|
|
ReturnStatus* rs,
|
|
PPropertyDescriptor* out) {
|
|
return Answer::RecvGetOwnPropertyDescriptor(ObjectId::deserialize(objId), id, rs, out);
|
|
}
|
|
bool RecvDefineProperty(const uint64_t& objId, const JSIDVariant& id,
|
|
const PPropertyDescriptor &flags, ReturnStatus *rs) {
|
|
return Answer::RecvDefineProperty(ObjectId::deserialize(objId), id, flags, rs);
|
|
}
|
|
bool RecvDelete(const uint64_t& objId, const JSIDVariant& id,
|
|
ReturnStatus *rs) {
|
|
return Answer::RecvDelete(ObjectId::deserialize(objId), id, rs);
|
|
}
|
|
|
|
bool RecvHas(const uint64_t& objId, const JSIDVariant& id,
|
|
ReturnStatus* rs, bool* bp) {
|
|
return Answer::RecvHas(ObjectId::deserialize(objId), id, rs, bp);
|
|
}
|
|
bool RecvHasOwn(const uint64_t& objId, const JSIDVariant& id,
|
|
ReturnStatus* rs, bool* bp) {
|
|
return Answer::RecvHasOwn(ObjectId::deserialize(objId), id, rs, bp);
|
|
}
|
|
bool RecvGet(const uint64_t& objId, const JSVariant& receiverVar, const JSIDVariant& id,
|
|
ReturnStatus* rs, JSVariant* result) {
|
|
return Answer::RecvGet(ObjectId::deserialize(objId), receiverVar, id, rs, result);
|
|
}
|
|
bool RecvSet(const uint64_t& objId, const JSIDVariant& id, const JSVariant& value,
|
|
const JSVariant& receiverVar, ReturnStatus* rs) {
|
|
return Answer::RecvSet(ObjectId::deserialize(objId), id, value, receiverVar, rs);
|
|
}
|
|
|
|
bool RecvIsExtensible(const uint64_t& objId, ReturnStatus* rs,
|
|
bool* result) {
|
|
return Answer::RecvIsExtensible(ObjectId::deserialize(objId), rs, result);
|
|
}
|
|
bool RecvCallOrConstruct(const uint64_t& objId, InfallibleTArray<JSParam>&& argv,
|
|
const bool& construct, ReturnStatus* rs, JSVariant* result,
|
|
nsTArray<JSParam>* outparams) {
|
|
return Answer::RecvCallOrConstruct(ObjectId::deserialize(objId), Move(argv), construct, rs, result, outparams);
|
|
}
|
|
bool RecvHasInstance(const uint64_t& objId, const JSVariant& v, ReturnStatus* rs, bool* bp) {
|
|
return Answer::RecvHasInstance(ObjectId::deserialize(objId), v, rs, bp);
|
|
}
|
|
bool RecvObjectClassIs(const uint64_t& objId, const uint32_t& classValue,
|
|
bool* result) {
|
|
return Answer::RecvObjectClassIs(ObjectId::deserialize(objId), classValue, result);
|
|
}
|
|
bool RecvClassName(const uint64_t& objId, nsString* result) {
|
|
return Answer::RecvClassName(ObjectId::deserialize(objId), result);
|
|
}
|
|
bool RecvGetPrototype(const uint64_t& objId, ReturnStatus* rs, ObjectOrNullVariant* result) {
|
|
return Answer::RecvGetPrototype(ObjectId::deserialize(objId), rs, result);
|
|
}
|
|
bool RecvRegExpToShared(const uint64_t& objId, ReturnStatus* rs, nsString* source, uint32_t* flags) {
|
|
return Answer::RecvRegExpToShared(ObjectId::deserialize(objId), rs, source, flags);
|
|
}
|
|
|
|
bool RecvGetPropertyKeys(const uint64_t& objId, const uint32_t& flags,
|
|
ReturnStatus* rs, nsTArray<JSIDVariant>* ids) {
|
|
return Answer::RecvGetPropertyKeys(ObjectId::deserialize(objId), flags, rs, ids);
|
|
}
|
|
bool RecvInstanceOf(const uint64_t& objId, const JSIID& iid,
|
|
ReturnStatus* rs, bool* instanceof) {
|
|
return Answer::RecvInstanceOf(ObjectId::deserialize(objId), iid, rs, instanceof);
|
|
}
|
|
bool RecvDOMInstanceOf(const uint64_t& objId, const int& prototypeID, const int& depth,
|
|
ReturnStatus* rs, bool* instanceof) {
|
|
return Answer::RecvDOMInstanceOf(ObjectId::deserialize(objId), prototypeID, depth, rs, instanceof);
|
|
}
|
|
|
|
bool RecvDropObject(const uint64_t& objId) {
|
|
return Answer::RecvDropObject(ObjectId::deserialize(objId));
|
|
}
|
|
|
|
/*** Dummy call handlers ***/
|
|
|
|
bool SendDropObject(const ObjectId &objId) {
|
|
return Base::SendDropObject(objId.serialize());
|
|
}
|
|
bool SendPreventExtensions(const ObjectId& objId, ReturnStatus* rs) {
|
|
return Base::SendPreventExtensions(objId.serialize(), rs);
|
|
}
|
|
bool SendGetPropertyDescriptor(const ObjectId &objId, const JSIDVariant& id,
|
|
ReturnStatus* rs,
|
|
PPropertyDescriptor* out) {
|
|
return Base::SendGetPropertyDescriptor(objId.serialize(), id, rs, out);
|
|
}
|
|
bool SendGetOwnPropertyDescriptor(const ObjectId& objId,
|
|
const JSIDVariant& id,
|
|
ReturnStatus* rs,
|
|
PPropertyDescriptor* out) {
|
|
return Base::SendGetOwnPropertyDescriptor(objId.serialize(), id, rs, out);
|
|
}
|
|
bool SendDefineProperty(const ObjectId& objId, const JSIDVariant& id,
|
|
const PPropertyDescriptor& flags,
|
|
ReturnStatus *rs) {
|
|
return Base::SendDefineProperty(objId.serialize(), id, flags, rs);
|
|
}
|
|
bool SendDelete(const ObjectId& objId, const JSIDVariant& id, ReturnStatus* rs) {
|
|
return Base::SendDelete(objId.serialize(), id, rs);
|
|
}
|
|
|
|
bool SendHas(const ObjectId& objId, const JSIDVariant& id,
|
|
ReturnStatus* rs, bool* bp) {
|
|
return Base::SendHas(objId.serialize(), id, rs, bp);
|
|
}
|
|
bool SendHasOwn(const ObjectId& objId, const JSIDVariant& id,
|
|
ReturnStatus* rs, bool* bp) {
|
|
return Base::SendHasOwn(objId.serialize(), id, rs, bp);
|
|
}
|
|
bool SendGet(const ObjectId& objId, const JSVariant& receiverVar, const JSIDVariant& id,
|
|
ReturnStatus* rs, JSVariant* result) {
|
|
return Base::SendGet(objId.serialize(), receiverVar, id, rs, result);
|
|
}
|
|
bool SendSet(const ObjectId& objId, const JSIDVariant& id, const JSVariant& value,
|
|
const JSVariant& receiverVar, ReturnStatus* rs) {
|
|
return Base::SendSet(objId.serialize(), id, value, receiverVar, rs);
|
|
}
|
|
|
|
bool SendIsExtensible(const ObjectId& objId, ReturnStatus* rs,
|
|
bool* result) {
|
|
return Base::SendIsExtensible(objId.serialize(), rs, result);
|
|
}
|
|
bool SendCallOrConstruct(const ObjectId& objId, const nsTArray<JSParam>& argv,
|
|
const bool& construct, ReturnStatus* rs, JSVariant* result,
|
|
nsTArray<JSParam>* outparams) {
|
|
return Base::SendCallOrConstruct(objId.serialize(), argv, construct, rs, result, outparams);
|
|
}
|
|
bool SendHasInstance(const ObjectId& objId, const JSVariant& v, ReturnStatus* rs, bool* bp) {
|
|
return Base::SendHasInstance(objId.serialize(), v, rs, bp);
|
|
}
|
|
bool SendObjectClassIs(const ObjectId& objId, const uint32_t& classValue,
|
|
bool* result) {
|
|
return Base::SendObjectClassIs(objId.serialize(), classValue, result);
|
|
}
|
|
bool SendClassName(const ObjectId &objId, nsString* result) {
|
|
return Base::SendClassName(objId.serialize(), result);
|
|
}
|
|
bool SendGetPrototype(const ObjectId &objId, ReturnStatus* rs, ObjectOrNullVariant* result) {
|
|
return Base::SendGetPrototype(objId.serialize(), rs, result);
|
|
}
|
|
|
|
bool SendRegExpToShared(const ObjectId& objId, ReturnStatus* rs,
|
|
nsString* source, uint32_t* flags) {
|
|
return Base::SendRegExpToShared(objId.serialize(), rs, source, flags);
|
|
}
|
|
|
|
bool SendGetPropertyKeys(const ObjectId& objId, const uint32_t& flags,
|
|
ReturnStatus *rs, nsTArray<JSIDVariant> *ids) {
|
|
return Base::SendGetPropertyKeys(objId.serialize(), flags, rs, ids);
|
|
}
|
|
bool SendInstanceOf(const ObjectId& objId, const JSIID& iid,
|
|
ReturnStatus* rs, bool* instanceof) {
|
|
return Base::SendInstanceOf(objId.serialize(), iid, rs, instanceof);
|
|
}
|
|
bool SendDOMInstanceOf(const ObjectId& objId, const int& prototypeID, const int& depth,
|
|
ReturnStatus* rs, bool* instanceof) {
|
|
return Base::SendDOMInstanceOf(objId.serialize(), prototypeID, depth, rs, instanceof);
|
|
}
|
|
|
|
/* The following code is needed to suppress a bogus MSVC warning (C4250). */
|
|
|
|
virtual bool toObjectVariant(JSContext* cx, JSObject* obj, ObjectVariant* objVarp) {
|
|
return WrapperOwner::toObjectVariant(cx, obj, objVarp);
|
|
}
|
|
virtual JSObject* fromObjectVariant(JSContext* cx, ObjectVariant objVar) {
|
|
return WrapperOwner::fromObjectVariant(cx, objVar);
|
|
}
|
|
};
|
|
|
|
} // namespace jsipc
|
|
} // namespace mozilla
|
|
|
|
#endif
|