{"action":"closed","issue":{"url":"https://api.github.com/repos/laverdet/isolated-vm/issues/39","repository_url":"https://api.github.com/repos/laverdet/isolated-vm","labels_url":"https://api.github.com/repos/laverdet/isolated-vm/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/laverdet/isolated-vm/issues/39/comments","events_url":"https://api.github.com/repos/laverdet/isolated-vm/issues/39/events","html_url":"https://github.com/laverdet/isolated-vm/issues/39","id":297145035,"number":39,"title":"Transferable values and errors","user":{"login":"jeromegn","id":43325,"avatar_url":"https://avatars3.githubusercontent.com/u/43325?v=4","gravatar_id":"","url":"https://api.github.com/users/jeromegn","html_url":"https://github.com/jeromegn","followers_url":"https://api.github.com/users/jeromegn/followers","following_url":"https://api.github.com/users/jeromegn/following{/other_user}","gists_url":"https://api.github.com/users/jeromegn/gists{/gist_id}","starred_url":"https://api.github.com/users/jeromegn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeromegn/subscriptions","organizations_url":"https://api.github.com/users/jeromegn/orgs","repos_url":"https://api.github.com/users/jeromegn/repos","events_url":"https://api.github.com/users/jeromegn/events{/privacy}","received_events_url":"https://api.github.com/users/jeromegn/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-14T15:49:31Z","updated_at":"2018-02-18T14:13:53Z","closed_at":"2018-02-18T14:13:53Z","author_association":"CONTRIBUTOR","body":"Is it possible to know beforehand if a value is transferable or not?\r\n\r\nIt appears:\r\n- `string`, `number`, `boolean` types are transferable as-is because they're primitives\r\n- the return value of `ExternalCopy(value).copyInto()` is transferable where value is anything\r\n\r\nIs it possible to detect when a value is transferable? I can check for primitives, but I'm not sure how to tell from a copied `ExternalCopy`. The TypeScript definition says it returns the assigned type `T`, but I'm not sure it can be trusted. Even if it did, how would I know it's already been set as transferable?\r\n\r\nI've started getting promise rejections when using `apply` on an `ivm.Reference<Function>`. I'm wondering if the return value from those functions are passed in. I switched everything to return `undefined`, but I still get the\r\n\r\n```\r\nA non-transferable value was passed\r\n```\r\n\r\nerror if I check `.caught()` on that promise.\r\n\r\nIs it possible this is coming from a different `.apply()` call? Given this package is 100% C++, it is hard to debug, figure out return values and the general flow of things."}}
{"actor":{"display_login":"jeromegn"}}