Change osapi._registerMethods to 'last one in wins'
Review Request #1211 - Created July 27, 2011 and submitted
While debugging using a container cross-site from where shindig is hosted, I ran into trouble using: config[osapi.container.ServiceConfig.API_PATH] = '/rpc'; config[osapi.container.ServiceConfig.API_HOST] = // A url to a proxy on the host server that points to the shindig server. I found that the osapi.container.Service.prototype.registerOsapiServices function was defining methods that never ended up sticking, because other methods would beat it to the punch. This resulted in the above settings never taking hold.
Tested navigate gadget in a cross-hosted container environment (vanilla web host loading CC from shindig server). Tested navigate gadget in SampleContainer (same host).
Posted (Sept. 14, 2011, 10:16 p.m.)
LGTM Dan. My one concern is that there is existing code that depends on the old behavior. Are there any unit tests around this code? Can you think of any way to figure out if there is any code that depends on the old behavior? Just want to know how certain we are that this is not going to bite us.