Show
Ignore:
Timestamp:
08/01/08 14:47:24 (5 months ago)
Author:
sroret
Message:

merge with webkit revision 35510

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h

    r424 r427  
    3131#include "JSClassRef.h" 
    3232#include "JSGlobalObject.h" 
    33 #include "JSLock.h" 
    3433#include "JSObjectRef.h" 
    3534#include "JSString.h" 
     
    7473    // initialize from base to derived 
    7574    for (int i = static_cast<int>(initRoutines.size()) - 1; i >= 0; i--) { 
    76         JSLock::DropAllLocks dropAllLocks(exec); 
    7775        JSObjectInitializeCallback initialize = initRoutines[i]; 
    7876        initialize(toRef(exec), toRef(this)); 
     
    113111        // optional optimization to bypass getProperty in cases when we only need to know if the property exists 
    114112        if (JSObjectHasPropertyCallback hasProperty = jsClass->hasProperty) { 
    115             JSLock::DropAllLocks dropAllLocks(exec); 
    116113            if (hasProperty(ctx, thisRef, propertyNameRef)) { 
    117114                slot.setCustom(this, callbackGetter); 
     
    119116            } 
    120117        } else if (JSObjectGetPropertyCallback getProperty = jsClass->getProperty) { 
    121             JSLock::DropAllLocks dropAllLocks(exec); 
    122118            if (JSValueRef value = getProperty(ctx, thisRef, propertyNameRef, toRef(exec->exceptionSlot()))) { 
    123119                // cache the value so we don't have to compute it again 
     
    163159    for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass) { 
    164160        if (JSObjectSetPropertyCallback setProperty = jsClass->setProperty) { 
    165             JSLock::DropAllLocks dropAllLocks(exec); 
    166161            if (setProperty(ctx, thisRef, propertyNameRef, valueRef, toRef(exec->exceptionSlot()))) 
    167162                return; 
     
    173168                    return; 
    174169                if (JSObjectSetPropertyCallback setProperty = entry->setProperty) { 
    175                     JSLock::DropAllLocks dropAllLocks(exec); 
    176170                    if (setProperty(ctx, thisRef, propertyNameRef, valueRef, toRef(exec->exceptionSlot()))) 
    177171                        return; 
     
    209203    for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass) { 
    210204        if (JSObjectDeletePropertyCallback deleteProperty = jsClass->deleteProperty) { 
    211             JSLock::DropAllLocks dropAllLocks(exec); 
    212205            if (deleteProperty(ctx, thisRef, propertyNameRef, toRef(exec->exceptionSlot()))) 
    213206                return true; 
     
    264257            for (int i = 0; i < argumentCount; i++) 
    265258                arguments[i] = toRef(args.at(exec, i)); 
    266             JSLock::DropAllLocks dropAllLocks(exec); 
    267259            return toJS(callAsConstructor(execRef, constructorRef, argumentCount, arguments.data(), toRef(exec->exceptionSlot()))); 
    268260        } 
     
    289281    JSObjectRef thisRef = toRef(this); 
    290282     
    291     for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass) 
    292         if (JSObjectHasInstanceCallback hasInstance = jsClass->hasInstance) { 
    293             JSLock::DropAllLocks dropAllLocks(exec); 
     283    for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass) { 
     284        if (JSObjectHasInstanceCallback hasInstance = jsClass->hasInstance) 
    294285            return hasInstance(execRef, thisRef, toRef(value), toRef(exec->exceptionSlot())); 
    295         } 
    296              
     286    } 
    297287    ASSERT_NOT_REACHED(); // implementsHasInstance should prevent us from reaching here 
    298288    return 0; 
     
    324314            for (int i = 0; i < argumentCount; i++) 
    325315                arguments[i] = toRef(args.at(exec, i)); 
    326             JSLock::DropAllLocks dropAllLocks(exec); 
    327316            return toJS(callAsFunction(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), toRef(exec->exceptionSlot()))); 
    328317        } 
     
    340329     
    341330    for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass) { 
    342         if (JSObjectGetPropertyNamesCallback getPropertyNames = jsClass->getPropertyNames) { 
    343             JSLock::DropAllLocks dropAllLocks(exec); 
     331        if (JSObjectGetPropertyNamesCallback getPropertyNames = jsClass->getPropertyNames) 
    344332            getPropertyNames(execRef, thisRef, toRef(&propertyNames)); 
    345         } 
    346333         
    347334        if (OpaqueJSClassStaticValuesTable* staticValues = jsClass->staticValues(exec)) { 
     
    384371    for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass) 
    385372        if (JSObjectConvertToTypeCallback convertToType = jsClass->convertToType) { 
    386             JSLock::DropAllLocks dropAllLocks(exec); 
    387373            if (JSValueRef value = convertToType(ctx, thisRef, kJSTypeNumber, toRef(exec->exceptionSlot()))) 
    388374                return toJS(value)->getNumber(); 
     
    400386    for (JSClassRef jsClass = m_class; jsClass; jsClass = jsClass->parentClass) 
    401387        if (JSObjectConvertToTypeCallback convertToType = jsClass->convertToType) { 
    402             JSValueRef value; 
    403             { 
    404                 JSLock::DropAllLocks dropAllLocks(exec); 
    405                 value = convertToType(ctx, thisRef, kJSTypeString, toRef(exec->exceptionSlot())); 
    406             } 
     388            JSValueRef value = convertToType(ctx, thisRef, kJSTypeString, toRef(exec->exceptionSlot())); 
    407389            if (value) 
    408390                return toJS(value)->getString(); 
     
    455437            if (StaticValueEntry* entry = staticValues->get(propertyName.ustring().rep())) 
    456438                if (JSObjectGetPropertyCallback getProperty = entry->getProperty) { 
    457                     JSLock::DropAllLocks dropAllLocks(exec); 
    458439                    if (JSValueRef value = getProperty(toRef(exec), thisRef, propertyNameRef, toRef(exec->exceptionSlot()))) 
    459440                        return toJS(value); 
     
    500481    for (JSClassRef jsClass = thisObj->m_class; jsClass; jsClass = jsClass->parentClass) 
    501482        if (JSObjectGetPropertyCallback getProperty = jsClass->getProperty) { 
    502             JSLock::DropAllLocks dropAllLocks(exec); 
    503483            if (JSValueRef value = getProperty(toRef(exec), thisRef, propertyNameRef, toRef(exec->exceptionSlot()))) 
    504484                return toJS(value);