----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/795/#review845 -----------------------------------------------------------
Ship it! - Chirag On 2011-05-27 20:06:44, Felix Lee wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/795/ > ----------------------------------------------------------- > > (Updated 2011-05-27 20:06:44) > > > Review request for shindig. > > > Summary > ------- > > osapi initialization requires doing a listMethods rpc, which is asynchronous. > Since osapi isn't ready until that finishes, osapi replaces > gadgets.util.runOnLoadHandlers with its own function that waits for > listMethods to finish before firing off the onload handlers. > > So, the current logic fires onload handlers as soon as two of these three > events happen: > A. the gadget calls runOnLoadHandlers. > B. the listMethods rpc succeeds. > C. 500 ms after calling listMethods. > > The problem with that is, in some cases, B and C happen before A. In > particular, Firefox with Firebug enabled can add enough overhead that B and C > happen before the gadget executes at all, which means the gadget doesn't get > to register its onload handlers in time. The result is the gadget's onload > handlers never get called, and no error is reported. > > This patch fixes the logic so that the runOnLoadHandlers gets called only > after the gadget calls runOnLoadHandlers. > > > Diffs > ----- > > /trunk/features/src/main/javascript/features/osapi/gadgetsrpctransport.js > 1128387 > > Diff: https://reviews.apache.org/r/795/diff > > > Testing > ------- > > 'mvn test' succeeds. > > SocialHelloWorld demo seems to work reliably in Firefox now, even with > Firebug's delay. > > > Thanks, > > Felix > >
