Fix object ownership issues between JS and C++

Bug #1482131 reported by Marcus Tomlinson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
unity-js-scopes
Fix Released
Undecided
Alexandre Abreu

Bug Description

One particular issue I noticed is when we return a SearchQuery object from ScopeBase::search(), V8 sees the pointer fall out of scope and deletes it. Whereas what should happen is a transfer of ownership to C++. There are very possibly other places that this sort of thing is happening.

Related branches

Changed in v8-cpp:
assignee: nobody → Marcus Tomlinson (marcustomlinson)
status: New → In Progress
Revision history for this message
Marcus Tomlinson (marcustomlinson) wrote :

I'm now taking the approach of supporting smart pointers across the v8-cpp bridge, so that we can leave the reference counting and cleanup to the builtin RAII functionality of these constructs.

description: updated
Changed in v8-cpp:
status: In Progress → Fix Committed
Changed in unity-js-scopes:
status: New → Fix Committed
Changed in unity-js-scopes:
assignee: nobody → Alexandre Abreu (abreu-alexandre)
Changed in v8-cpp:
status: Fix Committed → Fix Released
Changed in unity-js-scopes:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.