Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOJavaScriptEngine Class Reference

#include <OOJavaScriptEngine.h>

+ Inheritance diagram for OOJavaScriptEngine:
+ Collaboration diagram for OOJavaScriptEngine:

Instance Methods

(JSObject *) - globalObject
 
(void) - runMissionCallback
 
(BOOL) - reset
 
(BOOL) - callJSFunction:forObject:argc:argv:result:
 
(void) - removeGCObjectRoot:
 
(void) - removeGCValueRoot:
 
(void) - garbageCollectionOpportunity:
 
(BOOL) - showErrorLocations
 
(void) - setShowErrorLocations:
 
(JSClass *) - objectClass
 
(JSClass *) - stringClass
 
(JSClass *) - arrayClass
 
(JSClass *) - numberClass
 
(JSClass *) - booleanClass
 
(BOOL) - dumpStackForErrors
 
(void) - setDumpStackForErrors:
 
(BOOL) - dumpStackForWarnings
 
(void) - setDumpStackForWarnings:
 
(void) - enableDebuggerStatement
 
(id) - init [implementation]
 
(void) - createMainThreadContext [implementation]
 
(void) - destroyMainThreadContext [implementation]
 
(void) - dealloc [implementation]
 
(BOOL) - lookUpStandardClassPointers [implementation]
 
(void) - registerStandardObjectConverters [implementation]
 
(void) - setMonitor: [implementation]
 
(void) - sendMonitorError:withMessage:inContext: [implementation]
 
(void) - sendMonitorLogMessage:withMessageClass:inContext: [implementation]
 
(void) - sendMonitorLogMessage:withMessageClass:inContext: [implementation]
 
(void) - watchdogTimerThread [implementation]
 

Class Methods

(OOJavaScriptEngine *) + sharedEngine
 
(static JSTrapStatus) + DebuggerHook [implementation]
 

Private Attributes

JSRuntime * _runtime
 
JSObject * _globalObject
 
BOOL _showErrorLocations
 
JSClass * _objectClass
 
JSClass * _stringClass
 
JSClass * _arrayClass
 
JSClass * _numberClass
 
JSClass * _booleanClass
 
BOOL _dumpStackForErrors
 
BOOL _dumpStackForWarnings
 

Detailed Description

Definition at line 42 of file OOJavaScriptEngine.h.

Method Documentation

◆ arrayClass

- (JSClass *) arrayClass

Definition at line 2531 of file OOJavaScriptEngine.m.

569{
570 return _arrayClass;
571}

References nil.

◆ booleanClass

- (JSClass *) booleanClass

Definition at line 2531 of file OOJavaScriptEngine.m.

581{
582 return _booleanClass;
583}

◆ callJSFunction:forObject:argc:argv:result:

- (BOOL) callJSFunction: (jsval) function
forObject: (JSObject *) jsThis
argc: (uintN) argc
argv: (jsval *) argv
result: (jsval *) outResult 

Definition at line 2531 of file OOJavaScriptEngine.m.

489 :(jsval)function
490 forObject:(JSObject *)jsThis
491 argc:(uintN)argc
492 argv:(jsval *)argv
493 result:(jsval *)outResult
494{
495 JSContext *context = NULL;
496 BOOL result;
497
498 NSParameterAssert(OOJSValueIsFunction(context, function));
499
500 context = OOJSAcquireContext();
501
503 result = JS_CallFunctionValue(context, jsThis, function, argc, argv, outResult);
505
506 JS_ReportPendingException(context);
507 OOJSRelinquishContext(context);
508
509 return result;
510}
#define OOJSStopTimeLimiter()
#define OOJSStartTimeLimiter()
OOINLINE BOOL OOJSValueIsFunction(JSContext *context, jsval value)
OOINLINE JSContext * OOJSAcquireContext(void)
OOINLINE void OOJSRelinquishContext(JSContext *context)

Referenced by MissionRunCallback().

+ Here is the caller graph for this function:

◆ createMainThreadContext

- (void) createMainThreadContext
implementation

Provided by category OOJavaScriptEngine(Private).

Definition at line 2531 of file OOJavaScriptEngine.m.

302{
303 NSAssert(gOOJSMainThreadContext == NULL, @"-[OOJavaScriptEngine createMainThreadContext] called while the main thread context exists.");
304
305 // create a context and associate it with the JS runtime.
307
308 // if context creation failed, end the program here.
309 if (gOOJSMainThreadContext == NULL)
310 {
311 OOLog(@"script.javaScript.init.error", @"%@", @"***** FATAL ERROR: failed to create JavaScript context.");
312 exit(1);
313 }
314
316
319
320#if JS_GC_ZEAL
321 uint8_t gcZeal = [[NSUserDefaults standardUserDefaults] oo_unsignedCharForKey:@"js-gc-zeal"];
322 if (gcZeal > 0)
323 {
324 // Useful js-gc-zeal values are 0 (off), 1 and 2.
325 OOLog(@"script.javaScript.debug.gcZeal", @"Setting JavaScript garbage collector zeal to %u.", gcZeal);
326 JS_SetGCZeal(gOOJSMainThreadContext, gcZeal);
327 }
328#endif
329
330 JS_SetErrorReporter(gOOJSMainThreadContext, ReportJSError);
331
332 // Create the global object.
334
335 // Initialize the built-in JS objects and the global object.
336 JS_InitStandardClasses(gOOJSMainThreadContext, _globalObject);
337 if (![self lookUpStandardClassPointers])
338 {
339 OOLog(@"script.javaScript.init.error", @"%@", @"***** FATAL ERROR: failed to look up standard JavaScript classes.");
340 exit(1);
341 }
342 [self registerStandardObjectConverters];
343
346
347 // Initialize Oolite classes.
380
381 // Run prefix scripts.
382 [OOJSScript jsScriptFromFileNamed:@"oolite-global-prefix.js"
383 properties:[NSDictionary dictionaryWithObject:JSSpecialFunctionsObjectWrapper(gOOJSMainThreadContext)
384 forKey:@"special"]];
385
387
388 OOLog(@"script.javaScript.init.success", @"%@", @"Set up JavaScript context.");
389}
void OOConstToJSStringInit(JSContext *context)
void InitOOJSClock(JSContext *context, JSObject *global)
Definition OOJSClock.m:109
void InitOOJSDock(JSContext *context, JSObject *global)
Definition OOJSDock.m:94
void InitOOJSEntity(JSContext *context, JSObject *global)
Definition OOJSEntity.m:139
void InitOOJSEquipmentInfo(JSContext *context, JSObject *global)
void InitOOJSExhaustPlume(JSContext *context, JSObject *global)
void InitOOJSFlasher(JSContext *context, JSObject *global)
Definition OOJSFlasher.m:96
void InitOOJSFont(JSContext *context, JSObject *global)
Definition OOJSFont.m:38
void InitOOJSFrameCallbacks(JSContext *context, JSObject *global)
void CreateOOJSGlobal(JSContext *context, JSObject **outGlobal)
Definition OOJSGlobal.m:166
void SetUpOOJSGlobal(JSContext *context, JSObject *global)
Definition OOJSGlobal.m:177
void InitOOJSManifest(JSContext *context, JSObject *global)
void InitOOJSMissionVariables(JSContext *context, JSObject *global)
void InitOOJSMission(JSContext *context, JSObject *global)
void InitOOJSOolite(JSContext *context, JSObject *global)
Definition OOJSOolite.m:92
void InitOOJSPlanet(JSContext *context, JSObject *global)
Definition OOJSPlanet.m:99
void InitOOJSPlayerShip(JSContext *context, JSObject *global)
void InitOOJSPlayer(JSContext *context, JSObject *global)
Definition OOJSPlayer.m:163
void InitOOJSQuaternion(JSContext *context, JSObject *global)
void InitOOJSScript(JSContext *context, JSObject *global)
Definition OOJSScript.m:663
void InitOOJSShipGroup(JSContext *context, JSObject *global)
void InitOOJSShip(JSContext *context, JSObject *global)
Definition OOJSShip.m:587
void InitOOJSSoundSource(JSContext *context, JSObject *global)
void InitOOJSSound(JSContext *context, JSObject *global)
Definition OOJSSound.m:104
void InitOOJSSpecialFunctions(JSContext *context, JSObject *global)
void InitOOJSStation(JSContext *context, JSObject *global)
void InitOOJSSun(JSContext *context, JSObject *global)
Definition OOJSSun.m:91
void InitOOJSSystemInfo(JSContext *context, JSObject *global)
void InitOOJSSystem(JSContext *context, JSObject *global)
Definition OOJSSystem.m:227
void InitOOJSTimer(JSContext *context, JSObject *global)
Definition OOJSTimer.m:254
void InitOOJSVector(JSContext *context, JSObject *global)
Definition OOJSVector.m:153
void InitOOJSVisualEffect(JSContext *context, JSObject *global)
void InitOOJSWaypoint(JSContext *context, JSObject *global)
void InitOOJSWorldScripts(JSContext *context, JSObject *global)
void InitOOJSWormhole(JSContext *context, JSObject *global)
#define JS_BeginRequest(context)
#define JS_EndRequest(context)
#define OOJSENGINE_JSVERSION
static void ReportJSError(JSContext *context, const char *message, JSErrorReport *report)
#define OOJSENGINE_CONTEXT_OPTIONS
JSContext * gOOJSMainThreadContext
#define OOJS_STACK_SIZE
#define OOLog(class, format,...)
Definition OOLogging.h:88
id jsScriptFromFileNamed:properties:(NSString *fileName,[properties] NSDictionary *properties)
Definition OOScript.m:192

◆ dealloc

- (void) dealloc
implementation

Definition at line 2531 of file OOJavaScriptEngine.m.

471{
473
475
476 [self destroyMainThreadContext];
477 JS_DestroyRuntime(_runtime);
478
479 [super dealloc];
480}
void OOJSFrameCallbacksRemoveAll(void)
static OOJavaScriptEngine * sSharedEngine
return nil

◆ DebuggerHook

+ (static JSTrapStatus) DebuggerHook (JSContext *) context
(JSScript *) script
(jsbytecode *) pc
(jsval *) rval
(void *) closure 
implementation

Definition at line 622 of file OOJavaScriptEngine.m.

623{
625
626 OOLog(@"script.javaScript.debugger", @"debugger invoked during %@:", [[OOJSScript currentlyRunningScript] displayName]);
627 OOJSDumpStack(context);
628
630
631 return JSTRAP_CONTINUE;
632}
void OOJSPauseTimeLimiter(void)
void OOJSResumeTimeLimiter(void)
void OOJSDumpStack(JSContext *context)

◆ destroyMainThreadContext

- (void) destroyMainThreadContext
implementation

Provided by category OOJavaScriptEngine(Private).

Definition at line 2531 of file OOJavaScriptEngine.m.

393{
394 if (gOOJSMainThreadContext != NULL)
395 {
396 JSContext *context = OOJSAcquireContext();
398
399 _globalObject = NULL;
400 _objectClass = NULL;
401 _stringClass = NULL;
402 _arrayClass = NULL;
403 _numberClass = NULL;
404 _booleanClass = NULL;
405
409
410 OOJSRelinquishContext(context);
411
412 _globalObject = NULL;
413 JS_DestroyContext(gOOJSMainThreadContext); // Forces unconditional GC.
415 }
416}
void OOConstToJSStringDestroy(void)
static void UnregisterSubclasses(void)
static void UnregisterObjectConverters(void)

◆ dumpStackForErrors

- (BOOL) dumpStackForErrors

Definition at line 622 of file OOJavaScriptEngine.m.

636{
637 return _dumpStackForErrors;
638}

Referenced by ReportJSError().

+ Here is the caller graph for this function:

◆ dumpStackForWarnings

- (BOOL) dumpStackForWarnings

Definition at line 622 of file OOJavaScriptEngine.m.

648{
650}

Referenced by ReportJSError().

+ Here is the caller graph for this function:

◆ enableDebuggerStatement

- (void) enableDebuggerStatement

Definition at line 622 of file OOJavaScriptEngine.m.

660{
661 JS_SetDebuggerHandler(_runtime, DebuggerHook, self);
662}
static JSTrapStatus DebuggerHook(JSContext *context, JSScript *script, jsbytecode *pc, jsval *rval, void *closure)

Referenced by NSObject(OODebugPlugInController)::setUpDebugger.

+ Here is the caller graph for this function:

◆ garbageCollectionOpportunity:

- (void) garbageCollectionOpportunity: (BOOL) force

Definition at line 2531 of file OOJavaScriptEngine.m.

529 :(BOOL)force
530{
531 JSContext *context = OOJSAcquireContext();
532 if (force)
533 {
534 JS_GC(context);
535 }
536 else
537 {
538 JS_MaybeGC(context);
539 }
540 OOJSRelinquishContext(context);
541}

◆ globalObject

- (JSObject *) globalObject

Definition at line 2531 of file OOJavaScriptEngine.m.

484{
485 return _globalObject;
486}

Referenced by OOStringFromDeciCredits().

+ Here is the caller graph for this function:

◆ init

- (id) init
implementation

Definition at line 2531 of file OOJavaScriptEngine.m.

260{
261 NSAssert(sSharedEngine == nil, @"Attempt to create multiple OOJavaScriptEngines.");
262
263 if (!(self = [super init])) return nil;
264 sSharedEngine = self;
265
266 JS_SetCStringsAreUTF8();
267
268 NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
269#ifndef NDEBUG
270 /* Set stack trace preferences from preferences. These will be overriden
271 by the debug OXP script if installed, but being able to enable traces
272 without setting up the debug console could be useful for debugging
273 users' problems.
274 */
275 [self setDumpStackForErrors:[defaults boolForKey:@"dump-stack-for-errors"]];
276 [self setDumpStackForWarnings:[defaults boolForKey:@"dump-stack-for-warnings"]];
277#endif
278
279 assert(sizeof(jschar) == sizeof(unichar));
280
281 // initialize the JS run time, and return result in runtime.
282 uint32_t jsRuntimeInMiB = [defaults oo_intForKey:@"jsruntime-size-mib" defaultValue:OOJS_RUNTIME_SIZE_MiB];
283 _runtime = JS_NewRuntime(jsRuntimeInMiB * 1024L * 1024L);
284
285 // if runtime creation failed, end the program here.
286 if (_runtime == NULL)
287 {
288 OOLog(@"script.javaScript.init.error", @"***** FATAL ERROR: failed to create JavaScript runtime with size %uMiB.", jsRuntimeInMiB);
289 exit(1);
290 }
291
292 // OOJSTimeManagementInit() must be called before any context is created!
294
295 [self createMainThreadContext];
296
297 return self;
298}
void OOJSTimeManagementInit(OOJavaScriptEngine *engine, JSRuntime *runtime)

◆ lookUpStandardClassPointers

- (BOOL) lookUpStandardClassPointers
implementation

Provided by category OOJavaScriptEngine(Private).

Definition at line 2531 of file OOJavaScriptEngine.m.

587{
588 JSObject *templateObject = NULL;
589
590 templateObject = JS_NewObject(gOOJSMainThreadContext, NULL, NULL, NULL);
591 if (EXPECT_NOT(templateObject == NULL)) return NO;
593
594 if (EXPECT_NOT(!JS_ValueToObject(gOOJSMainThreadContext, JS_GetEmptyStringValue(gOOJSMainThreadContext), &templateObject))) return NO;
596
597 templateObject = JS_NewArrayObject(gOOJSMainThreadContext, 0, NULL);
598 if (EXPECT_NOT(templateObject == NULL)) return NO;
600
601 if (EXPECT_NOT(!JS_ValueToObject(gOOJSMainThreadContext, INT_TO_JSVAL(0), &templateObject))) return NO;
603
604 if (EXPECT_NOT(!JS_ValueToObject(gOOJSMainThreadContext, JSVAL_FALSE, &templateObject))) return NO;
606
607 return YES;
608}
#define EXPECT_NOT(x)
OOINLINE JSClass * OOJSGetClass(JSContext *cx, JSObject *obj) ALWAYS_INLINE_FUNC

◆ numberClass

- (JSClass *) numberClass

Definition at line 2531 of file OOJavaScriptEngine.m.

575{
576 return _numberClass;
577}

◆ objectClass

- (JSClass *) objectClass

Definition at line 2531 of file OOJavaScriptEngine.m.

557{
558 return _objectClass;
559}

◆ registerStandardObjectConverters

- (void) registerStandardObjectConverters
implementation

Provided by category OOJavaScriptEngine(Private).

Definition at line 2531 of file OOJavaScriptEngine.m.

612{
618}
void OOJSRegisterObjectConverter(JSClass *theClass, OOJSClassConverterCallback converter)
NSDictionary * OOJSDictionaryFromJSObject(JSContext *context, JSObject *object)
id(* OOJSClassConverterCallback)(JSContext *context, JSObject *object)
static id JSNumberConverter(JSContext *context, JSObject *object)
static id JSStringConverter(JSContext *context, JSObject *object)
static id JSArrayConverter(JSContext *context, JSObject *object)
static id JSBooleanConverter(JSContext *context, JSObject *object)

◆ removeGCObjectRoot:

- (void) removeGCObjectRoot: (JSObject **) rootPtr

Definition at line 2531 of file OOJavaScriptEngine.m.

513 :(JSObject **)rootPtr
514{
515 JSContext *context = OOJSAcquireContext();
516 JS_RemoveObjectRoot(context, rootPtr);
517 OOJSRelinquishContext(context);
518}

◆ removeGCValueRoot:

- (void) removeGCValueRoot: (jsval *) rootPtr

Definition at line 2531 of file OOJavaScriptEngine.m.

521 :(jsval *)rootPtr
522{
523 JSContext *context = OOJSAcquireContext();
524 JS_RemoveValueRoot(context, rootPtr);
525 OOJSRelinquishContext(context);
526}

◆ reset

- (BOOL) reset

Definition at line 2531 of file OOJavaScriptEngine.m.

420{
421 NSAssert(gOOJSMainThreadContext != NULL, @"JavaScript engine not active. Can't reset.");
422
424
425# if 0
426 // deferred JS reset - test harness.
427 static int counter = 3; // loading a savegame with different strict mode calls js reset twice
428 if (counter-- == 0) {
429 counter = 3;
430 OOLog(@"script.javascript.init.error", @"%@", @"JavaScript processes still pending. Can't reset JavaScript engine.");
431 return NO;
432 }
433 else
434 {
435 OOLog(@"script.javascript.init", @"%@", @"JavaScript reset successful.");
436 }
437#endif
438
439#if JS_THREADSAFE
440 //NSAssert(!JS_IsInRequest(gOOJSMainThreadContext), @"JavaScript processes still pending. Can't reset JavaScript engine.");
441
443 {
444 // some threads are still pending, this should mean timers are still being removed.
445 OOLog(@"script.javascript.init.error", @"%@", @"JavaScript processes still pending. Can't reset JavaScript engine.");
446 return NO;
447 }
448 else
449 {
450 OOLog(@"script.javascript.init", @"%@", @"JavaScript reset successful.");
451 }
452#endif
453
454 JSContext *context = OOJSAcquireContext();
455 [[NSNotificationCenter defaultCenter] postNotificationName:kOOJavaScriptEngineWillResetNotification object:self];
456 OOJSRelinquishContext(context);
457
458 [self destroyMainThreadContext];
459 [self createMainThreadContext];
460
461 context = OOJSAcquireContext();
462 [[NSNotificationCenter defaultCenter] postNotificationName:kOOJavaScriptEngineDidResetNotification object:self];
463 OOJSRelinquishContext(context);
464
465 [self garbageCollectionOpportunity:YES];
466 return YES;
467}
#define JS_IsInRequest(context)

◆ runMissionCallback

- (void) runMissionCallback

Definition at line 2531 of file OOJavaScriptEngine.m.

254{
256}
void MissionRunCallback(void)

◆ sendMonitorError:withMessage:inContext:

- (void) sendMonitorError: (JSErrorReport *) errorReport
withMessage: (NSString *) message
inContext: (JSContext *) context 
implementation

Provided by category OOJavaScriptEngine(OOMonitorSupportInternal).

Definition at line 622 of file OOJavaScriptEngine.m.

683 :(JSErrorReport *)errorReport
684 withMessage:(NSString *)message
685 inContext:(JSContext *)theContext
686{
687 if ([_monitor respondsToSelector:@selector(jsEngine:context:error:stackSkip:showingLocation:withMessage:)])
688 {
689 [_monitor jsEngine:self context:theContext error:errorReport stackSkip:sErrorHandlerStackSkip showingLocation:[self showErrorLocations] withMessage:message];
690 }
691}

Referenced by ReportJSError().

+ Here is the caller graph for this function:

◆ sendMonitorLogMessage:withMessageClass:inContext: [1/2]

- (void) sendMonitorLogMessage: (NSString *) message
withMessageClass: (NSString *) messageClass
inContext: (JSContext *) context 
implementation

Provided by category OOJavaScriptEngine(OOMonitorSupportInternal).

Definition at line 622 of file OOJavaScriptEngine.m.

694 :(NSString *)message
695 withMessageClass:(NSString *)messageClass
696 inContext:(JSContext *)theContext
697{
698 if ([_monitor respondsToSelector:@selector(jsEngine:context:logMessage:ofClass:)])
699 {
700 [_monitor jsEngine:self context:theContext logMessage:message ofClass:messageClass];
701 }
702}

Referenced by GlobalLog().

+ Here is the caller graph for this function:

◆ sendMonitorLogMessage:withMessageClass:inContext: [2/2]

- (void) sendMonitorLogMessage: (NSString *) message
withMessageClass: (NSString *) messageClass
inContext: (JSContext *) context 
implementation

◆ setDumpStackForErrors:

- (void) setDumpStackForErrors: (BOOL) value

Definition at line 622 of file OOJavaScriptEngine.m.

641 :(BOOL)value
642{
643 _dumpStackForErrors = !!value;
644}

Referenced by ConsoleSetProperty().

+ Here is the caller graph for this function:

◆ setDumpStackForWarnings:

- (void) setDumpStackForWarnings: (BOOL) value

Definition at line 622 of file OOJavaScriptEngine.m.

653 :(BOOL)value
654{
655 _dumpStackForWarnings = !!value;
656}

Referenced by ConsoleSetProperty().

+ Here is the caller graph for this function:

◆ setMonitor:

- (void) setMonitor: (id<OOJavaScriptEngineMonitor>) inMonitor
implementation

Provided by category OOJavaScriptEngine(OOMonitorSupport).

Definition at line 622 of file OOJavaScriptEngine.m.

672 :(id<OOJavaScriptEngineMonitor>)inMonitor
673{
674 [_monitor autorelease];
675 _monitor = [inMonitor retain];
676}

◆ setShowErrorLocations:

- (void) setShowErrorLocations: (BOOL) value

Definition at line 2531 of file OOJavaScriptEngine.m.

550 :(BOOL)value
551{
552 _showErrorLocations = !!value;
553}

Referenced by ConsoleSetProperty().

+ Here is the caller graph for this function:

◆ sharedEngine

+ (OOJavaScriptEngine *) sharedEngine

Definition at line 2531 of file OOJavaScriptEngine.m.

246{
247 if (sSharedEngine == nil) sSharedEngine = [[self alloc] init];
248
249 return sSharedEngine;
250}

Referenced by OOJSGuiScreenKeyDefinition::callback, OOJSInterfaceDefinition::callback, OOJSPopulatorDefinition::callback, ConsoleSetProperty(), OOJSFunction::dealloc, DebugMonitorToJSConsole(), DescribeValue(), GlobalLog(), MissionRunCallback(), OOStringFromDeciCredits(), ReportJSError(), and NSObject(OODebugPlugInController)::setUpDebugger.

+ Here is the caller graph for this function:

◆ showErrorLocations

- (BOOL) showErrorLocations

Definition at line 2531 of file OOJavaScriptEngine.m.

545{
546 return _showErrorLocations;
547}

Referenced by ReportJSError().

+ Here is the caller graph for this function:

◆ stringClass

- (JSClass *) stringClass

Definition at line 2531 of file OOJavaScriptEngine.m.

563{
564 return _stringClass;
565}

◆ watchdogTimerThread

- (void) watchdogTimerThread
implementation

Provided by category OOJavaScriptEngine(WatchdogTimer).

Definition at line 591 of file OOJSEngineTimeManagement.m.

189{
190 for (;;)
191 {
192#if OOLITE_WINDOWS
193 Sleep(OOJS_TIME_LIMIT * 1000);
194#else
195 usleep(OOJS_TIME_LIMIT * 1000000);
196#endif
197
198 if (EXPECT(sLimiterStartDepth == 0 || sLimiterPauseDepth > 0)) continue; // Most of the time, a script isn't running.
199
200 // Note: if you add logging here, you need a manual autorelease pool.
201
205
206 if (EXPECT_NOT(elapsed > sLimiterTimeLimit))
207 {
208 sStop = YES;
209 JS_TriggerAllOperationCallbacks(_runtime);
210 }
211 }
212}
#define EXPECT(x)
#define OOJS_TIME_LIMIT
static BOOL sStop
static double sLimiterTimeLimit
static int sLimiterPauseDepth
static unsigned sLimiterStartDepth
static OOHighResTimeValue sLimiterStart
OOTimeDelta OOHighResTimeDeltaInSeconds(OOHighResTimeValue startTime, OOHighResTimeValue endTime)
uint64_t OOHighResTimeValue
#define OOGetHighResTime
#define OODisposeHighResTime(time)
double OOTimeDelta
Definition OOTypes.h:224

Member Data Documentation

◆ _arrayClass

- (JSClass*) _arrayClass
private

Definition at line 51 of file OOJavaScriptEngine.h.

◆ _booleanClass

- (JSClass*) _booleanClass
private

Definition at line 53 of file OOJavaScriptEngine.h.

◆ _dumpStackForErrors

- (BOOL) _dumpStackForErrors
private

Definition at line 56 of file OOJavaScriptEngine.h.

◆ _dumpStackForWarnings

- (BOOL) _dumpStackForWarnings
private

Definition at line 57 of file OOJavaScriptEngine.h.

◆ _globalObject

- (JSObject*) _globalObject
private

Definition at line 46 of file OOJavaScriptEngine.h.

◆ _numberClass

- (JSClass*) _numberClass
private

Definition at line 52 of file OOJavaScriptEngine.h.

◆ _objectClass

- (JSClass*) _objectClass
private

Definition at line 49 of file OOJavaScriptEngine.h.

◆ _runtime

- (JSRuntime*) _runtime
private

Definition at line 45 of file OOJavaScriptEngine.h.

◆ _showErrorLocations

- (BOOL) _showErrorLocations
private

Definition at line 47 of file OOJavaScriptEngine.h.

◆ _stringClass

- (JSClass*) _stringClass
private

Definition at line 50 of file OOJavaScriptEngine.h.


The documentation for this class was generated from the following files: