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)
|
||||
{
|
||||
if (!_val)
|
||||
if (!isManaged())
|
||||
return;
|
||||
Managed *m = as<Managed>();
|
||||
if (m)
|
||||
m->d()->mark(e);
|
||||
|
||||
Heap::Base *o = heapObject();
|
||||
if (o)
|
||||
o->mark(e);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -361,10 +361,10 @@ void MemoryManager::mark()
|
|||
|
||||
engine->markObjects();
|
||||
|
||||
m_persistentValues->mark(engine);
|
||||
|
||||
collectFromJSStack();
|
||||
|
||||
m_persistentValues->mark(engine);
|
||||
|
||||
// Preserve QObject ownership rules within JavaScript: A parent with c++ ownership
|
||||
// keeps all of its children alive in JavaScript.
|
||||
|
||||
|
|
Loading…
Reference in New Issue