[macruby-changes] [4261] MacRuby/trunk/vm.cpp

source_changes at macosforge.org source_changes at macosforge.org
Tue Jun 22 02:45:58 PDT 2010


Revision: 4261
          http://trac.macosforge.org/projects/ruby/changeset/4261
Author:   lsansonetti at apple.com
Date:     2010-06-22 02:45:54 -0700 (Tue, 22 Jun 2010)
Log Message:
-----------
before acquiring the core lock when resolving a method, make sure the VM object has been created/registered, since it might be needed when adding the method and if called by a foreign thread it might cause a deadlock

Modified Paths:
--------------
    MacRuby/trunk/vm.cpp

Modified: MacRuby/trunk/vm.cpp
===================================================================
--- MacRuby/trunk/vm.cpp	2010-06-22 04:22:17 UTC (rev 4260)
+++ MacRuby/trunk/vm.cpp	2010-06-22 09:45:54 UTC (rev 4261)
@@ -1923,6 +1923,9 @@
 	return false;
     }
 
+    // Make sure the VM is created & registered to avoid a deadlock.
+    GET_VM();
+
     RoxorCoreLock lock;
 
     bool status = false;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100622/9f6b27d7/attachment-0001.html>


More information about the macruby-changes mailing list