Page MenuHomePhabricator

eo js leak
Open, NormalPublic

Description

returning Eo* object (any Eo*) will cause a permanent reference leak at the point of execution. leak includes execution context. if you consider example

(which is from T4422 modified to use c[j] for something in the closure - forcing v8 to bind upper context to the loop) it will never be freed even if unrefed. also it will keep the context from being destroyed. please note significant rise in v8 heap.

issue is different from T4422 as it deals strictly with Eo* objects being return and here Persistent's are not really the case.

Related Objects

buniofh created this task.Sep 28 2016, 8:13 AM
buniofh added a comment.EditedSep 28 2016, 8:18 AM

fix:

also you might consider removing efl::eina::js::make_leak() form efl::eo::js::construct_from_eo(). this call is redundant because all returned values eitherway go through efl::eina::js::get_value_from_c() and proper clean ups are set there. this is required after all for eo based events

buniofh updated the task description. (Show Details)Sep 28 2016, 8:19 AM
stefan_schmidt triaged this task as Normal priority.Feb 10 2017, 6:45 AM
zmike edited projects, added Restricted Project; removed efl.Jun 11 2018, 6:54 AM
zmike removed a project: Restricted Project.Jun 11 2018, 9:24 AM