Bug 1102329 - Fix unchecked downcast to JSFunction, r=jandem.