Commit 56bbcca0 authored by Philip Chimento's avatar Philip Chimento

atoms: Make destructor explicit to prevent inlining

The GjsAtoms destructor is giant because it calls a JS::Heap destructor
for every atom. If it is generated implicitly, then GCC complains about
it being too big to inline. Providing an explicit destructor seems to
prevent this warning.
parent ba7fb121
......@@ -101,6 +101,7 @@ struct GjsSymbolAtom : GjsAtom {
class GjsAtoms {
public:
explicit GjsAtoms(JSContext* cx) {}
~GjsAtoms(void) {} // prevents giant destructor from being inlined
GJS_JSAPI_RETURN_CONVENTION bool init_atoms(JSContext* cx);
void trace(JSTracer* trc);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment