Reviewed by rjw.
authorkdecker <kdecker@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jun 2005 18:19:42 +0000 (18:19 +0000)
committerkdecker <kdecker@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 30 Jun 2005 18:19:42 +0000 (18:19 +0000)
fixed: <rdar://problem/4166838> failed assertion in`Interpreter::lockCount() > 0

no layout test added; this is in the bindings code.

        * bindings/objc/WebScriptObject.mm:
        (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): make sure to lock and unlock the interpreter around allocations.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@9549 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/bindings/objc/WebScriptObject.mm

index 6d253ec4502489e1208b3055f2f72d1e54bb1b3a..beadfd07f9a5720ca4e0ab93118c81b620ed4669 100644 (file)
@@ -1,3 +1,14 @@
+2005-06-30  Kevin Decker  <kdecker@apple.com>
+
+        Reviewed by rjw.
+
+       fixed: <rdar://problem/4166838> failed assertion in`Interpreter::lockCount() > 0
+
+       no layout test added; this is in the bindings code.
+
+        * bindings/objc/WebScriptObject.mm:
+        (+[WebScriptObject _convertValueToObjcValue:KJS::originExecutionContext:Bindings::executionContext:Bindings::]): make sure to lock and unlock the interpreter around allocations. 
+
 2005-06-29  Geoffrey Garen  <ggaren@apple.com>
 
        Patch by Francisco Tolmasky <tolmasky@gmail.com>
index 778a31d28633ad3ce44ef4afce87cc150220179f..36b5e0db2c9c302719cd61e37a059ab95b6086bb 100644 (file)
@@ -421,12 +421,15 @@ static KJS::List listFromNSArray(ExecState *exec, NSArray *array)
         ObjectImp *objectImp = static_cast<ObjectImp*>(value.imp());
        Interpreter *intepreter = executionContext->interpreter();
        ExecState *exec = intepreter->globalExec();
-
-       if (objectImp->classInfo() != &KJS::RuntimeObjectImp::info) {
+        Interpreter::lock();
+       
+        if (objectImp->classInfo() != &KJS::RuntimeObjectImp::info) {
            Value runtimeObject = objectImp->get(exec, "__apple_runtime_object");
            if (!runtimeObject.isNull() && runtimeObject.type() == KJS::ObjectType)
                objectImp = static_cast<RuntimeObjectImp*>(runtimeObject.imp());
        }
+        
+        Interpreter::unlock();
 
         if (objectImp->classInfo() == &KJS::RuntimeObjectImp::info) {
             RuntimeObjectImp *imp = static_cast<RuntimeObjectImp *>(objectImp);