[macruby-changes] [3272] MacRuby/trunk/dispatcher.cpp
source_changes at macosforge.org
source_changes at macosforge.org
Wed Jan 13 18:11:40 PST 2010
Revision: 3272
http://trac.macosforge.org/projects/ruby/changeset/3272
Author: lsansonetti at apple.com
Date: 2010-01-13 18:11:36 -0800 (Wed, 13 Jan 2010)
Log Message:
-----------
do not uncache a block if the context (self) is different
Modified Paths:
--------------
MacRuby/trunk/dispatcher.cpp
Modified: MacRuby/trunk/dispatcher.cpp
===================================================================
--- MacRuby/trunk/dispatcher.cpp 2010-01-14 01:37:23 UTC (rev 3271)
+++ MacRuby/trunk/dispatcher.cpp 2010-01-14 02:11:36 UTC (rev 3272)
@@ -1455,7 +1455,10 @@
{
void *key = (void *)b->imp;
std::map<void *, rb_vm_block_t *>::iterator iter = blocks.find(key);
- if (iter == blocks.end()) {
+ if (iter == blocks.end() || iter->second->self != b->self) {
+ if (iter != blocks.end()) {
+ GC_RELEASE(iter->second);
+ }
b = dup_block(b);
GC_RETAIN(b);
blocks[key] = b;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100113/00401796/attachment.html>
More information about the macruby-changes
mailing list