Bug 757375: Concurrency bug fix (p=dtomack)
authorDan Schaffer <Dan.Schaffer@adobe.com>
Fri, 09 Nov 2012 13:57:41 -0800
changeset 7578 7828d521c9a0
parent 7577 f9f60574f375
child 7579 a0c3dd2231e9
push id4262
push userdschaffe@adobe.com
push dateWed, 30 Jan 2013 19:01:31 +0000
bugs757375, 1130666, 1134637
Bug 757375: Concurrency bug fix (p=dtomack) integrate 1130666 CL@1134637
shell/avmshell.cpp
--- a/shell/avmshell.cpp
+++ b/shell/avmshell.cpp
@@ -109,25 +109,27 @@ namespace avmshell
             if (instance->settings.do_log)
               initializeLogging(instance->settings.numfiles > 0 ? instance->settings.filenames[0] : "AVMLOG");
 
 #ifdef VMCFG_WORKERTHREADS
             if (instance->settings.numworkers == 1 && instance->settings.numthreads == 1 && instance->settings.repeats == 1) 
             {
                 avmplus::Isolate* isolate = instance->newIsolate(NULL); 
                 instance->stateTransition(isolate, avmplus::Isolate::CANSTART);
+				isolate->IncrementRef();
                 isolate->run();
             }
             else
             {
                 instance->multiWorker(instance->settings);
             }
 #else
             avmplus::Isolate* isolate = instance->newIsolate(NULL); 
             instance->stateTransition(isolate, avmplus::Isolate::CANSTART);
+			isolate->IncrementRef();
 			isolate->run();
 #endif
             instance->waitUntilNoIsolates();
             // Shell is refcounted now
             //mmfx_delete(instance);
         }
 
         MMgc::GCHeap::Destroy();