Changeset [acc802eaca9d4794f3b2ec1dfe3f42dcce23af57] by Rasmus Andersson

January 6th, 2011 @ 01:45 AM

fixed a nasty little bug with kod->node event emitting where v8 would touch some unguarded memory while creating Value object, thus a race condition existed with the possible outcome of corrupted memory. Bad. The solution in this patch instead retains the passed objc objects and then creates v8 values when reaching the node thread space. Note that this may affect code which pass a mutating argument to an event as the argument might mutate between calling KNodeEmitEvent and the event firing in node (and thus reads the argument)
https://github.com/rsms/kod/commit/acc802eaca9d4794f3b2ec1dfe3f42dc...

Committed by Rasmus Andersson

  • M src/kod_node_interface.h
  • M src/kod_node_interface.mm
New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

A text editor for Mac OS X