Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

SetEmbedderData doesn't pin the data #97

Closed
kunalspathak opened this issue Jul 12, 2016 · 0 comments
Closed

SetEmbedderData doesn't pin the data #97

kunalspathak opened this issue Jul 12, 2016 · 0 comments
Assignees

Comments

@kunalspathak
Copy link
Member

kunalspathak commented Jul 12, 2016

SetEmbedderData() can be used to set JsValueRef. Currently we don't pin the objects and it could get collected prematurely. Fix it by calling JsAddRef the value if value is JsValueRef.

@kfarnung kfarnung self-assigned this Jun 14, 2017
@mike-kaufman mike-kaufman self-assigned this Aug 16, 2017
mike-kaufman pushed a commit to mike-kaufman/node-chakracore that referenced this issue Aug 18, 2017
JS Objects passed to SetEmbedderData need to have JsAddRef/JsRelease
called, otherwise they could be GC'd prematurely.

Fixes: nodejs#97
mike-kaufman pushed a commit to mike-kaufman/node-chakracore that referenced this issue Aug 21, 2017
JS Objects passed to SetEmbedderData need to have JsAddRef/JsRelease
called, otherwise they could be GC'd prematurely.

Fixes: nodejs#97

PR-URL: nodejs#374
Reviewed-By: Kyle Farnung <[email protected]>
Reviewed-By: Hitesh Kanwathirtha <[email protected]>
Reviewed-By: Kunal Pathak <[email protected]>
Reviewed-By: Jimmy Thomson <[email protected]>
MSLaguana pushed a commit to MSLaguana/node-chakracore that referenced this issue Sep 25, 2017
JS Objects passed to SetEmbedderData need to have JsAddRef/JsRelease
called, otherwise they could be GC'd prematurely.

Fixes: nodejs#97

PR-URL: nodejs#374
Reviewed-By: Kyle Farnung <[email protected]>
Reviewed-By: Hitesh Kanwathirtha <[email protected]>
Reviewed-By: Kunal Pathak <[email protected]>
Reviewed-By: Jimmy Thomson <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants