Oolite 1.91.0.7644-241112-7f5034b
|
Go to the source code of this file.
Classes | |
struct | CallbackEntry |
Macros | |
#define | DEBUG_FCB_SIMPLE_TRACKING_IDS 0 |
#define | DEBUG_FCB_VERBOSE_LOGGING 0 |
#define | FCBLog(...) |
#define | FCBLogIndentIf(key) |
#define | FCBLogOutdentIf(key) |
Enumerations | |
enum | { kMinCount = 16 , kIDScrambleMask = 0x2315EB16 , kIDIncrement = 992699 } |
Functions | |
static JSBool | GlobalAddFrameCallback (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalRemoveFrameCallback (JSContext *context, uintN argc, jsval *vp) |
static JSBool | GlobalIsValidFrameCallback (JSContext *context, uintN argc, jsval *vp) |
static BOOL | AddCallback (JSContext *context, jsval callback, uint32 trackingID, NSString **errorString) |
static BOOL | GrowCallbackList (JSContext *context, NSString **errorString) |
static BOOL | GetIndexForTrackingID (uint32 trackingID, NSUInteger *outIndex) |
static BOOL | RemoveCallbackWithTrackingID (JSContext *context, uint32 trackingID) |
static void | RemoveCallbackAtIndex (JSContext *context, NSUInteger index) |
static void | QueueDeferredOperation (NSString *opType, uint32 trackingID, OOJSValue *value) |
static void | RunDeferredOperations (JSContext *context) |
void | InitOOJSFrameCallbacks (JSContext *context, JSObject *global) |
void | OOJSFrameCallbacksInvoke (OOTimeDelta inDeltaT) |
void | OOJSFrameCallbacksRemoveAll (void) |
Variables | |
static CallbackEntry * | sCallbacks |
static NSUInteger | sCount |
static NSUInteger | sSpace |
static NSUInteger | sHighWaterMark |
static NSMutableArray * | sDeferredOps |
static uint32 | sNextID |
static BOOL | sRunning |
#define DEBUG_FCB_SIMPLE_TRACKING_IDS 0 |
Definition at line 41 of file OOJSFrameCallbacks.m.
#define DEBUG_FCB_VERBOSE_LOGGING 0 |
Definition at line 45 of file OOJSFrameCallbacks.m.
#define FCBLog | ( | ... | ) |
Definition at line 59 of file OOJSFrameCallbacks.m.
Referenced by AddCallback(), GlobalAddFrameCallback(), GlobalRemoveFrameCallback(), RemoveCallbackAtIndex(), and RunDeferredOperations().
#define FCBLogIndentIf | ( | key | ) |
Definition at line 60 of file OOJSFrameCallbacks.m.
Referenced by RunDeferredOperations().
#define FCBLogOutdentIf | ( | key | ) |
Definition at line 61 of file OOJSFrameCallbacks.m.
Referenced by RunDeferredOperations().
anonymous enum |
Enumerator | |
---|---|
kMinCount | |
kIDScrambleMask | |
kIDIncrement |
Definition at line 65 of file OOJSFrameCallbacks.m.
|
static |
Definition at line 291 of file OOJSFrameCallbacks.m.
References CallbackEntry::callback, EXPECT_NOT, FCBLog, GrowCallbackList(), JS_IsInRequest, OOJSAddGCValueRoot, sCallbacks, sCount, sHighWaterMark, sRunning, sSpace, and CallbackEntry::trackingID.
Referenced by GlobalAddFrameCallback(), and RunDeferredOperations().
|
static |
Definition at line 376 of file OOJSFrameCallbacks.m.
References sCallbacks, and sCount.
Referenced by GlobalIsValidFrameCallback(), and RemoveCallbackWithTrackingID().
|
static |
Definition at line 191 of file OOJSFrameCallbacks.m.
References AddCallback(), EXPECT, EXPECT_NOT, FCBLog, kIDIncrement, kIDScrambleMask, MIN, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_INT, OOJSReportBadArguments(), OOJSReportError(), OOJSValueIsFunction(), QueueDeferredOperation(), sNextID, and sRunning.
Referenced by InitOOJSFrameCallbacks().
|
static |
Definition at line 265 of file OOJSFrameCallbacks.m.
References EXPECT_NOT, GetIndexForTrackingID(), nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_BOOL, and OOJSReportBadArguments().
Referenced by InitOOJSFrameCallbacks().
|
static |
Definition at line 231 of file OOJSFrameCallbacks.m.
References EXPECT, EXPECT_NOT, FCBLog, MIN, nil, OOJS_ARGV, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_VOID, OOJSReportBadArguments(), OOJSReportWarning(), QueueDeferredOperation(), RemoveCallbackWithTrackingID(), and sRunning.
Referenced by InitOOJSFrameCallbacks().
|
static |
Definition at line 325 of file OOJSFrameCallbacks.m.
References EXPECT_NOT, JS_IsInRequest, kMinCount, MAX, OOJSAddGCValueRoot, sCallbacks, sCount, sHighWaterMark, and sSpace.
Referenced by AddCallback().
void InitOOJSFrameCallbacks | ( | JSContext * | context, |
JSObject * | global ) |
Definition at line 117 of file OOJSFrameCallbacks.m.
References GlobalAddFrameCallback(), GlobalIsValidFrameCallback(), GlobalRemoveFrameCallback(), OOJS_METHOD_READONLY, and sNextID.
void OOJSFrameCallbacksInvoke | ( | OOTimeDelta | inDeltaT | ) |
Definition at line 132 of file OOJSFrameCallbacks.m.
References DESTROY, EXPECT, EXPECT_NOT, OOJSAcquireContext(), OOJSRelinquishContext(), OOJSStartTimeLimiterWithTimeLimit, OOJSStopTimeLimiter, RunDeferredOperations(), sCallbacks, sCount, sDeferredOps, and sRunning.
void OOJSFrameCallbacksRemoveAll | ( | void | ) |
Definition at line 175 of file OOJSFrameCallbacks.m.
References OOJSAcquireContext(), OOJSRelinquishContext(), RemoveCallbackAtIndex(), sCount, and sRunning.
|
static |
Definition at line 438 of file OOJSFrameCallbacks.m.
References nil, sDeferredOps, and sRunning.
Referenced by GlobalAddFrameCallback(), and GlobalRemoveFrameCallback().
|
static |
Definition at line 415 of file OOJSFrameCallbacks.m.
References CallbackEntry::callback, FCBLog, JS_IsInRequest, OOLog, sCallbacks, sCount, sNextID, and sRunning.
Referenced by OOJSFrameCallbacksRemoveAll(), and RemoveCallbackWithTrackingID().
|
static |
Definition at line 399 of file OOJSFrameCallbacks.m.
References GetIndexForTrackingID(), JS_IsInRequest, RemoveCallbackAtIndex(), and sRunning.
Referenced by GlobalRemoveFrameCallback(), and RunDeferredOperations().
|
static |
Definition at line 451 of file OOJSFrameCallbacks.m.
References AddCallback(), count, FCBLog, FCBLogIndentIf, FCBLogOutdentIf, nil, OOJSValueFromNativeObject(), OOLogWARN, RemoveCallbackWithTrackingID(), and sDeferredOps.
Referenced by OOJSFrameCallbacksInvoke().
|
static |
Definition at line 87 of file OOJSFrameCallbacks.m.
Referenced by AddCallback(), GetIndexForTrackingID(), GrowCallbackList(), OOJSFrameCallbacksInvoke(), and RemoveCallbackAtIndex().
|
static |
Definition at line 88 of file OOJSFrameCallbacks.m.
Referenced by AddCallback(), GetIndexForTrackingID(), GrowCallbackList(), OOJSFrameCallbacksInvoke(), OOJSFrameCallbacksRemoveAll(), and RemoveCallbackAtIndex().
|
static |
Definition at line 91 of file OOJSFrameCallbacks.m.
Referenced by OOJSFrameCallbacksInvoke(), QueueDeferredOperation(), and RunDeferredOperations().
|
static |
Definition at line 90 of file OOJSFrameCallbacks.m.
Referenced by AddCallback(), and GrowCallbackList().
|
static |
Definition at line 92 of file OOJSFrameCallbacks.m.
Referenced by GlobalAddFrameCallback(), InitOOJSFrameCallbacks(), and RemoveCallbackAtIndex().
|
static |
Definition at line 93 of file OOJSFrameCallbacks.m.
Referenced by AddCallback(), GlobalAddFrameCallback(), GlobalRemoveFrameCallback(), OOJSFrameCallbacksInvoke(), OOJSFrameCallbacksRemoveAll(), QueueDeferredOperation(), RemoveCallbackAtIndex(), and RemoveCallbackWithTrackingID().
|
static |
Definition at line 89 of file OOJSFrameCallbacks.m.
Referenced by AddCallback(), and GrowCallbackList().