||The Sidebar API for 3rd parties
||No magic constructor behaviour, as is de rigeur for XPCOM.
If you must perform some initialization, and it could possibly fail (even
due to an out-of-memory condition), you should use an Init method, which
can convey failure appropriately (thrown exception in JS,
NS_FAILED(nsresult) return in C++).
In JS, you can actually cheat, because a thrown exception will cause the
CreateInstance call to fail in turn, but not all languages are so lucky.
(Though ANSI C++ provides exceptions, they are verboten in Mozilla code
for portability reasons -- and even when you're building completely
platform-specific code, you can't throw across an XPCOM method boundary.)