bug 736978 - remove JS_FinalizeStub. r=:billm

Currently the GC finalizes on the background thread only objects with null
JSClass::finalize. However, this implies that any object that uses
JS_FinalizeStub for the finalizer would be prevented from the background
finalization.

To fix this the patch removes JS_FinalizeStub replacing it with NULL in all
cases when the class has no custom finalizer. For style consistency the patch
also removed the usage of JSCLASS_NO_OPTIONAL_MEMBERS in the static
declarations as the compiler fills the missing fields with null in any cases.
This commit is contained in:
Igor Bukanov
2012-03-19 15:27:58 +01:00
parent 652d59fcff
commit 62a47e535b
32 changed files with 67 additions and 120 deletions

View File

@@ -13,9 +13,7 @@ JSClass global_class = {
JS_StrictPropertyStub,
JS_EnumerateStub,
JS_ResolveStub,
JS_ConvertStub,
JS_FinalizeStub,
JSCLASS_NO_OPTIONAL_MEMBERS
JS_ConvertStub
};
JS::Anchor<JSObject *> trusted_glob, trusted_fun;