bug 1250486 - make some xpconnect wrapper ctors constexpr to get rid of static constructors r=bz

This commit is contained in:
Trevor Saunders 2016-02-23 07:50:13 -05:00
parent b5f5805e0a
commit 0098eba359
3 changed files with 6 additions and 6 deletions

View File

@ -177,10 +177,6 @@ FilteringWrapper<Base, Policy>::enter(JSContext* cx, HandleObject wrapper,
return true;
}
CrossOriginXrayWrapper::CrossOriginXrayWrapper(unsigned flags) : SecurityXrayDOM(flags)
{
}
bool
CrossOriginXrayWrapper::getPropertyDescriptor(JSContext* cx,
JS::Handle<JSObject*> wrapper,

View File

@ -63,7 +63,9 @@ class FilteringWrapper : public Base {
*/
class CrossOriginXrayWrapper : public SecurityXrayDOM {
public:
explicit CrossOriginXrayWrapper(unsigned flags);
MOZ_CONSTEXPR explicit CrossOriginXrayWrapper(unsigned flags) :
SecurityXrayDOM(flags) {}
virtual bool getOwnPropertyDescriptor(JSContext* cx, JS::Handle<JSObject*> wrapper,
JS::Handle<jsid> id,

View File

@ -61,7 +61,7 @@ enum XrayType {
class XrayTraits
{
public:
XrayTraits() {}
MOZ_CONSTEXPR XrayTraits() {}
static JSObject* getTargetObject(JSObject* wrapper) {
return js::UncheckedUnwrap(wrapper, /* stopAtWindowProxy = */ false);
@ -160,6 +160,8 @@ public:
class DOMXrayTraits : public XrayTraits
{
public:
MOZ_CONSTEXPR DOMXrayTraits() = default;
enum {
HasPrototype = 1
};