Trace the prototype array on the global object.

This commit is contained in:
Josh Matthews 2015-06-01 18:36:57 -04:00
parent c724444ccb
commit 453679fd1f
2 changed files with 18 additions and 3 deletions

View file

@ -4166,9 +4166,13 @@ class CGClassTraceHook(CGAbstractClassHook):
args = [Argument('*mut JSTracer', 'trc'), Argument('*mut JSObject', 'obj')]
CGAbstractClassHook.__init__(self, descriptor, TRACE_HOOK_NAME, 'void',
args)
self.traceGlobal = descriptor.isGlobal()
def generate_code(self):
return CGGeneric("(*this).trace(%s);" % self.args[0].name)
body = [CGGeneric("(*this).trace(%s);" % self.args[0].name)]
if self.traceGlobal:
body += [CGGeneric("trace_global(trc, obj);")]
return CGList(body, "\n")
class CGClassConstructHook(CGAbstractExternMethod):
"""
@ -4770,7 +4774,7 @@ class CGBindingRoot(CGThing):
'dom::bindings::utils::{DOMJSClass, JSCLASS_DOM_GLOBAL}',
'dom::bindings::utils::{find_enum_string_index, get_array_index_from_id}',
'dom::bindings::utils::{get_property_on_prototype, get_proto_or_iface_array}',
'dom::bindings::utils::finalize_global',
'dom::bindings::utils::{finalize_global, trace_global}',
'dom::bindings::utils::has_property_on_prototype',
'dom::bindings::utils::is_platform_object',
'dom::bindings::utils::{Reflectable}',