mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-10 01:08:21 +00:00
Bug 843337 - No need for getAllocKind in JSObject::finalize anymore; r=jonco
--HG-- extra : rebase_source : d5fdc33b362d7d486579f1934316e00a746a3d13
This commit is contained in:
parent
6541316d0a
commit
32583c75a8
@ -234,19 +234,21 @@ JSObject::finalize(js::FreeOp *fop)
|
||||
{
|
||||
js::Probes::finalizeObject(this);
|
||||
|
||||
#ifdef DEBUG
|
||||
if (!IsBackgroundFinalized(getAllocKind())) {
|
||||
/* Assert we're on the main thread. */
|
||||
fop->runtime()->assertValidThread();
|
||||
|
||||
/*
|
||||
* Finalize obj first, in case it needs map and slots. Objects with
|
||||
* finalize hooks are not finalized in the background, as the class is
|
||||
* stored in the object's shape, which may have already been destroyed.
|
||||
*/
|
||||
js::Class *clasp = getClass();
|
||||
if (clasp->finalize)
|
||||
clasp->finalize(fop, this);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Finalize obj first, in case it needs map and slots. Objects with
|
||||
* finalize hooks are not finalized in the background, as the class is
|
||||
* stored in the object's shape, which may have already been destroyed.
|
||||
*/
|
||||
js::Class *clasp = getClass();
|
||||
if (clasp->finalize)
|
||||
clasp->finalize(fop, this);
|
||||
|
||||
finish(fop);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user