@agoric/captp
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -37,3 +37,3 @@ // This logic was mostly lifted from @agoric/swingset-vat liveSlots.js | ||
const promiseID = lastPromiseID; | ||
slot = `p${promiseID}`; | ||
slot = `p+${promiseID}`; | ||
val.then( | ||
@@ -56,3 +56,3 @@ res => | ||
const exportID = lastExportID; | ||
slot = `o${exportID}`; | ||
slot = `o+${exportID}`; | ||
} | ||
@@ -119,4 +119,6 @@ valToSlot.set(val, slot); | ||
function unserializeSlot(data, slots) { | ||
const slot = slots[Nat(data.index)]; | ||
const theirSlot = slots[Nat(data.index)]; | ||
let val; | ||
const otherDir = theirSlot[1] === '+' ? '-' : '+'; | ||
const slot = `${theirSlot[0]}${otherDir}${theirSlot.slice(2)}`; | ||
if (!slotToVal.has(slot)) { | ||
@@ -133,3 +135,3 @@ // Make a new handled promise for the slot. | ||
// A new promise | ||
imports.set(Number(slot.slice(1)), pr); | ||
imports.set(Number(slot.slice(2)), pr); | ||
val = pr.p; | ||
@@ -136,0 +138,0 @@ } |
{ | ||
"name": "@agoric/captp", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Capability Transfer Protocol for distributed objects", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
287287
8153