Ignore:
Timestamp:
May 1, 2009, 9:52:36 PM (16 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2009-05-01 Sam Weinig <[email protected]>

Roll out JavaScriptCore API number marshaling.

  • API/APICast.h: (toJS): (toRef):
  • API/JSBase.cpp: (JSEvaluateScript): (JSCheckScriptSyntax):
  • API/JSCallbackConstructor.cpp: (JSC::constructJSCallback):
  • API/JSCallbackFunction.cpp: (JSC::JSCallbackFunction::call):
  • API/JSCallbackObjectFunctions.h: (JSC::::getOwnPropertySlot): (JSC::::put): (JSC::::deleteProperty): (JSC::::construct): (JSC::::hasInstance): (JSC::::call): (JSC::::toNumber): (JSC::::toString): (JSC::::staticValueGetter): (JSC::::callbackGetter):
  • API/JSObjectRef.cpp: (JSObjectMakeFunction): (JSObjectMakeArray): (JSObjectMakeDate): (JSObjectMakeError): (JSObjectMakeRegExp): (JSObjectGetPrototype): (JSObjectSetPrototype): (JSObjectGetProperty): (JSObjectSetProperty): (JSObjectGetPropertyAtIndex): (JSObjectSetPropertyAtIndex): (JSObjectDeleteProperty): (JSObjectCallAsFunction): (JSObjectCallAsConstructor):
  • API/JSValueRef.cpp: (JSValueGetType): (JSValueIsUndefined): (JSValueIsNull): (JSValueIsBoolean): (JSValueIsNumber): (JSValueIsString): (JSValueIsObject): (JSValueIsObjectOfClass): (JSValueIsEqual): (JSValueIsStrictEqual): (JSValueIsInstanceOfConstructor): (JSValueMakeUndefined): (JSValueMakeNull): (JSValueMakeBoolean): (JSValueMakeNumber): (JSValueMakeString): (JSValueToBoolean): (JSValueToNumber): (JSValueToStringCopy): (JSValueToObject): (JSValueProtect): (JSValueUnprotect):
  • JavaScriptCore.exp:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
  • JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore_debug.def:
  • runtime/JSNumberCell.cpp:
  • runtime/JSNumberCell.h:
  • runtime/JSValue.h:

WebCore:

2009-05-01 Sam Weinig <[email protected]>

Roll out JavaScriptCore API number marshaling.

  • bindings/js/ScriptValue.cpp: (WebCore::ScriptValue::isEqual):
  • inspector/JavaScriptProfile.cpp: (WebCore::getHeadCallback):
  • inspector/JavaScriptProfileNode.cpp: (WebCore::getChildren): (WebCore::getParent): (WebCore::getHead):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h

    r43130 r43138  
    129129            JSValueRef exception = 0;
    130130            JSValueRef value = getProperty(ctx, thisRef, propertyNameRef.get(), &exception);
    131             exec->setException(toJS(exec, exception));
     131            exec->setException(toJS(exception));
    132132            if (value) {
    133                 slot.setValue(toJS(exec, value));
     133                slot.setValue(toJS(value));
    134134                return true;
    135135            }
     
    170170    JSObjectRef thisRef = toRef(this);
    171171    RefPtr<OpaqueJSString> propertyNameRef;
    172     JSValueRef valueRef = toRef(exec, value);
     172    JSValueRef valueRef = toRef(value);
    173173   
    174174    for (JSClassRef jsClass = classRef(); jsClass; jsClass = jsClass->parentClass) {
     
    179179            JSValueRef exception = 0;
    180180            bool result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception);
    181             exec->setException(toJS(exec, exception));
     181            exec->setException(toJS(exception));
    182182            if (result || exception)
    183183                return;
     
    194194                    JSValueRef exception = 0;
    195195                    bool result = setProperty(ctx, thisRef, propertyNameRef.get(), valueRef, &exception);
    196                     exec->setException(toJS(exec, exception));
     196                    exec->setException(toJS(exception));
    197197                    if (result || exception)
    198198                        return;
     
    229229            JSValueRef exception = 0;
    230230            bool result = deleteProperty(ctx, thisRef, propertyNameRef.get(), &exception);
    231             exec->setException(toJS(exec, exception));
     231            exec->setException(toJS(exception));
    232232            if (result || exception)
    233233                return true;
     
    283283            Vector<JSValueRef, 16> arguments(argumentCount);
    284284            for (int i = 0; i < argumentCount; i++)
    285                 arguments[i] = toRef(exec, args.at(i));
     285                arguments[i] = toRef(args.at(i));
    286286            JSLock::DropAllLocks dropAllLocks(exec);
    287287            JSValueRef exception = 0;
    288288            JSObject* result = toJS(callAsConstructor(execRef, constructorRef, argumentCount, arguments.data(), &exception));
    289             exec->setException(toJS(exec, exception));
     289            exec->setException(toJS(exception));
    290290            return result;
    291291        }
     
    306306            JSLock::DropAllLocks dropAllLocks(exec);
    307307            JSValueRef exception = 0;
    308             bool result = hasInstance(execRef, thisRef, toRef(exec, value), &exception);
    309             exec->setException(toJS(exec, exception));
     308            bool result = hasInstance(execRef, thisRef, toRef(value), &exception);
     309            exec->setException(toJS(exception));
    310310            return result;
    311311        }
     
    338338            Vector<JSValueRef, 16> arguments(argumentCount);
    339339            for (int i = 0; i < argumentCount; i++)
    340                 arguments[i] = toRef(exec, args.at(i));
    341             JSLock::DropAllLocks dropAllLocks(exec);
    342             JSValueRef exception = 0;
    343             JSValue result = toJS(exec, callAsFunction(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception));
    344             exec->setException(toJS(exec, exception));
     340                arguments[i] = toRef(args.at(i));
     341            JSLock::DropAllLocks dropAllLocks(exec);
     342            JSValueRef exception = 0;
     343            JSValue result = toJS(callAsFunction(execRef, functionRef, thisObjRef, argumentCount, arguments.data(), &exception));
     344            exec->setException(toJS(exception));
    345345            return result;
    346346        }
     
    406406            JSValueRef exception = 0;
    407407            JSValueRef value = convertToType(ctx, thisRef, kJSTypeNumber, &exception);
    408             exec->setException(toJS(exec, exception));
     408            exec->setException(toJS(exception));
    409409            if (value) {
    410410                double dValue;
    411                 return toJS(exec, value).getNumber(dValue) ? dValue : NaN;
     411                return toJS(value).getNumber(dValue) ? dValue : NaN;
    412412            }
    413413        }
     
    429429                JSLock::DropAllLocks dropAllLocks(exec);
    430430                value = convertToType(ctx, thisRef, kJSTypeString, &exception);
    431                 exec->setException(toJS(exec, exception));
     431                exec->setException(toJS(exception));
    432432            }
    433433            if (value)
    434                 return toJS(exec, value).getString();
     434                return toJS(value).getString();
    435435            if (exception)
    436436                return "";
     
    476476                    if (!propertyNameRef)
    477477                        propertyNameRef = OpaqueJSString::create(propertyName.ustring());
     478                    JSLock::DropAllLocks dropAllLocks(exec);
    478479                    JSValueRef exception = 0;
    479                     JSValueRef value;
    480                     {
    481                         JSLock::DropAllLocks dropAllLocks(exec);
    482                         value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception);
    483                     }
    484                     exec->setException(toJS(exec, exception));
     480                    JSValueRef value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception);
     481                    exec->setException(toJS(exception));
    485482                    if (value)
    486                         return toJS(exec, value);
     483                        return toJS(value);
    487484                    if (exception)
    488485                        return jsUndefined();
     
    533530            JSValueRef exception = 0;
    534531            JSValueRef value = getProperty(toRef(exec), thisRef, propertyNameRef.get(), &exception);
    535             exec->setException(toJS(exec, exception));
     532            exec->setException(toJS(exception));
    536533            if (value)
    537                 return toJS(exec, value);
     534                return toJS(value);
    538535            if (exception)
    539536                return jsUndefined();
Note: See TracChangeset for help on using the changeset viewer.