if (regkey.hasValue(value) == false)
key.init(regkey, relPath, value);
return key; /* Always failing here */
Looking at the terminal, I noticed a strange assertion coming up after the code fails. I asked in #developers, and even sdwilsh (a very knowledgeable and promising character that interned last year) took a stab at it and couldn't find anything obvious. I started losing hope of ever getting this blasted thing working. Looking up the assertion didn't help, and neither did a NS_ENSURE_TRUE warning that were both being fired after the code failing.
I finally had it. It couldn't be the .js file. It had to be something more. But what else is there except the idl interface? I looked, examining each line. Then I noticed something very, very, wrong.
void getKey(in unsigned long root, in string path);
The return value was void. I must have just put void there first because I didn't know what I wanted to call the other interface. I promptly change it to :
nsIWindowsRegistryKey getKey(in unsigned long root, in string path);