Changeset 15376 in webkit for trunk/JavaScriptCore/API/JSBase.h


Ignore:
Timestamp:
Jul 12, 2006, 1:12:08 AM (19 years ago)
Author:
ggaren
Message:

Reviewed by Maciej.


  • Implemented a vast number of renames and comment clarifications suggested during API review.


JSInternalString -> JSString
JS*Make -> JSValueMake*, JSObjectMake*
JSTypeCode -> JSType
JSValueIsInstanceOf -> JSValueIsInstanceOfConstructor (reads strangely well in client code)
JSGC*Protect -> JSValue*Protect
JS*Callback -> JSObject*Callback
JSGetPropertyListCallback -> JSObjectAddPropertiesToListCallback
JSPropertyEnumeratorGetNext -> JSPropertyEnumeratorGetNextName
JSString* ->

JSStringCreateWithUTF8CString, JSStringGetUTF8CString,
JSStringGetMaximumUTF8CStringSize JSStringIsEqualToUTF8CString,
JSStringCreateWithCFString, JSStringCopyCFString, JSStringCreateWithCharacters.


  • Changed functions taking a JSValue out arg and returning a bool indicating whether it was set to simply return a JSValue or NULL.


  • Removed JSStringGetCharacters because it's more documentation than code, and it's just a glorified memcpy built on existing API functionality.


  • Moved standard library includes into the headers that actually require them.


  • Standardized use of the phrase "Create Rule."


  • Removed JSLock from make functions that don't allocate.


  • Added exception handling to JSValueToBoolean, since we now allow callback objects to throw exceptions upon converting to boolean.


  • Renamed JSGCCollect to JSGarbageCollect.
File:
1 edited

Legend:

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

    r15310 r15376  
    3232/*! @typedef JSContextRef A JavaScript execution context. Holds the global object and other execution state. */
    3333typedef struct __JSContext* JSContextRef;
    34 /*! @typedef JSInternalString A UTF16 character buffer. The fundamental string representation in JavaScript. */
    35 typedef struct __JSInternalString* JSInternalStringRef;
     34/*! @typedef JSString A UTF16 character buffer. The fundamental string representation in JavaScript. */
     35typedef struct __JSString* JSStringRef;
    3636/*! @typedef JSClassRef A JavaScript class. Used with JSObjectMake to construct objects with custom behavior. */
    3737typedef struct __JSClass* JSClassRef;
     
    4646/*! @typedef JSValueRef A JavaScript value. The base type for all JavaScript values, and polymorphic functions on them. */
    4747typedef const struct __JSValue* JSValueRef;
    48 
    4948/*! @typedef JSObjectRef A JavaScript object. A JSObject is a JSValue. */
    5049typedef struct __JSValue* JSObjectRef;
Note: See TracChangeset for help on using the changeset viewer.