I’ve been bitten by this a dozen times over the years. I try to find a simple data interface for getting a bunch of strings out, and I see nsIPropertyBag. I think to myself, “Hmm. That’s a pretty good choice.” Then I implement it, watch it QueryInterface for my component, and then watch it not call my getProperty() method. Why? XPConnect returns its own nsIPropertyBag object first when I try to call getProperty(). So my call goes to a different object than the one I intended.
I never, ever learn.
You can still use nsIPropertyBag, but just remember that xpconnect maps x->GetProperty(foo) to x[foo].
Doesn’t the XPConnect interface just expose all your JS object’s properties via the property bag?
That said, not forwarding to the “real” property bag sounds like a bug to me. Filed?