You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by jo...@apache.org on 2008/08/08 02:00:57 UTC
svn commit: r683766 - /incubator/shindig/trunk/features/rpc/rpc.js
Author: johnh
Date: Thu Aug 7 17:00:57 2008
New Revision: 683766
URL: http://svn.apache.org/viewvc?rev=683766&view=rev
Log:
One last legacy packet format fix for gadgets.rpc.
Modified:
incubator/shindig/trunk/features/rpc/rpc.js
Modified: incubator/shindig/trunk/features/rpc/rpc.js
URL: http://svn.apache.org/viewvc/incubator/shindig/trunk/features/rpc/rpc.js?rev=683766&r1=683765&r2=683766&view=diff
==============================================================================
--- incubator/shindig/trunk/features/rpc/rpc.js (original)
+++ incubator/shindig/trunk/features/rpc/rpc.js Thu Aug 7 17:00:57 2008
@@ -276,8 +276,9 @@
* @param {String} serviceName Service name to call.
* @param {String} from Module Id of the calling provider.
* @param {Object} rpcData The RPC data for this call.
+ * @param {Array.<Object>} callArgs Original arguments to call()
*/
- function callFrameElement(targetId, serviceName, from, rpcData) {
+ function callFrameElement(targetId, serviceName, from, rpcData, callArgs) {
try {
if (from != '..') {
// Call from gadget to the container.
@@ -313,7 +314,7 @@
// If we have reached this point, something has failed
// with the FrameElement method, so we default to using
// IFPC for this call.
- callIfpc(targetId, serviceName, from, rpcData);
+ callIfpc(targetId, serviceName, from, rpcData, callArgs);
}
/**
@@ -325,8 +326,9 @@
* @param {String} serviceName Service name to call.
* @param {String} from Module Id of the calling provider.
* @param {Object} rpcData The RPC data for this call.
+ * @param {Array.<Object>} callArgs Original arguments to call()
*/
- function callIfpc(targetId, serviceName, from, rpcData) {
+ function callIfpc(targetId, serviceName, from, rpcData, callArgs) {
// Retrieve the relay file used by IFPC. Note that
// this must be set before the call, and so we conduct
// an extra check to ensure it is not blank.
@@ -342,7 +344,7 @@
// Format: #iframe_id&callId&num_packets&packet_num&block_of_data
src = [relay, '#', encodeLegacyData([from, callId, 1, 0,
encodeLegacyData([from, serviceName, '', '', from].concat(
- Array.prototype.slice.call(arguments, 3)))])].join('');
+ callArgs))])].join('');
} else {
// Format: #targetId & sourceId@callId & packetNum & packetId & packetData
src = [relay, '#', targetId, '&', from, '@', callId,
@@ -596,11 +598,11 @@
break;
case 'fe': // use FrameElement.
- callFrameElement(targetId, serviceName, from, rpcData);
+ callFrameElement(targetId, serviceName, from, rpcData, rpc.a);
break;
default: // use 'ifpc' as a fallback mechanism.
- callIfpc(targetId, serviceName, from, rpcData);
+ callIfpc(targetId, serviceName, from, rpcData, rpc.a);
break;
}
},