Bug 1286108 - Do not provide construction methods for JS::ubi::TracerConcrete[WithCompartment]; r=jimb

These are supposed to be helper base classes that should not be instantiated
directly, so we shouldn't let it be possible to Concrete<T>::construct() them.

--HG--
extra : rebase_source : 1a136d2c9eee11c7bd5b0c96e596a43454aefcfa
This commit is contained in:
Nick Fitzgerald 2016-07-12 07:49:00 +02:00
parent 941244dcc8
commit 41cca25d10

View File

@ -1025,9 +1025,6 @@ class TracerConcrete : public Base {
protected:
explicit TracerConcrete(Referent* ptr) : Base(ptr) { }
Referent& get() const { return *static_cast<Referent*>(ptr); }
public:
static void construct(void* storage, Referent* ptr) { new (storage) TracerConcrete(ptr); }
};
// For JS::TraceChildren-based types that have a 'compartment' method.
@ -1038,11 +1035,6 @@ class TracerConcreteWithCompartment : public TracerConcrete<Referent> {
protected:
explicit TracerConcreteWithCompartment(Referent* ptr) : TracerBase(ptr) { }
public:
static void construct(void* storage, Referent* ptr) {
new (storage) TracerConcreteWithCompartment(ptr);
}
};
// Define specializations for some commonly-used public JSAPI types.