Backed out changeset 004d84a6905a (bug 1017862) for assertion failures on a CLOSED TREE

This commit is contained in:
Wes Kocher 2014-05-29 15:49:07 -07:00
parent 0e6e43201a
commit 378a553339
11 changed files with 41 additions and 2 deletions

View File

@ -52,6 +52,7 @@ class CPOWProxyHandler : public BaseProxyHandler
public:
CPOWProxyHandler()
: BaseProxyHandler(&sCPOWProxyHandler) {}
virtual ~CPOWProxyHandler() {}
virtual bool finalizeInBackground(Value priv) MOZ_OVERRIDE {
return false;

View File

@ -88,7 +88,6 @@ BaseProxyHandler::BaseProxyHandler(const void *family)
BaseProxyHandler::~BaseProxyHandler()
{
MOZ_RELEASE_ASSERT(!JSRuntime::hasLiveRuntimes(), "Proxy handler destructor called with live runtimes?");
}
bool
@ -743,6 +742,7 @@ class ScriptedIndirectProxyHandler : public BaseProxyHandler
{
public:
ScriptedIndirectProxyHandler();
virtual ~ScriptedIndirectProxyHandler();
/* ES5 Harmony fundamental proxy traps. */
virtual bool preventExtensions(JSContext *cx, HandleObject proxy) MOZ_OVERRIDE;
@ -804,6 +804,10 @@ ScriptedIndirectProxyHandler::ScriptedIndirectProxyHandler()
{
}
ScriptedIndirectProxyHandler::~ScriptedIndirectProxyHandler()
{
}
bool
ScriptedIndirectProxyHandler::isExtensible(JSContext *cx, HandleObject proxy, bool *extensible)
{
@ -1056,6 +1060,7 @@ ScriptedIndirectProxyHandler ScriptedIndirectProxyHandler::singleton;
class ScriptedDirectProxyHandler : public DirectProxyHandler {
public:
ScriptedDirectProxyHandler();
virtual ~ScriptedDirectProxyHandler();
/* ES5 Harmony fundamental proxy traps. */
virtual bool preventExtensions(JSContext *cx, HandleObject proxy) MOZ_OVERRIDE;
@ -1654,6 +1659,10 @@ ScriptedDirectProxyHandler::ScriptedDirectProxyHandler()
{
}
ScriptedDirectProxyHandler::~ScriptedDirectProxyHandler()
{
}
bool
ScriptedDirectProxyHandler::preventExtensions(JSContext *cx, HandleObject proxy)
{

View File

@ -123,7 +123,7 @@ class JS_FRIEND_API(BaseProxyHandler)
public:
explicit BaseProxyHandler(const void *family);
~BaseProxyHandler();
virtual ~BaseProxyHandler();
bool hasPrototype() {
return mHasPrototype;

View File

@ -133,6 +133,10 @@ Wrapper::Wrapper(unsigned flags, bool hasPrototype) : DirectProxyHandler(&sWrapp
setHasPrototype(hasPrototype);
}
Wrapper::~Wrapper()
{
}
Wrapper Wrapper::singleton((unsigned)0);
Wrapper Wrapper::singletonWithPrototype((unsigned)0, true);
JSObject *Wrapper::defaultProto = TaggedProto::LazyProto;
@ -173,6 +177,10 @@ CrossCompartmentWrapper::CrossCompartmentWrapper(unsigned flags, bool hasPrototy
{
}
CrossCompartmentWrapper::~CrossCompartmentWrapper()
{
}
bool Wrapper::finalizeInBackground(Value priv)
{
if (!priv.isObject())

View File

@ -83,6 +83,8 @@ class JS_FRIEND_API(Wrapper) : public DirectProxyHandler
explicit Wrapper(unsigned flags, bool hasPrototype = false);
virtual ~Wrapper();
virtual bool finalizeInBackground(Value priv) MOZ_OVERRIDE;
static Wrapper singleton;
@ -103,6 +105,8 @@ class JS_FRIEND_API(CrossCompartmentWrapper) : public Wrapper
public:
explicit CrossCompartmentWrapper(unsigned flags, bool hasPrototype = false);
virtual ~CrossCompartmentWrapper();
/* ES5 Harmony fundamental wrapper traps. */
virtual bool preventExtensions(JSContext *cx, HandleObject wrapper) MOZ_OVERRIDE;
virtual bool getPropertyDescriptor(JSContext *cx, HandleObject wrapper, HandleId id,

View File

@ -21,6 +21,11 @@ FilteringWrapper<Base, Policy>::FilteringWrapper(unsigned flags) : Base(flags)
{
}
template <typename Base, typename Policy>
FilteringWrapper<Base, Policy>::~FilteringWrapper()
{
}
template <typename Policy>
static bool
Filter(JSContext *cx, HandleObject wrapper, AutoIdVector &props)

View File

@ -23,6 +23,7 @@ template <typename Base, typename Policy>
class FilteringWrapper : public Base {
public:
FilteringWrapper(unsigned flags);
virtual ~FilteringWrapper();
virtual bool getPropertyDescriptor(JSContext *cx, JS::Handle<JSObject*> wrapper,
JS::Handle<jsid> id,

View File

@ -35,6 +35,10 @@ WaiveXrayWrapper::WaiveXrayWrapper(unsigned flags) : js::CrossCompartmentWrapper
{
}
WaiveXrayWrapper::~WaiveXrayWrapper()
{
}
bool
WaiveXrayWrapper::getPropertyDescriptor(JSContext *cx, HandleObject wrapper,
HandleId id, JS::MutableHandle<JSPropertyDescriptor> desc)

View File

@ -16,6 +16,7 @@ namespace xpc {
class WaiveXrayWrapper : public js::CrossCompartmentWrapper {
public:
WaiveXrayWrapper(unsigned flags);
virtual ~WaiveXrayWrapper();
virtual bool getPropertyDescriptor(JSContext *cx, JS::Handle<JSObject*> wrapper,
JS::Handle<jsid> id,

View File

@ -1619,6 +1619,11 @@ XrayWrapper<Base, Traits>::XrayWrapper(unsigned flags)
Base::setHasPrototype(Traits::HasPrototype);
}
template <typename Base, typename Traits>
XrayWrapper<Base, Traits>::~XrayWrapper()
{
}
namespace XrayUtils {
JSObject *

View File

@ -66,6 +66,7 @@ template <typename Base, typename Traits = XPCWrappedNativeXrayTraits >
class XrayWrapper : public Base {
public:
XrayWrapper(unsigned flags);
virtual ~XrayWrapper();
/* Fundamental proxy traps. */
virtual bool isExtensible(JSContext *cx, JS::Handle<JSObject*> wrapper, bool *extensible) MOZ_OVERRIDE;