Bug 880041 (part 22) - Use JSObject::{is,as} for JSFunction. r=sfink.

This commit is contained in:
Nicholas Nethercote
2013-06-17 23:53:49 -07:00
parent ca35558981
commit f2f0c8f8c3
64 changed files with 326 additions and 346 deletions

View File

@@ -538,7 +538,7 @@ CycleCollectedJSRuntime::DescribeGCThing(bool aIsMarked, void* aThing,
// Give the subclass a chance to do something
if (DescribeCustomObjects(obj, clasp, name)) {
// Nothing else to do!
} else if (clasp == &js::FunctionClass) {
} else if (js::IsFunctionObject(obj)) {
JSFunction* fun = JS_GetObjectFunction(obj);
JSString* str = JS_GetFunctionDisplayId(fun);
if (str) {