Bug in requestNavigateTo
------------------------

                 Key: SHINDIG-515
                 URL: https://issues.apache.org/jira/browse/SHINDIG-515
             Project: Shindig
          Issue Type: Bug
          Components: Features (Javascript)
            Reporter: Erel Segal
            Priority: Critical


While trying to run a real open-social application (TypeRacer) on Shindig, 
After some tracing, I think I found a bug.

When calling an RPC service, execution arrives at rpc.js, to the function
   function process(rpc)

In that function, there is a line:
   var result = service.apply(rpc, rpc.a);

Where :
 * service is a function, typically registered by gadgets.IfrGadgetService, in 
this case, it is the function   
gadgets.IfrGadgetService.prototype.requestNavigateTo
 * rpc is a struct containing 5 fields related to the request (s, f, c, a, t).

According to the Javascript documentation:
   
http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Function:apply

The "apply" function takes two arguments: the first it the "this" variable and 
the second is the array of arguments.

So, in this case, the "this" variable is the rpc struct, but it is passed to a 
function that belongs to the gadgets.IfrGadgetService class!

This causes an obvious Javascript error on requestNavigateTo.



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to