Re: libseed-list importer GC bug (was Re: js extensions for native modules)



Ok, thanks!

/Jonatan

Alan Knowles wrote:
Commited in, I changed it to  JSValueProtect, to get rid of the compiler warnings.

Regards
Alan

--- On 29/Jun/2010, Jonatan Liljedahl wrote:
This change exposed another bug: sometimes the object returned from imports.sandbox was screwed up.

The reason this happens is that the GC won't find the module in our cached file_imports hash table, thus allowing the GC to collect it and we'll get a wild pointer in the file_imports cache.

And the reason this never happened before is that it didn't reuse the cached module object but always made a new one for each reference of imports.sandbox.

Solution: protect the module object after adding it to the file_imports cache. Updated patch attached.

I don't know if this should be done for js-modules or gir-modules too?

PS. With this patch the "workaround WebKit GC bug" (which actually was a seed bug) in seed-cairo.c shouldn't be needed anymore.

/Jonatan



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]