mozilla/addon-sdk — pull request #880 by Mossop (2013-03-20 21:32:08+00:00)
Title: Bug 695143: Implement getTab and getBrowserWindow for getting high-level objects from low-level DOM windows.

No tests yet as I want to figure out if this is the API we're looking for. It implements getTab and getBrowserWindow in the low-level tabs/utils and window/utils modules then defines default implementations that accept an nsIDOMWindow and return the high level object for them. Works nicely but only issue is that window/utils has to require windows in order to ensure the default implementation is attached.

Does this look right to you @gozala?