I think you can use the [method lib](https://github.com/mozilla/addon-sdk/tree/master/lib/method) here.