Cosmetic improvements to marking of objects during GC
Change-Id: I79a7093c7086ea7f34252f097f18fe7c835053aa Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
This commit is contained in:
parent
c72f973a35
commit
a8ccf32793
|
@ -496,11 +496,12 @@ void Heap::Base::mark(QV4::ExecutionEngine *engine)
|
||||||
|
|
||||||
inline void Value::mark(ExecutionEngine *e)
|
inline void Value::mark(ExecutionEngine *e)
|
||||||
{
|
{
|
||||||
if (!_val)
|
if (!isManaged())
|
||||||
return;
|
return;
|
||||||
Managed *m = as<Managed>();
|
|
||||||
if (m)
|
Heap::Base *o = heapObject();
|
||||||
m->d()->mark(e);
|
if (o)
|
||||||
|
o->mark(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -361,10 +361,10 @@ void MemoryManager::mark()
|
||||||
|
|
||||||
engine->markObjects();
|
engine->markObjects();
|
||||||
|
|
||||||
m_persistentValues->mark(engine);
|
|
||||||
|
|
||||||
collectFromJSStack();
|
collectFromJSStack();
|
||||||
|
|
||||||
|
m_persistentValues->mark(engine);
|
||||||
|
|
||||||
// Preserve QObject ownership rules within JavaScript: A parent with c++ ownership
|
// Preserve QObject ownership rules within JavaScript: A parent with c++ ownership
|
||||||
// keeps all of its children alive in JavaScript.
|
// keeps all of its children alive in JavaScript.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue