This question (and similar ones) is probably better asked in
mozilla.dev.extensions.
That said, for Gecko 1.9.1 the answer is at
https://developer.mozilla.org/En/Updating_extensions_for_Firefox_3.5#Getting_a_load_context_from_a_request
For Gecko 1.9.0 and earlier, the answer is a bit more complicated, but I
believe it's documented...
-Boris