[macruby-changes] [5195] MacRuby/trunk/thread.c
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jan 27 18:59:19 PST 2011
Revision: 5195
http://trac.macosforge.org/projects/ruby/changeset/5195
Author: lsansonetti at apple.com
Date: 2011-01-27 18:59:19 -0800 (Thu, 27 Jan 2011)
Log Message:
-----------
fix a bug in Mutex and ThreadGroup where modifying internal array structures under SAFE level of 4 would raise an exception
Modified Paths:
--------------
MacRuby/trunk/thread.c
Modified: MacRuby/trunk/thread.c
===================================================================
--- MacRuby/trunk/thread.c 2011-01-28 02:58:24 UTC (rev 5194)
+++ MacRuby/trunk/thread.c 2011-01-28 02:59:19 UTC (rev 5195)
@@ -1178,6 +1178,7 @@
sizeof(rb_thread_group_t));
t->enclosed = false;
GC_WB(&t->threads, rb_ary_new());
+ OBJ_UNTRUST(t->threads);
VALUE mutex = mutex_s_alloc(rb_cMutex, 0);
mutex_initialize(mutex, 0);
@@ -1416,6 +1417,7 @@
m->thread = current;
if (current->mutexes == Qnil) {
GC_WB(¤t->mutexes, rb_ary_new());
+ OBJ_UNTRUST(current->mutexes);
}
rb_ary_push(current->mutexes, self);
return Qtrue;
@@ -1447,6 +1449,7 @@
m->thread = current;
if (current->mutexes == Qnil) {
GC_WB(¤t->mutexes, rb_ary_new());
+ OBJ_UNTRUST(current->mutexes);
}
rb_ary_push(current->mutexes, self);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20110127/2872c13f/attachment.html>
More information about the macruby-changes
mailing list