You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Chris Chabot (JIRA)" <ji...@apache.org> on 2008/10/16 01:12:44 UTC

[jira] Closed: (SHINDIG-515) Bug in requestNavigateTo

     [ https://issues.apache.org/jira/browse/SHINDIG-515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Chabot closed SHINDIG-515.
--------------------------------

    Resolution: Fixed

closing issue, been fixed a long time ago

> 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
>         Attachments: RequestNavigateTo.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> 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.
> A second problem is that the requestNavigateTo function navigates to "http://localhost/canvas". This is because of the function
>    gadgets.IfrGadgetService.prototype.getUrlForView
> which says:
>    "This is a silly implementation that will need to be overriden by almost all real containers"
> and just returns "/canvas" when the gadget requests to navigate to a canvas view.

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