Ignore:
Timestamp:
Jul 5, 2006, 11:07:57 AM (19 years ago)
Author:
ggaren
Message:

RS by Beth.


Moved some code around for more logical file separation.

  • API/JSBase.h:
  • API/JSContextRef.h:
  • API/JSObjectRef.cpp:
  • API/JSValueRef.cpp: (JSValueToObject):
  • API/JSValueRef.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/API/JSValueRef.cpp

    r15149 r15165  
    196196}
    197197
     198JSObjectRef JSValueToObject(JSContextRef context, JSValueRef value)
     199{
     200    JSLock lock;
     201    ExecState* exec = toJS(context);
     202    JSValue* jsValue = toJS(value);
     203   
     204    JSObjectRef objectRef = toRef(jsValue->toObject(exec));
     205    if (exec->hadException()) {
     206        exec->clearException();
     207        objectRef = NULL;
     208    }
     209    return objectRef;
     210}   
     211
    198212void JSGCProtect(JSValueRef value)
    199213{
Note: See TracChangeset for help on using the changeset viewer.