Changeset 37684 in webkit for trunk/JavaScriptCore/API


Ignore:
Timestamp:
Oct 18, 2008, 6:52:42 PM (17 years ago)
Author:
Darin Adler
Message:

JavaScriptCore:

2008-10-18 Darin Adler <Darin Adler>

Reviewed by Cameron Zwarich.

Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
changing JSValuePtr to be a class, and then eventually renaming it
to JSValue once that's done.

  • JavaScriptCore.exp: Update entry points, since some now take JSValue* instead of const JSValue*.
  • API/APICast.h:
  • API/JSCallbackConstructor.h:
  • API/JSCallbackFunction.cpp:
  • API/JSCallbackFunction.h:
  • API/JSCallbackObject.h:
  • API/JSCallbackObjectFunctions.h:
  • API/JSContextRef.cpp:
  • API/JSObjectRef.cpp:
  • API/JSValueRef.cpp:
  • VM/CTI.cpp:
  • VM/CTI.h:
  • VM/CodeBlock.cpp:
  • VM/CodeBlock.h:
  • VM/CodeGenerator.cpp:
  • VM/CodeGenerator.h:
  • VM/ExceptionHelpers.cpp:
  • VM/ExceptionHelpers.h:
  • VM/JSPropertyNameIterator.cpp:
  • VM/JSPropertyNameIterator.h:
  • VM/Machine.cpp:
  • VM/Machine.h:
  • VM/Register.h:
  • kjs/ArgList.cpp:
  • kjs/ArgList.h:
  • kjs/Arguments.cpp:
  • kjs/Arguments.h:
  • kjs/ArrayConstructor.cpp:
  • kjs/ArrayPrototype.cpp:
  • kjs/BooleanConstructor.cpp:
  • kjs/BooleanConstructor.h:
  • kjs/BooleanObject.h:
  • kjs/BooleanPrototype.cpp:
  • kjs/CallData.cpp:
  • kjs/CallData.h:
  • kjs/ConstructData.cpp:
  • kjs/ConstructData.h:
  • kjs/DateConstructor.cpp:
  • kjs/DateInstance.h:
  • kjs/DatePrototype.cpp:
  • kjs/DebuggerCallFrame.cpp:
  • kjs/DebuggerCallFrame.h:
  • kjs/ErrorConstructor.cpp:
  • kjs/ErrorPrototype.cpp:
  • kjs/ExecState.cpp:
  • kjs/ExecState.h:
  • kjs/FunctionConstructor.cpp:
  • kjs/FunctionPrototype.cpp:
  • kjs/GetterSetter.cpp:
  • kjs/GetterSetter.h:
  • kjs/InternalFunction.h:
  • kjs/JSActivation.cpp:
  • kjs/JSActivation.h:
  • kjs/JSArray.cpp:
  • kjs/JSArray.h:
  • kjs/JSCell.cpp:
  • kjs/JSCell.h:
  • kjs/JSFunction.cpp:
  • kjs/JSFunction.h:
  • kjs/JSGlobalData.h:
  • kjs/JSGlobalObject.cpp:
  • kjs/JSGlobalObject.h:
  • kjs/JSGlobalObjectFunctions.cpp:
  • kjs/JSGlobalObjectFunctions.h:
  • kjs/JSImmediate.cpp:
  • kjs/JSImmediate.h:
  • kjs/JSNotAnObject.cpp:
  • kjs/JSNotAnObject.h:
  • kjs/JSNumberCell.cpp:
  • kjs/JSNumberCell.h:
  • kjs/JSObject.cpp:
  • kjs/JSObject.h:
  • kjs/JSStaticScopeObject.cpp:
  • kjs/JSStaticScopeObject.h:
  • kjs/JSString.cpp:
  • kjs/JSString.h:
  • kjs/JSValue.h:
  • kjs/JSVariableObject.h:
  • kjs/JSWrapperObject.h:
  • kjs/MathObject.cpp:
  • kjs/NativeErrorConstructor.cpp:
  • kjs/NumberConstructor.cpp:
  • kjs/NumberConstructor.h:
  • kjs/NumberObject.cpp:
  • kjs/NumberObject.h:
  • kjs/NumberPrototype.cpp:
  • kjs/ObjectConstructor.cpp:
  • kjs/ObjectPrototype.cpp:
  • kjs/ObjectPrototype.h:
  • kjs/PropertyMap.h:
  • kjs/PropertySlot.cpp:
  • kjs/PropertySlot.h:
  • kjs/RegExpConstructor.cpp:
  • kjs/RegExpConstructor.h:
  • kjs/RegExpMatchesArray.h:
  • kjs/RegExpObject.cpp:
  • kjs/RegExpObject.h:
  • kjs/RegExpPrototype.cpp:
  • kjs/Shell.cpp:
  • kjs/StringConstructor.cpp:
  • kjs/StringObject.cpp:
  • kjs/StringObject.h:
  • kjs/StringObjectThatMasqueradesAsUndefined.h:
  • kjs/StringPrototype.cpp:
  • kjs/StructureID.cpp:
  • kjs/StructureID.h:
  • kjs/collector.cpp:
  • kjs/collector.h:
  • kjs/completion.h:
  • kjs/grammar.y:
  • kjs/interpreter.cpp:
  • kjs/interpreter.h:
  • kjs/lookup.cpp:
  • kjs/lookup.h:
  • kjs/nodes.h:
  • kjs/operations.cpp:
  • kjs/operations.h:
  • kjs/protect.h:
  • profiler/ProfileGenerator.cpp: Replace JSValue* with JSValuePtr.

JavaScriptGlue:

2008-10-18 Darin Adler <Darin Adler>

Reviewed by Cameron Zwarich.

Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
changing JSValuePtr to be a class, and then eventually renaming it
to JSValue once that's done.

  • JSObject.cpp:
  • JSValueWrapper.cpp:
  • UserObjectImp.cpp:
  • UserObjectImp.h: Replace JSValue* with JSValuePtr.

WebCore:

2008-10-18 Darin Adler <Darin Adler>

Reviewed by Cameron Zwarich.

Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
changing JSValuePtr to be a class, and then eventually renaming it
to JSValue once that's done.

  • bindings/js/JSAttrCustom.cpp:
  • bindings/js/JSCSSRuleCustom.cpp:
  • bindings/js/JSCSSStyleDeclarationCustom.cpp:
  • bindings/js/JSCSSValueCustom.cpp:
  • bindings/js/JSCanvasPixelArrayCustom.h:
  • bindings/js/JSCanvasRenderingContext2DCustom.cpp:
  • bindings/js/JSClipboardCustom.cpp:
  • bindings/js/JSConsoleCustom.cpp:
  • bindings/js/JSCustomSQLStatementCallback.cpp:
  • bindings/js/JSCustomSQLStatementErrorCallback.cpp:
  • bindings/js/JSCustomSQLTransactionCallback.cpp:
  • bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
  • bindings/js/JSCustomVoidCallback.cpp:
  • bindings/js/JSCustomVoidCallback.h:
  • bindings/js/JSCustomXPathNSResolver.cpp:
  • bindings/js/JSDOMApplicationCacheCustom.cpp:
  • bindings/js/JSDOMBinding.cpp:
  • bindings/js/JSDOMBinding.h:
  • bindings/js/JSDOMWindowBase.cpp:
  • bindings/js/JSDOMWindowBase.h:
  • bindings/js/JSDOMWindowCustom.cpp:
  • bindings/js/JSDOMWindowCustom.h:
  • bindings/js/JSDOMWindowShell.cpp:
  • bindings/js/JSDOMWindowShell.h:
  • bindings/js/JSDatabaseCustom.cpp:
  • bindings/js/JSDocumentCustom.cpp:
  • bindings/js/JSElementCustom.cpp:
  • bindings/js/JSEventCustom.cpp:
  • bindings/js/JSEventListener.cpp:
  • bindings/js/JSEventTarget.cpp:
  • bindings/js/JSEventTargetBase.h:
  • bindings/js/JSEventTargetNodeCustom.cpp:
  • bindings/js/JSHTMLAllCollection.h:
  • bindings/js/JSHTMLAppletElementCustom.cpp:
  • bindings/js/JSHTMLCollectionCustom.cpp:
  • bindings/js/JSHTMLDocumentCustom.cpp:
  • bindings/js/JSHTMLEmbedElementCustom.cpp:
  • bindings/js/JSHTMLFormElementCustom.cpp:
  • bindings/js/JSHTMLFrameElementCustom.cpp:
  • bindings/js/JSHTMLFrameSetElementCustom.cpp:
  • bindings/js/JSHTMLIFrameElementCustom.cpp:
  • bindings/js/JSHTMLInputElementCustom.cpp:
  • bindings/js/JSHTMLObjectElementCustom.cpp:
  • bindings/js/JSHTMLOptionsCollectionCustom.cpp:
  • bindings/js/JSHTMLSelectElementCustom.cpp:
  • bindings/js/JSHTMLSelectElementCustom.h:
  • bindings/js/JSHistoryCustom.cpp:
  • bindings/js/JSImageDataCustom.cpp:
  • bindings/js/JSInspectedObjectWrapper.cpp:
  • bindings/js/JSInspectedObjectWrapper.h:
  • bindings/js/JSInspectorCallbackWrapper.cpp:
  • bindings/js/JSInspectorCallbackWrapper.h:
  • bindings/js/JSJavaScriptCallFrameCustom.cpp:
  • bindings/js/JSLocationCustom.cpp:
  • bindings/js/JSMessagePortCustom.cpp:
  • bindings/js/JSMimeTypeArrayCustom.cpp:
  • bindings/js/JSNamedNodeMapCustom.cpp:
  • bindings/js/JSNamedNodesCollection.cpp:
  • bindings/js/JSNamedNodesCollection.h:
  • bindings/js/JSNavigatorCustom.cpp:
  • bindings/js/JSNodeCustom.cpp:
  • bindings/js/JSNodeFilterCondition.cpp:
  • bindings/js/JSNodeFilterCustom.cpp:
  • bindings/js/JSNodeIteratorCustom.cpp:
  • bindings/js/JSNodeListCustom.cpp:
  • bindings/js/JSPluginArrayCustom.cpp:
  • bindings/js/JSPluginCustom.cpp:
  • bindings/js/JSPluginElementFunctions.cpp:
  • bindings/js/JSPluginElementFunctions.h:
  • bindings/js/JSQuarantinedObjectWrapper.cpp:
  • bindings/js/JSQuarantinedObjectWrapper.h:
  • bindings/js/JSRGBColor.cpp:
  • bindings/js/JSRGBColor.h:
  • bindings/js/JSSQLResultSetRowListCustom.cpp:
  • bindings/js/JSSQLTransactionCustom.cpp:
  • bindings/js/JSSVGElementInstanceCustom.cpp:
  • bindings/js/JSSVGLengthCustom.cpp:
  • bindings/js/JSSVGMatrixCustom.cpp:
  • bindings/js/JSSVGPathSegCustom.cpp:
  • bindings/js/JSSVGPathSegListCustom.cpp:
  • bindings/js/JSSVGPointListCustom.cpp:
  • bindings/js/JSSVGTransformListCustom.cpp:
  • bindings/js/JSStorageCustom.cpp:
  • bindings/js/JSStyleSheetCustom.cpp:
  • bindings/js/JSStyleSheetListCustom.cpp:
  • bindings/js/JSTextCustom.cpp:
  • bindings/js/JSTreeWalkerCustom.cpp:
  • bindings/js/JSXMLHttpRequestCustom.cpp:
  • bindings/js/JSXMLHttpRequestUploadCustom.cpp:
  • bindings/js/JSXSLTProcessorCustom.cpp:
  • bindings/js/ScheduledAction.cpp:
  • bindings/js/ScheduledAction.h:
  • bindings/js/ScriptController.cpp:
  • bindings/js/ScriptController.h:
  • bindings/objc/WebScriptObject.mm:
  • bindings/scripts/CodeGeneratorJS.pm:
  • bridge/NP_jsobject.cpp:
  • bridge/c/c_instance.cpp:
  • bridge/c/c_instance.h:
  • bridge/c/c_runtime.cpp:
  • bridge/c/c_runtime.h:
  • bridge/c/c_utility.cpp:
  • bridge/jni/jni_instance.cpp:
  • bridge/jni/jni_instance.h:
  • bridge/jni/jni_jsobject.mm:
  • bridge/jni/jni_objc.mm:
  • bridge/jni/jni_runtime.cpp:
  • bridge/jni/jni_runtime.h:
  • bridge/jni/jni_utility.cpp:
  • bridge/objc/objc_class.mm:
  • bridge/objc/objc_instance.h:
  • bridge/objc/objc_instance.mm:
  • bridge/objc/objc_runtime.h:
  • bridge/objc/objc_runtime.mm:
  • bridge/objc/objc_utility.h:
  • bridge/objc/objc_utility.mm:
  • bridge/runtime.h:
  • bridge/runtime_array.cpp:
  • bridge/runtime_array.h:
  • bridge/runtime_method.cpp:
  • bridge/runtime_method.h:
  • bridge/runtime_object.cpp:
  • bridge/runtime_object.h:
  • inspector/JavaScriptCallFrame.cpp:
  • inspector/JavaScriptCallFrame.h:
  • inspector/JavaScriptProfile.cpp:
  • inspector/JavaScriptProfileNode.cpp:
  • loader/FrameLoader.cpp:
  • loader/FrameLoader.h:
  • page/Console.cpp:
  • page/Console.h:
  • plugins/MimeTypeArray.h:
  • plugins/Plugin.h:
  • plugins/PluginArray.h:
  • xml/XMLHttpRequest.cpp: Replace JSValue* with JSValuePtr.
Location:
trunk/JavaScriptCore/API
Files:
9 edited

Legend:

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

    r37681 r37684  
    4949}
    5050
    51 inline JSC::JSValue* toJS(JSValueRef v)
     51inline JSC::JSValuePtr toJS(JSValueRef v)
    5252{
    53     return reinterpret_cast<JSC::JSValue*>(const_cast<OpaqueJSValue*>(v));
     53    return reinterpret_cast<JSC::JSValuePtr>(const_cast<OpaqueJSValue*>(v));
    5454}
    5555
     
    6969}
    7070
    71 inline JSValueRef toRef(JSC::JSValue* v)
     71inline JSValueRef toRef(JSC::JSValuePtr v)
    7272{
    7373    return reinterpret_cast<JSValueRef>(v);
    7474}
    7575
    76 inline JSValueRef* toRef(JSC::JSValue** v)
     76inline JSValueRef* toRef(JSC::JSValuePtr* v)
    7777{
    7878    return reinterpret_cast<JSValueRef*>(const_cast<const JSC::JSValue**>(v));
  • trunk/JavaScriptCore/API/JSCallbackConstructor.h

    r36766 r37684  
    4040    static const ClassInfo info;
    4141   
    42     static PassRefPtr<StructureID> createStructureID(JSValue* proto)
     42    static PassRefPtr<StructureID> createStructureID(JSValuePtr proto)
    4343    {
    4444        return StructureID::create(proto, TypeInfo(ObjectType, ImplementsHasInstance));
  • trunk/JavaScriptCore/API/JSCallbackFunction.cpp

    r37257 r37684  
    4747}
    4848
    49 JSValue* JSCallbackFunction::call(ExecState* exec, JSObject* functionObject, JSValue* thisValue, const ArgList& args)
     49JSValuePtr JSCallbackFunction::call(ExecState* exec, JSObject* functionObject, JSValuePtr thisValue, const ArgList& args)
    5050{
    5151    JSContextRef execRef = toRef(exec);
  • trunk/JavaScriptCore/API/JSCallbackFunction.h

    r36766 r37684  
    4040    // InternalFunction mish-mashes constructor and function behavior -- we should
    4141    // refactor the code so this override isn't necessary
    42     static PassRefPtr<StructureID> createStructureID(JSValue* proto)
     42    static PassRefPtr<StructureID> createStructureID(JSValuePtr proto)
    4343    {
    4444        return StructureID::create(proto, TypeInfo(ObjectType));
     
    4949    virtual const ClassInfo* classInfo() const { return &info; }
    5050
    51     static JSValue* call(ExecState*, JSObject*, JSValue*, const ArgList&);
     51    static JSValuePtr call(ExecState*, JSObject*, JSValuePtr, const ArgList&);
    5252
    5353    JSObjectCallAsFunctionCallback m_callback;
  • trunk/JavaScriptCore/API/JSCallbackObject.h

    r37681 r37684  
    4949    bool inherits(JSClassRef) const;
    5050
    51     static PassRefPtr<StructureID> createStructureID(JSValue* proto)
     51    static PassRefPtr<StructureID> createStructureID(JSValuePtr proto)
    5252    {
    5353        return StructureID::create(proto, TypeInfo(ObjectType, ImplementsHasInstance | OverridesHasInstance));
     
    6060    virtual bool getOwnPropertySlot(ExecState*, unsigned, PropertySlot&);
    6161   
    62     virtual void put(ExecState*, const Identifier&, JSValue*, PutPropertySlot&);
     62    virtual void put(ExecState*, const Identifier&, JSValuePtr, PutPropertySlot&);
    6363
    6464    virtual bool deleteProperty(ExecState*, const Identifier&);
    6565    virtual bool deleteProperty(ExecState*, unsigned);
    6666
    67     virtual bool hasInstance(ExecState* exec, JSValue* value, JSValue* proto);
     67    virtual bool hasInstance(ExecState* exec, JSValuePtr value, JSValuePtr proto);
    6868
    6969    virtual void getPropertyNames(ExecState*, PropertyNameArray&);
     
    7878    void init(ExecState*);
    7979 
    80     static JSCallbackObject* asCallbackObject(JSValue*);
     80    static JSCallbackObject* asCallbackObject(JSValuePtr);
    8181 
    82     static JSValue* call(ExecState*, JSObject* functionObject, JSValue* thisValue, const ArgList&);
     82    static JSValuePtr call(ExecState*, JSObject* functionObject, JSValuePtr thisValue, const ArgList&);
    8383    static JSObject* construct(ExecState*, JSObject* constructor, const ArgList&);
    8484   
    85     static JSValue* cachedValueGetter(ExecState*, const Identifier&, const PropertySlot&);
    86     static JSValue* staticValueGetter(ExecState*, const Identifier&, const PropertySlot&);
    87     static JSValue* staticFunctionGetter(ExecState*, const Identifier&, const PropertySlot&);
    88     static JSValue* callbackGetter(ExecState*, const Identifier&, const PropertySlot&);
     85    static JSValuePtr cachedValueGetter(ExecState*, const Identifier&, const PropertySlot&);
     86    static JSValuePtr staticValueGetter(ExecState*, const Identifier&, const PropertySlot&);
     87    static JSValuePtr staticFunctionGetter(ExecState*, const Identifier&, const PropertySlot&);
     88    static JSValuePtr callbackGetter(ExecState*, const Identifier&, const PropertySlot&);
    8989
    9090    struct JSCallbackObjectData {
  • trunk/JavaScriptCore/API/JSCallbackObjectFunctions.h

    r37681 r37684  
    4141
    4242template <class Base>
    43 inline JSCallbackObject<Base>* JSCallbackObject<Base>::asCallbackObject(JSValue* value)
     43inline JSCallbackObject<Base>* JSCallbackObject<Base>::asCallbackObject(JSValuePtr value)
    4444{
    4545    ASSERT(asObject(value)->inherits(&info));
     
    161161
    162162template <class Base>
    163 void JSCallbackObject<Base>::put(ExecState* exec, const Identifier& propertyName, JSValue* value, PutPropertySlot& slot)
     163void JSCallbackObject<Base>::put(ExecState* exec, const Identifier& propertyName, JSValuePtr value, PutPropertySlot& slot)
    164164{
    165165    JSContextRef ctx = toRef(exec);
     
    281281
    282282template <class Base>
    283 bool JSCallbackObject<Base>::hasInstance(ExecState* exec, JSValue* value, JSValue*)
     283bool JSCallbackObject<Base>::hasInstance(ExecState* exec, JSValuePtr value, JSValuePtr)
    284284{
    285285    JSContextRef execRef = toRef(exec);
     
    308308
    309309template <class Base>
    310 JSValue* JSCallbackObject<Base>::call(ExecState* exec, JSObject* functionObject, JSValue* thisValue, const ArgList& args)
     310JSValuePtr JSCallbackObject<Base>::call(ExecState* exec, JSObject* functionObject, JSValuePtr thisValue, const ArgList& args)
    311311{
    312312    JSContextRef execRef = toRef(exec);
     
    431431
    432432template <class Base>
    433 JSValue* JSCallbackObject<Base>::cachedValueGetter(ExecState*, const Identifier&, const PropertySlot& slot)
    434 {
    435     JSValue* v = slot.slotBase();
     433JSValuePtr JSCallbackObject<Base>::cachedValueGetter(ExecState*, const Identifier&, const PropertySlot& slot)
     434{
     435    JSValuePtr v = slot.slotBase();
    436436    ASSERT(v);
    437437    return v;
     
    439439
    440440template <class Base>
    441 JSValue* JSCallbackObject<Base>::staticValueGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
     441JSValuePtr JSCallbackObject<Base>::staticValueGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
    442442{
    443443    JSCallbackObject* thisObj = asCallbackObject(slot.slotBase());
     
    461461
    462462template <class Base>
    463 JSValue* JSCallbackObject<Base>::staticFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
     463JSValuePtr JSCallbackObject<Base>::staticFunctionGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
    464464{
    465465    JSCallbackObject* thisObj = asCallbackObject(slot.slotBase());
     
    486486
    487487template <class Base>
    488 JSValue* JSCallbackObject<Base>::callbackGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
     488JSValuePtr JSCallbackObject<Base>::callbackGetter(ExecState* exec, const Identifier& propertyName, const PropertySlot& slot)
    489489{
    490490    JSCallbackObject* thisObj = asCallbackObject(slot.slotBase());
  • trunk/JavaScriptCore/API/JSContextRef.cpp

    r37215 r37684  
    7474    JSGlobalObject* globalObject = new (globalData.get()) JSCallbackObject<JSGlobalObject>(globalData.get(), globalObjectClass);
    7575    ExecState* exec = globalObject->globalExec();
    76     JSValue* prototype = globalObjectClass->prototype(exec);
     76    JSValuePtr prototype = globalObjectClass->prototype(exec);
    7777    if (!prototype)
    7878        prototype = jsNull();
  • trunk/JavaScriptCore/API/JSObjectRef.cpp

    r37433 r37684  
    104104    JSLock lock(exec);
    105105
    106     JSValue* jsPrototype = jsClass
     106    JSValuePtr jsPrototype = jsClass
    107107        ? jsClass->prototype(exec)
    108108        : exec->lexicalGlobalObject()->objectPrototype();
     
    234234{
    235235    JSObject* jsObject = toJS(object);
    236     JSValue* jsValue = toJS(value);
     236    JSValuePtr jsValue = toJS(value);
    237237
    238238    jsObject->setPrototype(jsValue->isObject() ? jsValue : jsNull());
     
    258258    JSObject* jsObject = toJS(object);
    259259
    260     JSValue* jsValue = jsObject->get(exec, propertyName->identifier(&exec->globalData()));
     260    JSValuePtr jsValue = jsObject->get(exec, propertyName->identifier(&exec->globalData()));
    261261    if (exec->hadException()) {
    262262        if (exception)
     
    275275    JSObject* jsObject = toJS(object);
    276276    Identifier name(propertyName->identifier(&exec->globalData()));
    277     JSValue* jsValue = toJS(value);
     277    JSValuePtr jsValue = toJS(value);
    278278
    279279    if (attributes && !jsObject->hasProperty(exec, name))
     
    299299    JSObject* jsObject = toJS(object);
    300300
    301     JSValue* jsValue = jsObject->get(exec, propertyIndex);
     301    JSValuePtr jsValue = jsObject->get(exec, propertyIndex);
    302302    if (exec->hadException()) {
    303303        if (exception)
     
    316316
    317317    JSObject* jsObject = toJS(object);
    318     JSValue* jsValue = toJS(value);
     318    JSValuePtr jsValue = toJS(value);
    319319   
    320320    jsObject->put(exec, propertyIndex, jsValue);
  • trunk/JavaScriptCore/API/JSValueRef.cpp

    r37337 r37684  
    4444JSType JSValueGetType(JSContextRef, JSValueRef value)
    4545{
    46     JSC::JSValue* jsValue = toJS(value);
     46    JSC::JSValuePtr jsValue = toJS(value);
    4747    if (jsValue->isUndefined())
    4848        return kJSTypeUndefined;
     
    6363bool JSValueIsUndefined(JSContextRef, JSValueRef value)
    6464{
    65     JSValue* jsValue = toJS(value);
     65    JSValuePtr jsValue = toJS(value);
    6666    return jsValue->isUndefined();
    6767}
     
    6969bool JSValueIsNull(JSContextRef, JSValueRef value)
    7070{
    71     JSValue* jsValue = toJS(value);
     71    JSValuePtr jsValue = toJS(value);
    7272    return jsValue->isNull();
    7373}
     
    7575bool JSValueIsBoolean(JSContextRef, JSValueRef value)
    7676{
    77     JSValue* jsValue = toJS(value);
     77    JSValuePtr jsValue = toJS(value);
    7878    return jsValue->isBoolean();
    7979}
     
    8181bool JSValueIsNumber(JSContextRef, JSValueRef value)
    8282{
    83     JSValue* jsValue = toJS(value);
     83    JSValuePtr jsValue = toJS(value);
    8484    return jsValue->isNumber();
    8585}
     
    8787bool JSValueIsString(JSContextRef, JSValueRef value)
    8888{
    89     JSValue* jsValue = toJS(value);
     89    JSValuePtr jsValue = toJS(value);
    9090    return jsValue->isString();
    9191}
     
    9393bool JSValueIsObject(JSContextRef, JSValueRef value)
    9494{
    95     JSValue* jsValue = toJS(value);
     95    JSValuePtr jsValue = toJS(value);
    9696    return jsValue->isObject();
    9797}
     
    9999bool JSValueIsObjectOfClass(JSContextRef, JSValueRef value, JSClassRef jsClass)
    100100{
    101     JSValue* jsValue = toJS(value);
     101    JSValuePtr jsValue = toJS(value);
    102102   
    103103    if (JSObject* o = jsValue->getObject()) {
     
    116116    JSLock lock(exec);
    117117
    118     JSValue* jsA = toJS(a);
    119     JSValue* jsB = toJS(b);
     118    JSValuePtr jsA = toJS(a);
     119    JSValuePtr jsB = toJS(b);
    120120
    121121    bool result = equal(exec, jsA, jsB); // false if an exception is thrown
     
    130130bool JSValueIsStrictEqual(JSContextRef, JSValueRef a, JSValueRef b)
    131131{
    132     JSValue* jsA = toJS(a);
    133     JSValue* jsB = toJS(b);
     132    JSValuePtr jsA = toJS(a);
     133    JSValuePtr jsB = toJS(b);
    134134   
    135135    bool result = strictEqual(jsA, jsB);
     
    143143    JSLock lock(exec);
    144144
    145     JSValue* jsValue = toJS(value);
     145    JSValuePtr jsValue = toJS(value);
    146146    JSObject* jsConstructor = toJS(constructor);
    147147    if (!jsConstructor->structureID()->typeInfo().implementsHasInstance())
     
    192192{
    193193    ExecState* exec = toJS(ctx);
    194     JSValue* jsValue = toJS(value);
     194    JSValuePtr jsValue = toJS(value);
    195195    return jsValue->toBoolean(exec);
    196196}
     
    202202    JSLock lock(exec);
    203203
    204     JSValue* jsValue = toJS(value);
     204    JSValuePtr jsValue = toJS(value);
    205205
    206206    double number = jsValue->toNumber(exec);
     
    220220    JSLock lock(exec);
    221221
    222     JSValue* jsValue = toJS(value);
     222    JSValuePtr jsValue = toJS(value);
    223223   
    224224    RefPtr<OpaqueJSString> stringRef(OpaqueJSString::create(jsValue->toString(exec)));
     
    238238    JSLock lock(exec);
    239239
    240     JSValue* jsValue = toJS(value);
     240    JSValuePtr jsValue = toJS(value);
    241241   
    242242    JSObjectRef objectRef = toRef(jsValue->toObject(exec));
     
    256256    JSLock lock(exec);
    257257
    258     JSValue* jsValue = toJS(value);
     258    JSValuePtr jsValue = toJS(value);
    259259    gcProtect(jsValue);
    260260}
     
    266266    JSLock lock(exec);
    267267
    268     JSValue* jsValue = toJS(value);
     268    JSValuePtr jsValue = toJS(value);
    269269    gcUnprotect(jsValue);
    270270}
Note: See TracChangeset for help on using the changeset viewer.