Bug 890686 - Implement JS_GlobalObjectTraceHook, and install it appropriately. (r=billm)
This commit is contained in:
@@ -1286,7 +1286,12 @@ NewObject(ExclusiveContext *cx, types::TypeObject *type_, JSObject *parent, gc::
|
||||
* This will cancel an already-running incremental GC from doing any more
|
||||
* slices, and it will prevent any future incremental GCs.
|
||||
*/
|
||||
if (clasp->trace && !(clasp->flags & JSCLASS_IMPLEMENTS_BARRIERS)) {
|
||||
bool globalWithoutCustomTrace = clasp->trace == JS_GlobalObjectTraceHook &&
|
||||
!cx->compartment()->options().getTrace();
|
||||
if (clasp->trace &&
|
||||
!globalWithoutCustomTrace &&
|
||||
!(clasp->flags & JSCLASS_IMPLEMENTS_BARRIERS))
|
||||
{
|
||||
if (!cx->shouldBeJSContext())
|
||||
return nullptr;
|
||||
JSRuntime *rt = cx->asJSContext()->runtime();
|
||||
|
||||
Reference in New Issue
Block a user