[
https://issues.apache.org/jira/browse/SHINDIG-515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Erel Segal updated SHINDIG-515:
-------------------------------
Attachment: RequestNavigateTo.patch
The patch contains 4 files:
* 2 new files that demonstrate the bug, and may also be useful as samples -
view_navigation_sample.xml (a sample gadget) and view_navigation_sample.html (a
sample container).
* Correction to gadgets.js - rewriting the requestNavigateTo to use a more
realistic URL. This may have to change in real containers, but I think it is
better than the current version.
* Work-around to rpc.js - for calling requestNavigateTo with the real "this"
variable. It works, but It's probably not the correct solution - please check.
> 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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.