Apparently this line of code is triggering "Object expected":
var bPid = (b != null && typeof (b.processId) == "number") ? b.processId : 0;
Unfortunately I can't step through the code in the debugger since this is an intermittent error that shows up in a Windows SideShow gadget that I'm writing. But, I'd imagine someone should be able to tell me how it's even possible to get object expected given all the checks that I'm doing to attempt to prevent something like that.