Oolite
Loading...
Searching...
No Matches
OOJavaScriptEngine.h File Reference
import "OOFoundation.h"
import "PlayerEntity.h"
import "PlayerEntityLegacyScriptEngine.h"
import "Universe.h"
#include <jsapi.h>
import "OOJSPropID.h"
import "OOJSEngineNativeWrappers.h"
Include dependency graph for OOJavaScriptEngine.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  OOJavaScriptEngine
category  NSObject(OOJavaScript)
class  OOJSValue
category  NSString(OOJavaScriptExtensions)
struct  JSFunctionPredicateParameter

Macros

#define OOJSENGINE_MONITOR_SUPPORT   OO_DEBUG_MONITOR_ENABLED
#define JS_IsInRequest(context)
#define JS_BeginRequest(context)
#define JS_EndRequest(context)
#define OOJSFreeValue(context, value)
#define OOJSUndefinedValue()
#define OOJSNullValue()
#define OOJSSTR(str)
#define DEFINE_JS_OBJECT_GETTER(NAME, JSCLASS, JSPROTO, OBJCCLASSNAME)
#define OOJSAddGCValueRoot(context, root, name)
#define OOJSAddGCStringRoot(context, root, name)
#define OOJSAddGCObjectRoot(context, root, name)
#define OOJSAddGCThingRoot(context, root, name)
#define OOJSDumpStack(cx)
#define OOJSDescribeLocation(cx, frame)
#define OOJSMarkConsoleEvalLocation(cx, frame)
#define OOJS_PROP_READWRITE   (JSPROP_PERMANENT | JSPROP_ENUMERATE)
#define OOJS_PROP_READONLY   (JSPROP_PERMANENT | JSPROP_ENUMERATE | JSPROP_READONLY)
#define OOJS_PROP_HIDDEN_READWRITE   (JSPROP_PERMANENT)
#define OOJS_PROP_HIDDEN_READONLY   (JSPROP_PERMANENT | JSPROP_READONLY)
#define OOJS_METHOD_READONLY   OOJS_PROP_HIDDEN_READONLY
#define OOJS_PROP_READWRITE_CB   (OOJS_PROP_READWRITE | JSPROP_SHARED)
#define OOJS_PROP_READONLY_CB   (OOJS_PROP_READONLY | JSPROP_SHARED)
#define OOJS_PROP_HIDDEN_READWRITE_CB   (OOJS_PROP_HIDDEN_READWRITE | JSPROP_SHARED)
#define OOJS_PROP_HIDDEN_READONLY_CB   (OOJS_PROP_HIDDEN_READONLY | JSPROP_SHARED)
#define OOJS_THIS   JS_THIS_OBJECT(context, vp)
#define OOJS_ARGV   JS_ARGV(context, vp)
#define OOJS_RVAL   JS_RVAL(context, vp)
#define OOJS_SET_RVAL(v)
#define OOJS_RETURN(v)
#define OOJS_RETURN_JSOBJECT(o)
#define OOJS_RETURN_VOID   OOJS_RETURN(JSVAL_VOID)
#define OOJS_RETURN_NULL   OOJS_RETURN(JSVAL_NULL)
#define OOJS_RETURN_BOOL(v)
#define OOJS_RETURN_INT(v)
#define OOJS_RETURN_OBJECT(o)
#define OOJS_RETURN_WITH_HELPER(helper, value)
#define OOJS_RETURN_VECTOR(value)
#define OOJS_RETURN_HPVECTOR(value)
#define OOJS_RETURN_QUATERNION(value)
#define OOJS_RETURN_DOUBLE(value)

Typedefs

typedef jsval OOJSVal
typedef id(* OOJSClassConverterCallback) (JSContext *context, JSObject *object)

Functions

OOINLINE JSContext * OOJSAcquireContext (void)
OOINLINE void OOJSRelinquishContext (JSContext *context)
OOINLINE BOOL OOJSValueIsUndefined (jsval value)
OOINLINE jsval OOJSValueFromDouble (JSContext *context, double value)
OOINLINE BOOL OOJSValueToBOOL (JSContext *context, jsval value)
OOINLINE BOOL OOJSValueToInt32 (JSContext *context, jsval value, int32_t *outValue)
OOINLINE void OOJSReportPendingException (JSContext *context)
void OOJSReportError (JSContext *context, NSString *format,...)
void OOJSReportErrorWithArguments (JSContext *context, NSString *format, va_list args)
void OOJSReportErrorForCaller (JSContext *context, NSString *scriptClass, NSString *function, NSString *format,...)
void OOJSReportWarning (JSContext *context, NSString *format,...)
void OOJSReportWarningWithArguments (JSContext *context, NSString *format, va_list args)
void OOJSReportWarningForCaller (JSContext *context, NSString *scriptClass, NSString *function, NSString *format,...)
void OOJSReportBadPropertySelector (JSContext *context, JSObject *thisObj, jsid propID, JSPropertySpec *propertySpec)
void OOJSReportBadPropertyValue (JSContext *context, JSObject *thisObj, jsid propID, JSPropertySpec *propertySpec, jsval value)
void OOJSReportBadArguments (JSContext *context, NSString *scriptClass, NSString *function, uintN argc, jsval *argv, NSString *message, NSString *expectedArgsDescription)
void OOJSSetWarningOrErrorStackSkip (unsigned skip)
BOOL OOJSArgumentListGetNumber (JSContext *context, NSString *scriptClass, NSString *function, uintN argc, jsval *argv, double *outNumber, uintN *outConsumed)
BOOL OOJSArgumentListGetNumberNoError (JSContext *context, uintN argc, jsval *argv, double *outNumber, uintN *outConsumed)
OOINLINE jsval OOJSValueFromBOOL (int b) INLINE_CONST_FUNC
OOINLINE jsval OOJSValueFromNativeObject (JSContext *context, id object)
JSObject * OOJSObjectFromNativeObject (JSContext *context, id object)
void OOJSStrLiteralCachePRIVATE (const char *string, jsval *strCache, BOOL *inited)
NSString * OOStringFromJSString (JSContext *context, JSString *string)
NSString * OOStringFromJSValue (JSContext *context, jsval value)
NSString * OOStringFromJSValueEvenIfNull (JSContext *context, jsval value)
NSString * OOStringFromJSPropertyIDAndSpec (JSContext *context, jsid propID, JSPropertySpec *propertySpec)
NSString * OOJSDescribeValue (JSContext *context, jsval value, BOOL abbreviateObjects)
NSString * OOStringFromJSID (jsid propID)
jsid OOJSIDFromString (NSString *string)
BOOL JSFunctionPredicate (Entity *entity, void *parameter)
BOOL JSEntityIsJavaScriptVisiblePredicate (Entity *entity, void *parameter)
BOOL JSEntityIsJavaScriptSearchablePredicate (Entity *entity, void *parameter)
BOOL JSEntityIsDemoShipPredicate (Entity *entity, void *parameter)
id OOJSNativeObjectFromJSValue (JSContext *context, jsval value)
id OOJSNativeObjectFromJSObject (JSContext *context, JSObject *object)
id OOJSNativeObjectOfClassFromJSValue (JSContext *context, jsval value, Class requiredClass)
id OOJSNativeObjectOfClassFromJSObject (JSContext *context, JSObject *object, Class requiredClass)
OOINLINE JSClass * OOJSGetClass (JSContext *cx, JSObject *obj) ALWAYS_INLINE_FUNC
OOINLINE BOOL OOJSValueIsFunction (JSContext *context, jsval value)
OOINLINE BOOL OOJSValueIsArray (JSContext *context, jsval value)
NSDictionary * OOJSDictionaryFromJSValue (JSContext *context, jsval value)
NSDictionary * OOJSDictionaryFromJSObject (JSContext *context, JSObject *object)
NSDictionary * OOJSDictionaryFromStringTable (JSContext *context, jsval value)
BOOL OOJSObjectGetterImplPRIVATE (JSContext *context, JSObject *object, JSClass *requiredJSClass, Class requiredObjCClass, const char *name, id *outObject)
void OOJSRegisterSubclass (JSClass *subclass, JSClass *superclass)
BOOL OOJSIsSubclass (JSClass *putativeSubclass, JSClass *superclass)
OOINLINE BOOL OOJSIsMemberOfSubclass (JSContext *context, JSObject *object, JSClass *superclass)
id OOJSBasicPrivateObjectConverter (JSContext *context, JSObject *object)
void OOJSRegisterObjectConverter (JSClass *theClass, OOJSClassConverterCallback converter)
void OOJSPauseTimeLimiter (void)
void OOJSResumeTimeLimiter (void)
JSBool OOJSUnconstructableConstruct (JSContext *context, uintN argc, jsval *vp)
void OOJSObjectWrapperFinalize (JSContext *context, JSObject *this)
JSBool OOJSObjectWrapperToString (JSContext *context, uintN argc, jsval *vp)

Variables

NSString *const kOOJavaScriptEngineWillResetNotification
NSString *const kOOJavaScriptEngineDidResetNotification

Macro Definition Documentation

◆ DEFINE_JS_OBJECT_GETTER

#define DEFINE_JS_OBJECT_GETTER ( NAME,
JSCLASS,
JSPROTO,
OBJCCLASSNAME )
Value:
static BOOL NAME(JSContext* context, JSObject* inObject, OBJCCLASSNAME** outObject) GCC_ATTR((unused)); \
static BOOL NAME(JSContext* context, JSObject* inObject, OBJCCLASSNAME** outObject) \
{ \
NSCParameterAssert(outObject != NULL); \
static Class cls = Nil; \
if (EXPECT_NOT(cls == Nil)) \
cls = [OBJCCLASSNAME class]; \
return OOJSObjectGetterImplPRIVATE(context, inObject, JSCLASS, cls, #NAME, (id*)outObject); \
}
#define EXPECT_NOT(x)
#define GCC_ATTR(x)
BOOL OOJSObjectGetterImplPRIVATE(JSContext *context, JSObject *object, JSClass *requiredJSClass, Class requiredObjCClass, const char *name, id *outObject)

Definition at line 462 of file OOJavaScriptEngine.h.

462#define DEFINE_JS_OBJECT_GETTER(NAME, JSCLASS, JSPROTO, OBJCCLASSNAME) \
463 static BOOL NAME(JSContext* context, JSObject* inObject, OBJCCLASSNAME** outObject) GCC_ATTR((unused)); \
464 static BOOL NAME(JSContext* context, JSObject* inObject, OBJCCLASSNAME** outObject) \
465 { \
466 NSCParameterAssert(outObject != NULL); \
467 static Class cls = Nil; \
468 if (EXPECT_NOT(cls == Nil)) \
469 cls = [OBJCCLASSNAME class]; \
470 return OOJSObjectGetterImplPRIVATE(context, inObject, JSCLASS, cls, #NAME, (id*)outObject); \
471 }

◆ JS_BeginRequest

#define JS_BeginRequest ( context)
Value:
do { \
} while (0)

Definition at line 107 of file OOJavaScriptEngine.h.

107#define JS_BeginRequest(context) \
108 do { \
109 } while (0)

Referenced by OOJavaScriptEngine(Private)::createMainThreadContext, and OOJSAcquireContext().

◆ JS_EndRequest

#define JS_EndRequest ( context)
Value:
do { \
} while (0)

Definition at line 110 of file OOJavaScriptEngine.h.

110#define JS_EndRequest(context) \
111 do { \
112 } while (0)

Referenced by OOJavaScriptEngine(Private)::createMainThreadContext, and OOJSRelinquishContext().

◆ JS_IsInRequest

◆ OOJS_ARGV

#define OOJS_ARGV   JS_ARGV(context, vp)

Definition at line 665 of file OOJavaScriptEngine.h.

Referenced by ClockAddSeconds(), ClockAddSeconds(), ClockClockStringForTime(), ClockClockStringForTime(), DockIsQueued(), DockIsQueued(), EquipmentInfoStaticInfoForKey(), EquipmentInfoStaticInfoForKey(), FontMeasureString(), FontMeasureString(), GlobalAddFrameCallback(), GlobalAddFrameCallback(), GlobalAutoAIForRole(), GlobalAutoAIForRole(), GlobalClearExtraGuiScreenKeys(), GlobalClearExtraGuiScreenKeys(), GlobalDisplayNameForCommodity(), GlobalDisplayNameForCommodity(), GlobalExpandDescription(), GlobalExpandDescription(), GlobalExpandMissionText(), GlobalExpandMissionText(), GlobalGetGuiColorSettingForKey(), GlobalGetGuiColorSettingForKey(), GlobalGetScreenBackgroundForKey(), GlobalGetScreenBackgroundForKey(), GlobalIsValidFrameCallback(), GlobalIsValidFrameCallback(), GlobalKeyBindingDescription(), GlobalKeyBindingDescription(), GlobalLog(), GlobalLog(), GlobalLog(), GlobalRandomInhabitantsDescription(), GlobalRandomInhabitantsDescription(), GlobalRemoveFrameCallback(), GlobalRemoveFrameCallback(), GlobalSetExtraGuiScreenKeys(), GlobalSetExtraGuiScreenKeys(), GlobalSetGuiColorSettingForKey(), GlobalSetGuiColorSettingForKey(), GlobalSetScreenBackground(), GlobalSetScreenBackground(), GlobalSetScreenBackgroundForKey(), GlobalSetScreenBackgroundForKey(), GlobalSetScreenOverlay(), GlobalSetScreenOverlay(), ManifestComment(), ManifestComment(), ManifestSetComment(), ManifestSetComment(), ManifestSetShortComment(), ManifestSetShortComment(), ManifestShortComment(), ManifestShortComment(), MissionAddMessageText(), MissionAddMessageText(), MissionMarkSystem(), MissionMarkSystem(), MissionRunScreen(), MissionRunScreen(), MissionSetInstructions(), MissionSetInstructionsInternal(), MissionSetInstructionsKey(), MissionUnmarkSystem(), MissionUnmarkSystem(), OoliteCompareVersion(), OoliteCompareVersion(), PlayerAddMessageToArrivalReport(), PlayerAddMessageToArrivalReport(), PlayerAudioMessage(), PlayerAudioMessage(), PlayerCommsMessage(), PlayerCommsMessage(), PlayerConsoleMessage(), PlayerConsoleMessage(), PlayerEndScenario(), PlayerEndScenario(), PlayerReplaceShip(), PlayerReplaceShip(), PlayerSetEscapePodDestination(), PlayerSetEscapePodDestination(), PlayerSetPlayerRole(), PlayerSetPlayerRole(), PlayerShipAddParcel(), PlayerShipAddParcel(), PlayerShipAddPassenger(), PlayerShipAddPassenger(), PlayerShipAwardContract(), PlayerShipAwardContract(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipBeginGalacticHyperspaceCountdown(), PlayerShipBeginGalacticHyperspaceCountdown(), PlayerShipBeginHyperspaceCountdown(), PlayerShipBeginHyperspaceCountdown(), PlayerShipCancelDockingRequest(), PlayerShipCancelDockingRequest(), PlayerShipEngageAutopilotToStation(), PlayerShipEngageAutopilotToStation(), PlayerShipHideHUDSelector(), PlayerShipHideHUDSelector(), PlayerShipRemoveContract(), PlayerShipRemoveContract(), PlayerShipRemoveParcel(), PlayerShipRemoveParcel(), PlayerShipRemovePassenger(), PlayerShipRemovePassenger(), PlayerShipRequestDockingClearance(), PlayerShipRequestDockingClearance(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomView(), PlayerShipSetCustomView(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionText(), PlayerShipSetMultiFunctionText(), PlayerShipSetPrimedEquipment(), PlayerShipSetPrimedEquipment(), PlayerShipShowHUDSelector(), PlayerShipShowHUDSelector(), PlayerShipUseSpecialCargo(), PlayerShipUseSpecialCargo(), QuaternionConstruct(), QuaternionDot(), QuaternionDot(), QuaternionMultiply(), QuaternionMultiply(), QuaternionRotate(), QuaternionRotate(), QuaternionRotateX(), QuaternionRotateX(), QuaternionRotateY(), QuaternionRotateY(), QuaternionRotateZ(), QuaternionRotateZ(), ShipAddCargoEntity(), ShipAddCargoEntity(), ShipAddCollisionException(), ShipAddCollisionException(), ShipAddDefenseTarget(), ShipAddDefenseTarget(), ShipAdjustCargo(), ShipAdjustCargo(), ShipAwardEquipment(), ShipAwardEquipment(), ShipCanAwardEquipment(), ShipCanAwardEquipment(), ShipCheckScanner(), ShipCheckScanner(), ShipCommsMessage(), ShipCommsMessage(), ShipDealEnergyDamage(), ShipDealEnergyDamage(), ShipDumpCargo(), ShipDumpCargo(), ShipEjectItem(), ShipEjectItem(), ShipEjectSpecificItem(), ShipEjectSpecificItem(), ShipEnterWormhole(), ShipEnterWormhole(), ShipEquipmentStatus(), ShipEquipmentStatus(), ShipExitAI(), ShipExitAI(), ShipExitSystem(), ShipExitSystem(), ShipExplode(), ShipGroupAddShip(), ShipGroupAddShip(), ShipGroupConstruct(), ShipGroupConstruct(), ShipGroupContainsShip(), ShipGroupContainsShip(), ShipGroupRemoveShip(), ShipGroupRemoveShip(), ShipHasEquipmentProviding(), ShipHasEquipmentProviding(), ShipHasRole(), ShipHasRole(), ShipOfferToEscort(), ShipOfferToEscort(), ShipPatrolReportIn(), ShipPatrolReportIn(), ShipReactToAIMessage(), ShipReactToAIMessage(), ShipRemove(), ShipRemove(), ShipRemoveCollisionException(), ShipRemoveCollisionException(), ShipRemoveDefenseTarget(), ShipRemoveDefenseTarget(), ShipRemoveEquipment(), ShipRemoveEquipment(), ShipRunLegacyScriptActions(), ShipRunLegacyScriptActions(), ShipSendAIMessage(), ShipSendAIMessage(), ShipSetAI(), ShipSetAI(), ShipSetBounty(), ShipSetBounty(), ShipSetCargo(), ShipSetCargo(), ShipSetCargoType(), ShipSetCargoType(), ShipSetCrew(), ShipSetCrew(), ShipSetEquipmentStatus(), ShipSetEquipmentStatus(), ShipSetMaterials(), ShipSetMaterials(), ShipSetMaterialsInternal(), ShipSetMaterialsInternal(), ShipSetScript(), ShipSetScript(), ShipSetShaders(), ShipSetShaders(), ShipSpawn(), ShipSpawn(), ShipStaticKeysForRole(), ShipStaticKeysForRole(), ShipStaticRoleIsInCategory(), ShipStaticRoleIsInCategory(), ShipStaticSetShipDataForKey(), ShipStaticSetShipDataForKey(), ShipStaticShipDataForKey(), ShipStaticShipDataForKey(), ShipSwitchAI(), ShipSwitchAI(), ShipThreatAssessment(), ShipThreatAssessment(), SoundSourcePlay(), SoundSourcePlay(), SoundStaticLoad(), SoundStaticLoad(), SoundStaticPlayMusic(), SoundStaticPlayMusic(), SoundStaticStopMusic(), SoundStaticStopMusic(), SpecialJSWarning(), SpecialJSWarning(), StationAbortDockingForShip(), StationAbortDockingForShip(), StationAddShipToShipyard(), StationAddShipToShipyard(), StationCanDockShip(), StationCanDockShip(), StationLaunchShipWithRole(), StationLaunchShipWithRole(), StationRemoveShipFromShipyard(), StationRemoveShipFromShipyard(), StationSetInterface(), StationSetInterface(), StationSetMarketPrice(), StationSetMarketPrice(), StationSetMarketQuantity(), StationSetMarketQuantity(), SunGoNova(), SunGoNova(), SystemAddGroup(), SystemAddGroupToRoute(), SystemAddMoon(), SystemAddMoon(), SystemAddPlanet(), SystemAddPlanet(), SystemAddShips(), SystemAddShipsOrGroup(), SystemAddShipsOrGroupToRoute(), SystemAddShipsToRoute(), SystemAddVisualEffect(), SystemAddVisualEffect(), SystemCountEntitiesWithScanClass(), SystemCountEntitiesWithScanClass(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithRole(), SystemCountShipsWithRole(), SystemEntitiesWithScanClass(), SystemEntitiesWithScanClass(), SystemFilteredEntities(), SystemFilteredEntities(), SystemInfoDistanceToSystem(), SystemInfoDistanceToSystem(), SystemInfoRouteToSystem(), SystemInfoRouteToSystem(), SystemInfoSamplePrice(), SystemInfoSamplePrice(), SystemInfoSetPropertyMethod(), SystemInfoSetPropertyMethod(), SystemInfoStaticFilteredSystems(), SystemInfoStaticFilteredSystems(), SystemInfoStaticSetInterstellarProperty(), SystemInfoStaticSetInterstellarProperty(), SystemLegacyAddShips(), SystemLegacyAddShips(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddSystemShips(), SystemLegacyAddSystemShips(), SystemLegacySpawnShip(), SystemLegacySpawnShip(), SystemLocationFromCode(), SystemLocationFromCode(), SystemSetPopulator(), SystemSetPopulator(), SystemSetWaypoint(), SystemSetWaypoint(), SystemShipsWithPrimaryRole(), SystemShipsWithPrimaryRole(), SystemShipsWithRole(), SystemShipsWithRole(), SystemStaticInfoForSystem(), SystemStaticInfoForSystem(), SystemStaticSystemIDForName(), SystemStaticSystemIDForName(), SystemStaticSystemNameForID(), SystemStaticSystemNameForID(), TimerConstruct(), TimerConstruct(), ValidateContracts(), VectorAdd(), VectorAdd(), VectorAngleTo(), VectorAngleTo(), VectorConstruct(), VectorCross(), VectorCross(), VectorDistanceTo(), VectorDistanceTo(), VectorDot(), VectorDot(), VectorFromCoordinateSystem(), VectorFromCoordinateSystem(), VectorMultiply(), VectorMultiply(), VectorRotateBy(), VectorRotateBy(), VectorRotationTo(), VectorRotationTo(), VectorSquaredDistanceTo(), VectorSquaredDistanceTo(), VectorStaticInterpolate(), VectorStaticInterpolate(), VectorStaticRandom(), VectorStaticRandom(), VectorStaticRandomDirection(), VectorStaticRandomDirection(), VectorStaticRandomDirectionAndLength(), VectorStaticRandomDirectionAndLength(), VectorSubtract(), VectorSubtract(), VectorToCoordinateSystem(), VectorToCoordinateSystem(), VectorTripleProduct(), VectorTripleProduct(), VisualEffectScale(), VisualEffectScale(), VisualEffectSetMaterials(), VisualEffectSetMaterials(), VisualEffectSetMaterialsInternal(), VisualEffectSetMaterialsInternal(), VisualEffectSetShaders(), and VisualEffectSetShaders().

◆ OOJS_METHOD_READONLY

#define OOJS_METHOD_READONLY   OOJS_PROP_HIDDEN_READONLY

Definition at line 654 of file OOJavaScriptEngine.h.

Referenced by InitOOJSFont(), InitOOJSFont(), and InitOOJSFrameCallbacks().

◆ OOJS_PROP_HIDDEN_READONLY

#define OOJS_PROP_HIDDEN_READONLY   (JSPROP_PERMANENT | JSPROP_READONLY)

Definition at line 651 of file OOJavaScriptEngine.h.

◆ OOJS_PROP_HIDDEN_READONLY_CB

#define OOJS_PROP_HIDDEN_READONLY_CB   (OOJS_PROP_HIDDEN_READONLY | JSPROP_SHARED)

Definition at line 661 of file OOJavaScriptEngine.h.

◆ OOJS_PROP_HIDDEN_READWRITE

#define OOJS_PROP_HIDDEN_READWRITE   (JSPROP_PERMANENT)

Definition at line 650 of file OOJavaScriptEngine.h.

◆ OOJS_PROP_HIDDEN_READWRITE_CB

#define OOJS_PROP_HIDDEN_READWRITE_CB   (OOJS_PROP_HIDDEN_READWRITE | JSPROP_SHARED)

Definition at line 660 of file OOJavaScriptEngine.h.

◆ OOJS_PROP_READONLY

◆ OOJS_PROP_READONLY_CB

#define OOJS_PROP_READONLY_CB   (OOJS_PROP_READONLY | JSPROP_SHARED)

Definition at line 658 of file OOJavaScriptEngine.h.

Referenced by WorldScriptsEnumerate().

◆ OOJS_PROP_READWRITE

#define OOJS_PROP_READWRITE   (JSPROP_PERMANENT | JSPROP_ENUMERATE)

Definition at line 646 of file OOJavaScriptEngine.h.

◆ OOJS_PROP_READWRITE_CB

#define OOJS_PROP_READWRITE_CB   (OOJS_PROP_READWRITE | JSPROP_SHARED)

Definition at line 657 of file OOJavaScriptEngine.h.

◆ OOJS_RETURN

#define OOJS_RETURN ( v)
Value:
do { \
OOJS_SET_RVAL(v); \
return YES; \
} while (0)

Definition at line 669 of file OOJavaScriptEngine.h.

669#define OOJS_RETURN(v) \
670 do { \
671 OOJS_SET_RVAL(v); \
672 return YES; \
673 } while (0)

Referenced by ShipEquipmentStatus(), ShipEquipmentStatus(), SystemStaticInfoForSystem(), and SystemStaticInfoForSystem().

◆ OOJS_RETURN_BOOL

#define OOJS_RETURN_BOOL ( v)
Value:
#define OOJS_RETURN(v)
OOINLINE jsval OOJSValueFromBOOL(int b) INLINE_CONST_FUNC

Definition at line 677 of file OOJavaScriptEngine.h.

Referenced by ClockAddSeconds(), ClockAddSeconds(), DockIsQueued(), DockIsQueued(), GlobalClearExtraGuiScreenKeys(), GlobalClearExtraGuiScreenKeys(), GlobalIsValidFrameCallback(), GlobalIsValidFrameCallback(), GlobalPauseGame(), GlobalPauseGame(), GlobalQuitGame(), GlobalSetExtraGuiScreenKeys(), GlobalSetExtraGuiScreenKeys(), GlobalSetGuiColorSettingForKey(), GlobalSetGuiColorSettingForKey(), GlobalSetScreenBackground(), GlobalSetScreenBackground(), GlobalSetScreenBackgroundForKey(), GlobalSetScreenBackgroundForKey(), GlobalSetScreenOverlay(), GlobalSetScreenOverlay(), ManifestSetComment(), ManifestSetComment(), ManifestSetShortComment(), ManifestSetShortComment(), MissionRunScreen(), MissionRunScreen(), MissionRunShipLibrary(), MissionRunShipLibrary(), MissionUnmarkSystem(), MissionUnmarkSystem(), PlayerEndScenario(), PlayerEndScenario(), PlayerReplaceShip(), PlayerReplaceShip(), PlayerShipAddParcel(), PlayerShipAddParcel(), PlayerShipAddPassenger(), PlayerShipAddPassenger(), PlayerShipAwardContract(), PlayerShipAwardContract(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipBeginGalacticHyperspaceCountdown(), PlayerShipBeginGalacticHyperspaceCountdown(), PlayerShipBeginHyperspaceCountdown(), PlayerShipBeginHyperspaceCountdown(), PlayerShipCancelHyperspaceCountdown(), PlayerShipCancelHyperspaceCountdown(), PlayerShipEngageAutopilotToStation(), PlayerShipEngageAutopilotToStation(), PlayerShipRemoveContract(), PlayerShipRemoveContract(), PlayerShipRemoveParcel(), PlayerShipRemoveParcel(), PlayerShipRemovePassenger(), PlayerShipRemovePassenger(), PlayerShipResetCustomView(), PlayerShipResetCustomView(), PlayerShipSetCustomView(), PlayerShipSetCustomView(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetPrimedEquipment(), PlayerShipSetPrimedEquipment(), PlayerShipTakeInternalDamage(), PlayerShipTakeInternalDamage(), ShipAbandonShip(), ShipAbandonShip(), ShipAddCargoEntity(), ShipAddCargoEntity(), ShipAdjustCargo(), ShipAdjustCargo(), ShipAwardEquipment(), ShipAwardEquipment(), ShipCanAwardEquipment(), ShipCanAwardEquipment(), ShipExitSystem(), ShipExitSystem(), ShipFireECM(), ShipFireECM(), ShipGroupAddShip(), ShipGroupAddShip(), ShipGroupContainsShip(), ShipGroupContainsShip(), ShipGroupRemoveShip(), ShipGroupRemoveShip(), ShipHasEquipmentProviding(), ShipHasEquipmentProviding(), ShipHasRole(), ShipHasRole(), ShipMarkTargetForFines(), ShipMarkTargetForFines(), ShipOfferToEscort(), ShipOfferToEscort(), ShipRemoveEquipment(), ShipRemoveEquipment(), ShipRestoreSubEntities(), ShipRestoreSubEntities(), ShipSetCargo(), ShipSetCargo(), ShipSetCargoType(), ShipSetCargoType(), ShipSetCrew(), ShipSetCrew(), ShipSetEquipmentStatus(), ShipSetEquipmentStatus(), ShipSetMaterialsInternal(), ShipSetMaterialsInternal(), ShipSetShaders(), ShipSetShaders(), ShipStaticRoleIsInCategory(), ShipStaticRoleIsInCategory(), ShipStaticSetShipDataForKey(), ShipStaticSetShipDataForKey(), StationAddShipToShipyard(), StationAddShipToShipyard(), StationCanDockShip(), StationCanDockShip(), StationRemoveShipFromShipyard(), StationRemoveShipFromShipyard(), StationSetMarketPrice(), StationSetMarketPrice(), StationSetMarketQuantity(), StationSetMarketQuantity(), TimerStart(), TimerStart(), VisualEffectRestoreSubEntities(), VisualEffectRestoreSubEntities(), VisualEffectSetMaterialsInternal(), VisualEffectSetMaterialsInternal(), VisualEffectSetShaders(), and VisualEffectSetShaders().

◆ OOJS_RETURN_DOUBLE

◆ OOJS_RETURN_HPVECTOR

◆ OOJS_RETURN_INT

◆ OOJS_RETURN_JSOBJECT

#define OOJS_RETURN_JSOBJECT ( o)
Value:
OOJS_RETURN(OBJECT_TO_JSVAL(o))

Definition at line 674 of file OOJavaScriptEngine.h.

Referenced by QuaternionConstruct(), and VectorConstruct().

◆ OOJS_RETURN_NULL

◆ OOJS_RETURN_OBJECT

#define OOJS_RETURN_OBJECT ( o)
Value:
OOINLINE jsval OOJSValueFromNativeObject(JSContext *context, id object)

Definition at line 679 of file OOJavaScriptEngine.h.

Referenced by ClockClockStringForTime(), ClockClockStringForTime(), EquipmentInfoStaticInfoForKey(), EquipmentInfoStaticInfoForKey(), GlobalAutoAIForRole(), GlobalAutoAIForRole(), GlobalDisplayNameForCommodity(), GlobalDisplayNameForCommodity(), GlobalExpandDescription(), GlobalExpandDescription(), GlobalExpandMissionText(), GlobalExpandMissionText(), GlobalGetGuiColorSettingForKey(), GlobalGetGuiColorSettingForKey(), GlobalGetScreenBackgroundForKey(), GlobalGetScreenBackgroundForKey(), GlobalKeyBindingDescription(), GlobalKeyBindingDescription(), GlobalRandomInhabitantsDescription(), GlobalRandomInhabitantsDescription(), GlobalRandomName(), GlobalRandomName(), JSClockToString(), JSClockToString(), ManifestComment(), ManifestComment(), ManifestShortComment(), ManifestShortComment(), OOJSObjectWrapperToString(), OOJSObjectWrapperToString(), QuaternionToSource(), QuaternionToSource(), QuaternionToString(), QuaternionToString(), ShipCheckCourseToDestination(), ShipCheckCourseToDestination(), ShipCheckScanner(), ShipCheckScanner(), ShipDumpCargo(), ShipDumpCargo(), ShipEjectItem(), ShipEjectItem(), ShipEjectSpecificItem(), ShipEjectSpecificItem(), ShipEquipmentStatus(), ShipEquipmentStatus(), ShipFindNearestStation(), ShipFindNearestStation(), ShipFireMissile(), ShipFireMissile(), ShipGetMaterials(), ShipGetMaterials(), ShipGetShaders(), ShipGetShaders(), ShipGroupConstruct(), ShipGroupConstruct(), ShipRecallDockingInstructions(), ShipRecallDockingInstructions(), ShipRequestDockingInstructions(), ShipRequestDockingInstructions(), ShipSelectNewMissile(), ShipSelectNewMissile(), ShipSpawn(), ShipSpawn(), ShipStaticKeys(), ShipStaticKeys(), ShipStaticKeysForRole(), ShipStaticKeysForRole(), ShipStaticRoles(), ShipStaticRoles(), ShipStaticShipDataForKey(), ShipStaticShipDataForKey(), SoundSourceConstruct(), SoundSourceConstruct(), SoundStaticLoad(), SoundStaticLoad(), SoundStaticMusicSoundSource(), SoundStaticMusicSoundSource(), StationLaunchDefenseShip(), StationLaunchDefenseShip(), StationLaunchEscort(), StationLaunchEscort(), StationLaunchMiner(), StationLaunchMiner(), StationLaunchPatrol(), StationLaunchPatrol(), StationLaunchPirateShip(), StationLaunchPirateShip(), StationLaunchPolice(), StationLaunchPolice(), StationLaunchScavenger(), StationLaunchScavenger(), StationLaunchShipWithRole(), StationLaunchShipWithRole(), StationLaunchShuttle(), StationLaunchShuttle(), SystemAddMoon(), SystemAddMoon(), SystemAddPlanet(), SystemAddPlanet(), SystemAddShipsOrGroup(), SystemAddShipsOrGroup(), SystemAddShipsOrGroupToRoute(), SystemAddShipsOrGroupToRoute(), SystemAddVisualEffect(), SystemAddVisualEffect(), SystemEntitiesWithScanClass(), SystemEntitiesWithScanClass(), SystemFilteredEntities(), SystemFilteredEntities(), SystemInfoRouteToSystem(), SystemInfoRouteToSystem(), SystemShipsWithPrimaryRole(), SystemShipsWithPrimaryRole(), SystemShipsWithRole(), SystemShipsWithRole(), SystemStaticSystemNameForID(), SystemStaticSystemNameForID(), SystemToString(), SystemToString(), TimerConstruct(), VectorToSource(), VectorToSource(), VectorToString(), VectorToString(), VisualEffectGetMaterials(), VisualEffectGetMaterials(), VisualEffectGetShaders(), and VisualEffectGetShaders().

◆ OOJS_RETURN_QUATERNION

◆ OOJS_RETURN_VECTOR

◆ OOJS_RETURN_VOID

#define OOJS_RETURN_VOID   OOJS_RETURN(JSVAL_VOID)

Definition at line 675 of file OOJavaScriptEngine.h.

Referenced by ExhaustPlumeRemove(), ExhaustPlumeRemove(), FlasherRemove(), FlasherRemove(), GlobalLog(), GlobalLog(), GlobalLog(), GlobalRemoveFrameCallback(), GlobalRemoveFrameCallback(), MissionAddMessageText(), MissionAddMessageText(), MissionMarkSystem(), MissionMarkSystem(), MissionSetInstructionsInternal(), MissionSetInstructionsInternal(), OoliteCompareVersion(), OoliteCompareVersion(), PlayerAddMessageToArrivalReport(), PlayerAddMessageToArrivalReport(), PlayerAudioMessage(), PlayerAudioMessage(), PlayerCommsMessage(), PlayerCommsMessage(), PlayerConsoleMessage(), PlayerConsoleMessage(), PlayerDecreaseContractReputation(), PlayerDecreaseContractReputation(), PlayerDecreaseParcelReputation(), PlayerDecreaseParcelReputation(), PlayerDecreasePassengerReputation(), PlayerDecreasePassengerReputation(), PlayerIncreaseContractReputation(), PlayerIncreaseContractReputation(), PlayerIncreaseParcelReputation(), PlayerIncreaseParcelReputation(), PlayerIncreasePassengerReputation(), PlayerIncreasePassengerReputation(), PlayerSetEscapePodDestination(), PlayerSetPlayerRole(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipCancelDockingRequest(), PlayerShipCancelDockingRequest(), PlayerShipDisengageAutopilot(), PlayerShipDisengageAutopilot(), PlayerShipEngageAutopilotToStation(), PlayerShipEngageAutopilotToStation(), PlayerShipHideHUDSelector(), PlayerShipHideHUDSelector(), PlayerShipLaunch(), PlayerShipLaunch(), PlayerShipRemoveAllCargo(), PlayerShipRemoveAllCargo(), PlayerShipRequestDockingClearance(), PlayerShipRequestDockingClearance(), PlayerShipResetScannerZoom(), PlayerShipResetScannerZoom(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomHUDDial(), PlayerShipSetMultiFunctionText(), PlayerShipSetMultiFunctionText(), PlayerShipShowHUDSelector(), PlayerShipShowHUDSelector(), PlayerShipUseSpecialCargo(), PlayerShipUseSpecialCargo(), PlayerStopAudioMessage(), PlayerStopAudioMessage(), RemoveOrExplodeShip(), RemoveOrExplodeShip(), ShipAddCollisionException(), ShipAddCollisionException(), ShipAddDefenseTarget(), ShipAddDefenseTarget(), ShipBecomeCascadeExplosion(), ShipBecomeCascadeExplosion(), ShipBroadcastCascadeImminent(), ShipBroadcastCascadeImminent(), ShipBroadcastDistressMessage(), ShipBroadcastDistressMessage(), ShipClearDefenseTargets(), ShipClearDefenseTargets(), ShipCommsMessage(), ShipCommsMessage(), ShipDealEnergyDamage(), ShipDealEnergyDamage(), ShipDeployEscorts(), ShipDeployEscorts(), ShipDockEscorts(), ShipDockEscorts(), ShipEnterWormhole(), ShipEnterWormhole(), ShipExitAI(), ShipExitAI(), ShipGroupAddShip(), ShipGroupAddShip(), ShipGroupRemoveShip(), ShipGroupRemoveShip(), ShipNotifyGroupOfWormhole(), ShipNotifyGroupOfWormhole(), ShipPatrolReportIn(), ShipPatrolReportIn(), ShipPerformAttack(), ShipPerformAttack(), ShipPerformCollect(), ShipPerformCollect(), ShipPerformEscort(), ShipPerformEscort(), ShipPerformFaceDestination(), ShipPerformFaceDestination(), ShipPerformFlee(), ShipPerformFlee(), ShipPerformFlyToRangeFromDestination(), ShipPerformFlyToRangeFromDestination(), ShipPerformHold(), ShipPerformHold(), ShipPerformIdle(), ShipPerformIdle(), ShipPerformIntercept(), ShipPerformIntercept(), ShipPerformLandOnPlanet(), ShipPerformLandOnPlanet(), ShipPerformMining(), ShipPerformMining(), ShipPerformScriptedAI(), ShipPerformScriptedAI(), ShipPerformScriptedAttackAI(), ShipPerformScriptedAttackAI(), ShipPerformStop(), ShipPerformStop(), ShipPerformTumble(), ShipPerformTumble(), ShipReactToAIMessage(), ShipReactToAIMessage(), ShipRemoveCollisionException(), ShipRemoveCollisionException(), ShipRemoveDefenseTarget(), ShipRemoveDefenseTarget(), ShipRequestHelpFromGroup(), ShipRequestHelpFromGroup(), ShipRunLegacyScriptActions(), ShipRunLegacyScriptActions(), ShipSendAIMessage(), ShipSendAIMessage(), ShipSetAI(), ShipSetAI(), ShipSetBounty(), ShipSetScript(), ShipSetScript(), ShipSwitchAI(), ShipSwitchAI(), ShipThrowSpark(), ShipThrowSpark(), ShipUpdateEscortFormation(), ShipUpdateEscortFormation(), SoundSourcePlay(), SoundSourcePlay(), SoundSourcePlayOrRepeat(), SoundSourcePlayOrRepeat(), SoundSourceStop(), SoundSourceStop(), SoundStaticPlayMusic(), SoundStaticPlayMusic(), SoundStaticStopMusic(), SoundStaticStopMusic(), SpecialJSWarning(), SpecialJSWarning(), StationAbortAllDockings(), StationAbortAllDockings(), StationAbortDockingForShip(), StationAbortDockingForShip(), StationAddShipToShipyard(), StationAddShipToShipyard(), StationCanDockShip(), StationDecreaseAlertLevel(), StationDecreaseAlertLevel(), StationDockPlayer(), StationDockPlayer(), StationIncreaseAlertLevel(), StationIncreaseAlertLevel(), StationLaunchDefenseShip(), StationLaunchEscort(), StationLaunchMiner(), StationLaunchPatrol(), StationLaunchPirateShip(), StationLaunchPolice(), StationLaunchScavenger(), StationLaunchShipWithRole(), StationLaunchShuttle(), StationRemoveShipFromShipyard(), StationSetInterface(), StationSetInterface(), StationSetMarketPrice(), StationSetMarketQuantity(), SunCancelNova(), SunCancelNova(), SunGoNova(), SunGoNova(), SystemInfoSetPropertyMethod(), SystemInfoSetPropertyMethod(), SystemInfoStaticSetInterstellarProperty(), SystemInfoStaticSetInterstellarProperty(), SystemLegacyAddShips(), SystemLegacyAddShips(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddSystemShips(), SystemLegacyAddSystemShips(), SystemLegacySpawnShip(), SystemLegacySpawnShip(), SystemSendAllShipsAway(), SystemSendAllShipsAway(), SystemSetPopulator(), SystemSetPopulator(), SystemSetWaypoint(), SystemSetWaypoint(), TimerStop(), TimerStop(), VisualEffectRemove(), and VisualEffectRemove().

◆ OOJS_RETURN_WITH_HELPER

#define OOJS_RETURN_WITH_HELPER ( helper,
value )
Value:
do { \
jsval jsresult; \
BOOL OK = helper(context, value, &jsresult); \
JS_SET_RVAL(context, vp, jsresult); \
return OK; \
} while (0)

Definition at line 681 of file OOJavaScriptEngine.h.

681#define OOJS_RETURN_WITH_HELPER(helper, value) \
682 do { \
683 jsval jsresult; \
684 BOOL OK = helper(context, value, &jsresult); \
685 JS_SET_RVAL(context, vp, jsresult); \
686 return OK; \
687 } while (0)

Referenced by PlayerShipGetProperty(), and SystemInfoGetProperty().

◆ OOJS_RVAL

#define OOJS_RVAL   JS_RVAL(context, vp)

Definition at line 666 of file OOJavaScriptEngine.h.

Referenced by SystemInfoSamplePrice().

◆ OOJS_SET_RVAL

#define OOJS_SET_RVAL ( v)
Value:
JS_SET_RVAL(context, vp, v)

Definition at line 667 of file OOJavaScriptEngine.h.

Referenced by QuaternionToArray(), SystemInfoStaticFilteredSystems(), and VectorToArray().

◆ OOJS_THIS

#define OOJS_THIS   JS_THIS_OBJECT(context, vp)

Definition at line 664 of file OOJavaScriptEngine.h.

Referenced by DockIsQueued(), DockIsQueued(), OOJSObjectWrapperToString(), QuaternionConjugate(), QuaternionConjugate(), QuaternionDot(), QuaternionDot(), QuaternionMultiply(), QuaternionMultiply(), QuaternionNormalize(), QuaternionNormalize(), QuaternionRotate(), QuaternionRotate(), QuaternionRotateX(), QuaternionRotateX(), QuaternionRotateY(), QuaternionRotateY(), QuaternionRotateZ(), QuaternionRotateZ(), QuaternionToArray(), QuaternionToArray(), QuaternionToSource(), QuaternionToSource(), QuaternionToString(), QuaternionToString(), QuaternionVectorForward(), QuaternionVectorForward(), QuaternionVectorRight(), QuaternionVectorRight(), QuaternionVectorUp(), QuaternionVectorUp(), ShipExplode(), ShipGroupAddShip(), ShipGroupAddShip(), ShipGroupContainsShip(), ShipGroupContainsShip(), ShipGroupRemoveShip(), ShipGroupRemoveShip(), ShipRemove(), ShipSetMaterials(), ShipSetShaders(), SoundSourcePlay(), SoundSourcePlay(), SoundSourcePlayOrRepeat(), SoundSourcePlayOrRepeat(), SoundSourceStop(), SoundSourceStop(), StationAbortAllDockings(), StationAbortAllDockings(), StationAbortDockingForShip(), StationAbortDockingForShip(), StationAddShipToShipyard(), StationCanDockShip(), StationDecreaseAlertLevel(), StationDockPlayer(), StationDockPlayer(), StationIncreaseAlertLevel(), StationLaunchDefenseShip(), StationLaunchEscort(), StationLaunchMiner(), StationLaunchPatrol(), StationLaunchPirateShip(), StationLaunchPolice(), StationLaunchScavenger(), StationLaunchShipWithRole(), StationLaunchShuttle(), StationRemoveShipFromShipyard(), StationSetInterface(), StationSetMarketPrice(), StationSetMarketQuantity(), SunCancelNova(), SunCancelNova(), SunGoNova(), SunGoNova(), SystemInfoDistanceToSystem(), SystemInfoDistanceToSystem(), SystemInfoRouteToSystem(), SystemInfoRouteToSystem(), SystemInfoSamplePrice(), SystemInfoSamplePrice(), SystemInfoSetPropertyMethod(), SystemInfoSetPropertyMethod(), TimerStart(), TimerStart(), TimerStop(), TimerStop(), VectorAdd(), VectorAdd(), VectorAngleTo(), VectorAngleTo(), VectorCross(), VectorCross(), VectorDirection(), VectorDirection(), VectorDistanceTo(), VectorDistanceTo(), VectorDot(), VectorDot(), VectorFromCoordinateSystem(), VectorFromCoordinateSystem(), VectorMagnitude(), VectorMagnitude(), VectorMultiply(), VectorMultiply(), VectorRotateBy(), VectorRotateBy(), VectorRotationTo(), VectorRotationTo(), VectorSquaredDistanceTo(), VectorSquaredDistanceTo(), VectorSquaredMagnitude(), VectorSquaredMagnitude(), VectorSubtract(), VectorSubtract(), VectorToArray(), VectorToArray(), VectorToCoordinateSystem(), VectorToCoordinateSystem(), VectorToSource(), VectorToSource(), VectorToString(), VectorToString(), VectorTripleProduct(), VectorTripleProduct(), VisualEffectSetMaterials(), and VisualEffectSetShaders().

◆ OOJSAddGCObjectRoot

#define OOJSAddGCObjectRoot ( context,
root,
name )

◆ OOJSAddGCStringRoot

#define OOJSAddGCStringRoot ( context,
root,
name )
Value:
JS_AddNamedStringRoot((context), (root), "" name)

Definition at line 546 of file OOJavaScriptEngine.h.

◆ OOJSAddGCThingRoot

#define OOJSAddGCThingRoot ( context,
root,
name )
Value:
JS_AddNamedGCThingRoot((context), (root), "" name)

Definition at line 548 of file OOJavaScriptEngine.h.

◆ OOJSAddGCValueRoot

#define OOJSAddGCValueRoot ( context,
root,
name )

◆ OOJSDescribeLocation

#define OOJSDescribeLocation ( cx,
frame )
Value:
do { \
} while (0)

Definition at line 611 of file OOJavaScriptEngine.h.

611#define OOJSDescribeLocation(cx, frame) \
612 do { \
613 } while (0)

◆ OOJSDumpStack

#define OOJSDumpStack ( cx)
Value:
do { \
} while (0)

Definition at line 608 of file OOJavaScriptEngine.h.

608#define OOJSDumpStack(cx) \
609 do { \
610 } while (0)

Referenced by InterruptHandler(), OperationCallback(), and ReportJSError().

◆ OOJSENGINE_MONITOR_SUPPORT

#define OOJSENGINE_MONITOR_SUPPORT   OO_DEBUG_MONITOR_ENABLED

Definition at line 33 of file OOJavaScriptEngine.h.

◆ OOJSFreeValue

◆ OOJSMarkConsoleEvalLocation

#define OOJSMarkConsoleEvalLocation ( cx,
frame )
Value:
do { \
} while (0)

Definition at line 614 of file OOJavaScriptEngine.h.

614#define OOJSMarkConsoleEvalLocation(cx, frame) \
615 do { \
616 } while (0)

◆ OOJSNullValue

#define OOJSNullValue ( )
Value:
JSVAL_NULL

Definition at line 150 of file OOJavaScriptEngine.h.

◆ OOJSSTR

#define OOJSSTR ( str)
Value:
({ static jsval strCache; static BOOL inited; if (EXPECT_NOT(!inited)) OOJSStrLiteralCachePRIVATE(""str, &strCache, &inited); strCache; })
void OOJSStrLiteralCachePRIVATE(const char *string, jsval *strCache, BOOL *inited)

Definition at line 310 of file OOJavaScriptEngine.h.

Referenced by ShipEquipmentStatus().

◆ OOJSUndefinedValue

Typedef Documentation

◆ OOJSClassConverterCallback

typedef id(* OOJSClassConverterCallback) (JSContext *context, JSObject *object)

Definition at line 525 of file OOJavaScriptEngine.h.

◆ OOJSVal

typedef jsval OOJSVal

Definition at line 143 of file OOJavaScriptEngine.h.

Function Documentation

◆ JSEntityIsDemoShipPredicate()

BOOL JSEntityIsDemoShipPredicate ( Entity * entity,
void * parameter )

Definition at line 1949 of file OOJavaScriptEngine.m.

1950{
1951 return ([entity isVisibleToScripts] && [entity isShip] && [entity status] == STATUS_COCKPIT_DISPLAY && ![entity isSubEntity]);
1952}

◆ JSEntityIsJavaScriptSearchablePredicate()

BOOL JSEntityIsJavaScriptSearchablePredicate ( Entity * entity,
void * parameter )

Definition at line 1917 of file OOJavaScriptEngine.m.

1918{
1920
1921 if (![entity isVisibleToScripts])
1922 return NO;
1923 if ([entity isShip]) {
1924 if ([entity isSubEntity])
1925 return NO;
1926 if ([entity status] == STATUS_COCKPIT_DISPLAY)
1927 return NO; // Demo ship
1928 return YES;
1929 } else if ([entity isPlanet]) {
1930 switch ([(OOPlanetEntity*)entity planetType]) {
1931 case STELLAR_TYPE_MOON:
1933 case STELLAR_TYPE_SUN:
1934 return YES;
1935
1936#if !NEW_PLANETS
1938#endif
1940 return NO;
1941 }
1942 }
1943
1944 return YES; // would happen if we added a new script-visible class
1945
1947}
#define OOJS_PROFILE_EXIT
#define OOJS_PROFILE_ENTER
@ STELLAR_TYPE_MOON
@ STELLAR_TYPE_ATMOSPHERE
@ STELLAR_TYPE_MINIATURE
@ STELLAR_TYPE_SUN
@ STELLAR_TYPE_NORMAL_PLANET

References OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, STELLAR_TYPE_ATMOSPHERE, STELLAR_TYPE_MINIATURE, STELLAR_TYPE_MOON, STELLAR_TYPE_NORMAL_PLANET, and STELLAR_TYPE_SUN.

Referenced by FindJSVisibleEntities().

Here is the caller graph for this function:

◆ JSEntityIsJavaScriptVisiblePredicate()

BOOL JSEntityIsJavaScriptVisiblePredicate ( Entity * entity,
void * parameter )

Definition at line 1908 of file OOJavaScriptEngine.m.

1909{
1911
1912 return [entity isVisibleToScripts];
1913
1915}

References Entity::isVisibleToScripts, OOJS_PROFILE_ENTER, and OOJS_PROFILE_EXIT.

Here is the call graph for this function:

◆ JSFunctionPredicate()

BOOL JSFunctionPredicate ( Entity * entity,
void * parameter )

Definition at line 1868 of file OOJavaScriptEngine.m.

1869{
1871
1872 JSFunctionPredicateParameter* param = parameter;
1873 jsval args[1];
1874 jsval rval = JSVAL_VOID;
1875 JSBool result = NO;
1876
1877 NSCParameterAssert(entity != nil && param != NULL);
1878 NSCParameterAssert(param->context != NULL && JS_IsInRequest(param->context));
1879 NSCParameterAssert(OOJSValueIsFunction(param->context, param->function));
1880
1881 if (EXPECT_NOT(param->errorFlag))
1882 return NO;
1883
1884 args[0] = [entity oo_jsValueInContext:param->context]; // entity is required to be non-nil (asserted above), so oo_jsValueInContext: is safe.
1885
1888 BOOL success = JS_CallFunctionValue(param->context, param->jsThis, param->function, 1, args, &rval);
1891
1892 if (success) {
1893 if (!JS_ValueToBoolean(param->context, rval, &result))
1894 result = NO;
1895 if (JS_IsExceptionPending(param->context)) {
1896 JS_ReportPendingException(param->context);
1897 param->errorFlag = YES;
1898 }
1899 } else {
1900 param->errorFlag = YES;
1901 }
1902
1903 return result;
1904
1906}
#define OOJSStopTimeLimiter()
#define OOJSStartTimeLimiter()
void OOJSPauseTimeLimiter(void)
#define JS_IsInRequest(context)
OOINLINE BOOL OOJSValueIsFunction(JSContext *context, jsval value)
void OOJSResumeTimeLimiter(void)
return nil

References EXPECT_NOT, JS_IsInRequest, nil, Entity::oo_jsValueInContext:, OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, OOJSPauseTimeLimiter(), OOJSResumeTimeLimiter(), OOJSStartTimeLimiter, OOJSStopTimeLimiter, and OOJSValueIsFunction().

Referenced by SystemFilteredEntities(), and SystemFilteredEntities().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSAcquireContext()

OOINLINE JSContext * OOJSAcquireContext ( void )

Definition at line 116 of file OOJavaScriptEngine.h.

117{
118 extern JSContext* gOOJSMainThreadContext;
119 NSCAssert(gOOJSMainThreadContext != NULL, @"Attempt to use JavaScript context before JavaScript engine is initialized.");
122}
#define JS_BeginRequest(context)
JSContext * gOOJSMainThreadContext

References gOOJSMainThreadContext, JS_BeginRequest, and OOINLINE.

Referenced by StationEntity::acceptDockingClearanceRequestFrom:, PlayerEntity::activatePrimableEquipment:withMode:, PlayerEntity::adjustPriceByScriptForEqKey:withCurrent:, DockEntity::allowsLaunchingOf:, ShipEntity::behaviour_scripted_ai:, OOJSGuiScreenKeyDefinition::callback, OOJSInterfaceDefinition::callback, OOJSPopulatorDefinition::callback, OOJSGuiScreenKeyDefinition::callbackThis, OOJSInterfaceDefinition::callbackThis, OOJSPopulatorDefinition::callbackThis, CallForString(), OOJSScript::callMethodNamed:withArguments:count:result:, DockEntity::canAcceptShipForDocking:, Universe::canInstantiateShip:, Universe::carryPlayerOn:inWormhole:, ClearPendingCallback(), PlayerEntity::completeSetUpAndSetTarget:, PlayerEntity::cycleNextMultiFunctionDisplay:, PlayerEntity::cyclePreviousMultiFunctionDisplay:, OOJSScript::dealloc, OOJSScript::defineProperty:named:, OOJSGuiScreenKeyDefinition::deleteJSPointers, OOJSInterfaceDefinition::deleteJSPointers, OOJSPopulatorDefinition::deleteJSPointers, OOJSTimer::deleteJSPointers, Entity(OOJavaScriptExtensions)::deleteJSSelf, OOJSFunction::deleteJSValue, OOJSValue::deleteJSValue, OOJSTimer::descriptionComponents, OOJavaScriptEngine(Private)::destroyMainThreadContext, StationEntity::dockingInstructionsForShip:, OOCharacter::doScriptEvent:, OOVisualEffectEntity::doScriptEvent:, ShipEntity::doScriptEvent:, ShipEntity::doScriptEvent:withArgument:, ShipEntity::doScriptEvent:withArgument:andArgument:, ShipEntity::doScriptEvent:withArguments:, ShipEntity::doScriptEvent:withArguments:count:, PlayerEntity::doWorldEventUntilMissionScreen:, PlayerEntity::enterGalacticWitchspace, Universe::enterGUIViewModeWithMouseInteraction:, PlayerEntity::enterWitchspace, PlayerEntity::enterWormhole:, ShipEntity::equipmentValidToAdd:whileLoading:inContext:, OOJSFunction::functionValue, OORegExpMatcher::init, OOJSValue::initWithJSValue:inContext:, OOJSFunction::initWithName:scope:code:argumentCount:argumentNames:fileName:lineNumber:context:, OOJSScript::initWithPath:, OOJSScript::initWithPath:properties:, OOJSScript::javaScriptEngineWillReset:, PlayerEntity(OOJavaScriptExtensions)::javaScriptEngineWillReset:, JSPlayerObject(), JSPlayerShipObject(), OOShipRegistry(OODataLoader)::loadDemoShips, PlayerEntity::markAsOffender:withReason:, ShipEntity::markAsOffender:withReason:, MissionRunCallback(), MissionRunCallback(), OOCommodities(OOPrivate)::modifyGood:withScript:atStation:inSystem:localMode:, PlayerEntity(OOPrivate)::noteCompassLostTarget, PlayerEntity::noteGUIDidChangeFrom:to:refresh:, PlayerEntity::noteGUIWillChangeTo:, ShipEntity::noteKilledBy:damageType:, ShipEntity::noteTakingDamage:from:type:, OOSystemInfo::oo_javaScriptEngineWillReset:, OOJSFrameCallbacksInvoke(), OOJSFrameCallbacksInvoke(), OOJSFrameCallbacksRemoveAll(), OOJSIDFromString(), OOJSInitJSIDCachePRIVATE(), OOJSInternAtomPRIVATE(), OOJSRegisterClass(), OOJSStrLiteralCachePRIVATE(), OOStringFromDeciCredits(), OOStringFromJSID(), OOStringFromJSID(), Universe::populateNormalSpace, OOJSScript::propertyNamed:, ShipEntity(Private)::refreshEscortPositions, OOJSTimer(Private)::releaseJSValues, OOJavaScriptEngine::removeGCObjectRoot:, OOJavaScriptEngine::removeGCValueRoot:, Universe::repopulateSystem, OOJSGuiScreenKeyDefinition::runCallback:, OOJSInterfaceDefinition::runCallback:, OOJSPopulatorDefinition::runCallback:, ShipEntity(PureAI)::scanForNearestShipMatchingPredicate:, PlayerEntity::selectNextMultiFunctionDisplay, PlayerEntity::selectPreviousMultiFunctionDisplay, PlayerEntity::setBounty:withReasonAsString:, ShipEntity::setBounty:withReasonAsString:, OOJSGuiScreenKeyDefinition::setCallback:, OOJSInterfaceDefinition::setCallback:, OOJSPopulatorDefinition::setCallback:, OOJSGuiScreenKeyDefinition::setCallbackThis:, OOJSInterfaceDefinition::setCallbackThis:, OOJSPopulatorDefinition::setCallbackThis:, PlayerEntity::setInfoSystemID:moveChart:, OOJSScript::setProperty:named:, Universe::setUpWitchspaceBetweenSystem:andSystem:, Universe::shipsForSaleForSystem:withTL:atTime:, PlayerEntity::startUpComplete, OORegExpMatcher::string:matchesExpression:flags:, PlayerEntity(OOControlsPrivate)::switchToThisView:fromView:andProcessWeaponFacing:justNotify:, SyntaxIssue(), OOJSTimer::timerFired, OOECMBlastEntity::update:, and Universe::update:.

◆ OOJSArgumentListGetNumber()

BOOL OOJSArgumentListGetNumber ( JSContext * context,
NSString * scriptClass,
NSString * function,
uintN argc,
jsval * argv,
double * outNumber,
uintN * outConsumed )

Definition at line 1073 of file OOJavaScriptEngine.m.

1074{
1075 if (OOJSArgumentListGetNumberNoError(context, argc, argv, outNumber, outConsumed)) {
1076 return YES;
1077 } else {
1078 OOJSReportBadArguments(context, scriptClass, function, argc, argv,
1079 @"Expected number, got", NULL);
1080 return NO;
1081 }
1082}
BOOL OOJSArgumentListGetNumberNoError(JSContext *context, uintN argc, jsval *argv, double *outNumber, uintN *outConsumed)
void OOJSReportBadArguments(JSContext *context, NSString *scriptClass, NSString *function, uintN argc, jsval *argv, NSString *message, NSString *expectedArgsDescription)

References OOJSArgumentListGetNumberNoError(), and OOJSReportBadArguments().

Referenced by QuaternionRotate(), QuaternionRotate(), QuaternionRotateX(), QuaternionRotateX(), QuaternionRotateY(), QuaternionRotateY(), QuaternionRotateZ(), QuaternionRotateZ(), SoundStaticPlayMusic(), SoundStaticPlayMusic(), VectorMultiply(), VectorMultiply(), VectorRotationTo(), VectorRotationTo(), VectorStaticInterpolate(), and VectorStaticInterpolate().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSArgumentListGetNumberNoError()

BOOL OOJSArgumentListGetNumberNoError ( JSContext * context,
uintN argc,
jsval * argv,
double * outNumber,
uintN * outConsumed )

Definition at line 1084 of file OOJavaScriptEngine.m.

1085{
1087
1088 double value;
1089
1090 NSCParameterAssert(context != NULL && (argv != NULL || argc == 0) && outNumber != NULL);
1091
1092 // Get value, if possible.
1093 if (EXPECT_NOT(!JS_ValueToNumber(context, argv[0], &value) || isnan(value))) {
1094 if (outConsumed != NULL)
1095 *outConsumed = 0;
1096 return NO;
1097 }
1098
1099 // Success.
1100 *outNumber = value;
1101 if (outConsumed != NULL)
1102 *outConsumed = 1;
1103 return YES;
1104
1106}

References EXPECT_NOT, OOJS_PROFILE_ENTER, and OOJS_PROFILE_EXIT.

Referenced by OOJSArgumentListGetNumber(), OOJSArgumentListGetNumber(), VectorStaticRandom(), VectorStaticRandom(), VectorStaticRandomDirection(), VectorStaticRandomDirection(), VectorStaticRandomDirectionAndLength(), and VectorStaticRandomDirectionAndLength().

Here is the caller graph for this function:

◆ OOJSBasicPrivateObjectConverter()

id OOJSBasicPrivateObjectConverter ( JSContext * context,
JSObject * object )

Definition at line 2223 of file OOJavaScriptEngine.m.

2224{
2225 id result;
2226
2227 /* This will do the right thing - for non-OOWeakReferences,
2228 weakRefUnderlyingObject returns the object itself. For nil, of course,
2229 it returns nil.
2230 */
2231 result = JS_GetPrivate(context, object);
2232 return [result weakRefUnderlyingObject];
2233}

Referenced by InitOOJSDock(), InitOOJSDock(), InitOOJSEntity(), InitOOJSEntity(), InitOOJSEquipmentInfo(), InitOOJSEquipmentInfo(), InitOOJSExhaustPlume(), InitOOJSExhaustPlume(), InitOOJSFlasher(), InitOOJSFlasher(), InitOOJSManifest(), InitOOJSManifest(), InitOOJSPlanet(), InitOOJSPlanet(), InitOOJSPlayer(), InitOOJSPlayer(), InitOOJSPlayerShip(), InitOOJSPlayerShip(), InitOOJSScript(), InitOOJSScript(), InitOOJSShip(), InitOOJSShip(), InitOOJSShipGroup(), InitOOJSShipGroup(), InitOOJSSound(), InitOOJSSound(), InitOOJSSoundSource(), InitOOJSSoundSource(), InitOOJSStation(), InitOOJSStation(), InitOOJSSun(), InitOOJSSun(), InitOOJSSystemInfo(), InitOOJSSystemInfo(), InitOOJSTimer(), InitOOJSTimer(), InitOOJSVisualEffect(), InitOOJSVisualEffect(), InitOOJSWaypoint(), InitOOJSWaypoint(), InitOOJSWormhole(), and InitOOJSWormhole().

Here is the caller graph for this function:

◆ OOJSDescribeValue()

NSString * OOJSDescribeValue ( JSContext * context,
jsval value,
BOOL abbreviateObjects )

Definition at line 1578 of file OOJavaScriptEngine.m.

1579{
1580 return DescribeValue(context, value, abbreviateObjects, NO);
1581}
static NSString * DescribeValue(JSContext *context, jsval value, BOOL abbreviateObjects, BOOL recursing)

References DescribeValue().

Referenced by ManifestSetProperty(), OOJSReportBadPropertyValue(), and OOJSReportBadPropertyValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSDictionaryFromJSObject()

NSDictionary * OOJSDictionaryFromJSObject ( JSContext * context,
JSObject * object )

Definition at line 2052 of file OOJavaScriptEngine.m.

2053{
2055
2056 JSIdArray* ids = NULL;
2057 jsint i;
2058 NSMutableDictionary* result = nil;
2059 jsval value = JSVAL_VOID;
2060 id objKey = nil;
2061 id objValue = nil;
2062
2063 ids = JS_Enumerate(context, object);
2064 if (EXPECT_NOT(ids == NULL)) {
2065 return nil;
2066 }
2067
2068 result = [NSMutableDictionary dictionaryWithCapacity:ids->length];
2069 for (i = 0; i != ids->length; ++i) {
2070 jsid thisID = ids->vector[i];
2071
2072 if (JSID_IS_STRING(thisID)) {
2073 objKey = OOStringFromJSString(context, JSID_TO_STRING(thisID));
2074 } else if (JSID_IS_INT(thisID)) {
2075 /* this causes problems with native functions which expect string keys
2076 * e.g. in mission.runScreen with the 'choices' parameter
2077 * should this instead be making the objKey a string?
2078 * is there anything that relies on the current behaviour?
2079 * - CIM 15/2/13 */
2080 objKey = [NSNumber numberWithInt:JSID_TO_INT(thisID)];
2081 } else {
2082 objKey = nil;
2083 }
2084
2085 value = JSVAL_VOID;
2086 if (objKey != nil && !JS_LookupPropertyById(context, object, thisID, &value))
2087 value = JSVAL_VOID;
2088
2089 if (objKey != nil && !JSVAL_IS_VOID(value)) {
2090 objValue = OOJSNativeObjectFromJSValue(context, value);
2091 if (objValue != nil) {
2092 [result setObject:objValue forKey:objKey];
2093 }
2094 }
2095 }
2096
2097 JS_DestroyIdArray(context, ids);
2098 return result;
2099
2101}
id OOJSNativeObjectFromJSValue(JSContext *context, jsval value)
NSString * OOStringFromJSString(JSContext *context, JSString *string)

References EXPECT_NOT, nil, OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, OOJSNativeObjectFromJSValue(), and OOStringFromJSString().

Referenced by JSObjectConverter(), OOJSDictionaryFromJSValue(), OOJSDictionaryFromJSValue(), and GuiDisplayGen::textureDescriptorFromJSValue:inContext:callerDescription:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSDictionaryFromJSValue()

NSDictionary * OOJSDictionaryFromJSValue ( JSContext * context,
jsval value )

Definition at line 2039 of file OOJavaScriptEngine.m.

2040{
2042
2043 JSObject* object = NULL;
2044 if (EXPECT_NOT(!JS_ValueToObject(context, value, &object) || object == NULL)) {
2045 return nil;
2046 }
2047 return OOJSDictionaryFromJSObject(context, object);
2048
2050}
NSDictionary * OOJSDictionaryFromJSObject(JSContext *context, JSObject *object)

References EXPECT_NOT, nil, OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, and OOJSDictionaryFromJSObject().

Here is the call graph for this function:

◆ OOJSDictionaryFromStringTable()

NSDictionary * OOJSDictionaryFromStringTable ( JSContext * context,
jsval value )

Definition at line 2103 of file OOJavaScriptEngine.m.

2104{
2106
2107 JSObject* tableObject = NULL;
2108 JSIdArray* ids;
2109 jsint i;
2110 NSMutableDictionary* result = nil;
2111 jsval value = JSVAL_VOID;
2112 id objKey = nil;
2113 id objValue = nil;
2114
2115 if (EXPECT_NOT(JSVAL_IS_NULL(tableValue) || !JS_ValueToObject(context, tableValue, &tableObject))) {
2116 return nil;
2117 }
2118
2119 ids = JS_Enumerate(context, tableObject);
2120 if (EXPECT_NOT(ids == NULL)) {
2121 return nil;
2122 }
2123
2124 result = [NSMutableDictionary dictionaryWithCapacity:ids->length];
2125 for (i = 0; i != ids->length; ++i) {
2126 jsid thisID = ids->vector[i];
2127
2128 if (JSID_IS_STRING(thisID)) {
2129 objKey = OOStringFromJSString(context, JSID_TO_STRING(thisID));
2130 } else {
2131 objKey = nil;
2132 }
2133
2134 value = JSVAL_VOID;
2135 if (objKey != nil && !JS_LookupPropertyById(context, tableObject, thisID, &value))
2136 value = JSVAL_VOID;
2137
2138 if (objKey != nil && !JSVAL_IS_VOID(value)) {
2139 objValue = OOStringFromJSValueEvenIfNull(context, value);
2140
2141 if (objValue != nil) {
2142 [result setObject:objValue forKey:objKey];
2143 }
2144 }
2145 }
2146
2147 JS_DestroyIdArray(context, ids);
2148 return result;
2149
2151}
NSString * OOStringFromJSValueEvenIfNull(JSContext *context, jsval value)

References EXPECT_NOT, nil, OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, OOStringFromJSString(), and OOStringFromJSValueEvenIfNull().

Referenced by GlobalExpandDescription(), GlobalExpandDescription(), GlobalExpandMissionText(), and GlobalExpandMissionText().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSGetClass()

OOINLINE JSClass * OOJSGetClass ( JSContext * cx,
JSObject * obj )

Definition at line 386 of file OOJavaScriptEngine.h.

387{
388#if JS_THREADSAFE
389 return JS_GetClass(cx, obj);
390#else
391 return JS_GetClass(obj);
392#endif
393}

References OOINLINE.

Referenced by DescribeValue(), OOJavaScriptEngine(Private)::lookUpStandardClassPointers, OOJSIsMemberOfSubclass(), OOJSNativeObjectFromJSObject(), OOJSObjectGetterImplPRIVATE(), OOJSObjectWrapperToString(), OOJSReportBadPropertySelector(), OOJSReportBadPropertyValue(), and GuiDisplayGen::textureDescriptorFromJSValue:inContext:callerDescription:.

Here is the caller graph for this function:

◆ OOJSIDFromString()

jsid OOJSIDFromString ( NSString * string)

Definition at line 873 of file OOJavaScriptEngine.m.

874{
875 if (EXPECT_NOT(string == nil))
876 return JSID_VOID;
877
878 JSContext* context = OOJSAcquireContext();
879
880 enum { kStackBufSize = 1024 };
881 unichar stackBuf[kStackBufSize];
882 unichar* buffer;
883 size_t length = [string length];
884 if (length < kStackBufSize) {
885 buffer = stackBuf;
886 } else {
887 buffer = malloc(sizeof(unichar) * length);
888 if (EXPECT_NOT(buffer == NULL))
889 return JSID_VOID;
890 }
891 [string getCharacters:buffer];
892
893 JSString* jsString = JS_InternUCStringN(context, buffer, length);
894
895 if (EXPECT_NOT(buffer != stackBuf))
896 free(buffer);
897
898 OOJSRelinquishContext(context);
899
900 if (EXPECT(jsString != NULL))
901 return INTERNED_STRING_TO_JSID(jsString);
902 else
903 return JSID_VOID;
904}
#define EXPECT(x)
OOINLINE JSContext * OOJSAcquireContext(void)
OOINLINE void OOJSRelinquishContext(JSContext *context)

References EXPECT, EXPECT_NOT, nil, OOJSAcquireContext(), and OOJSRelinquishContext().

Referenced by JSObjectFromNSDictionary(), and RecordSharedProperties().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSIsMemberOfSubclass()

OOINLINE BOOL OOJSIsMemberOfSubclass ( JSContext * context,
JSObject * object,
JSClass * superclass )

Definition at line 508 of file OOJavaScriptEngine.h.

509{
510 return OOJSIsSubclass(OOJSGetClass(context, object), superclass);
511}
BOOL OOJSIsSubclass(JSClass *putativeSubclass, JSClass *superclass)
OOINLINE JSClass * OOJSGetClass(JSContext *cx, JSObject *obj) ALWAYS_INLINE_FUNC

References OOINLINE, OOJSGetClass(), and OOJSIsSubclass().

Referenced by JSObjectGetQuaternion(), JSObjectGetQuaternion(), JSObjectGetVector(), and JSObjectGetVector().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSIsSubclass()

BOOL OOJSIsSubclass ( JSClass * putativeSubclass,
JSClass * superclass )

Definition at line 1975 of file OOJavaScriptEngine.m.

1976{
1977 NSCParameterAssert(putativeSubclass != NULL && superclass != NULL);
1978 NSCAssert(sRegisteredSubClasses != NULL, @"OOJSIsSubclass() called before any subclasses registered (disallowed for hot path efficiency).");
1979
1980 do {
1981 if (putativeSubclass == superclass)
1982 return YES;
1983
1984 putativeSubclass = NSMapGet(sRegisteredSubClasses, putativeSubclass);
1985 } while (putativeSubclass != NULL);
1986
1987 return NO;
1988}
static NSMapTable * sRegisteredSubClasses

References sRegisteredSubClasses.

Referenced by OOJSIsMemberOfSubclass(), OOJSIsMemberOfSubclass(), OOJSObjectGetterImplPRIVATE(), and OOJSObjectGetterImplPRIVATE().

Here is the caller graph for this function:

◆ OOJSNativeObjectFromJSObject()

id OOJSNativeObjectFromJSObject ( JSContext * context,
JSObject * object )

Definition at line 2182 of file OOJavaScriptEngine.m.

2183{
2185
2186 NSValue* wrappedClass = nil;
2187 NSValue* wrappedConverter = nil;
2188 OOJSClassConverterCallback converter = NULL;
2189 JSClass* class = NULL;
2190
2191 if (tableObject == NULL)
2192 return nil;
2193
2194 class = OOJSGetClass(context, tableObject);
2195 wrappedClass = [NSValue valueWithPointer:class];
2196 if (wrappedClass != nil)
2197 wrappedConverter = [sObjectConverters objectForKey:wrappedClass];
2198 if (wrappedConverter != nil) {
2199 converter = [wrappedConverter pointerValue];
2200 return converter(context, tableObject);
2201 }
2202 return nil;
2203
2205}
id(* OOJSClassConverterCallback)(JSContext *context, JSObject *object)
static NSMutableDictionary * sObjectConverters

References nil, OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, OOJSGetClass(), and sObjectConverters.

Referenced by ShipEntity::behaviour_scripted_ai:, GetParameterDictionary(), GetParameterDictionary(), GlobalSetExtraGuiScreenKeys(), GlobalSetExtraGuiScreenKeys(), MissionMarkSystem(), MissionMarkSystem(), MissionUnmarkSystem(), MissionUnmarkSystem(), OOCommodities(OOPrivate)::modifyGood:withScript:atStation:inSystem:localMode:, OOJSNativeObjectFromJSValue(), OOJSNativeObjectFromJSValue(), OOJSNativeObjectOfClassFromJSObject(), OOJSNativeObjectOfClassFromJSObject(), OOJSObjectWrapperToString(), OOJSObjectWrapperToString(), ShipSetCrew(), ShipSetCrew(), ShipSetMaterialsInternal(), ShipSetMaterialsInternal(), ShipStaticSetShipDataForKey(), ShipStaticSetShipDataForKey(), StationAddShipToShipyard(), StationAddShipToShipyard(), SystemSetPopulator(), SystemSetPopulator(), OOJSTimer::timerFired, VisualEffectSetMaterialsInternal(), and VisualEffectSetMaterialsInternal().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSNativeObjectFromJSValue()

id OOJSNativeObjectFromJSValue ( JSContext * context,
jsval value )

Definition at line 2155 of file OOJavaScriptEngine.m.

2156{
2158
2159 if (JSVAL_IS_NULL(value) || JSVAL_IS_VOID(value))
2160 return nil;
2161
2162 if (JSVAL_IS_INT(value)) {
2163 return [NSNumber numberWithInt:JSVAL_TO_INT(value)];
2164 }
2165 if (JSVAL_IS_DOUBLE(value)) {
2166 return [NSNumber numberWithDouble:JSVAL_TO_DOUBLE(value)];
2167 }
2168 if (JSVAL_IS_BOOLEAN(value)) {
2169 return [NSNumber numberWithBool:JSVAL_TO_BOOLEAN(value)];
2170 }
2171 if (JSVAL_IS_STRING(value)) {
2172 return OOStringFromJSValue(context, value);
2173 }
2174 if (JSVAL_IS_OBJECT(value)) {
2175 return OOJSNativeObjectFromJSObject(context, JSVAL_TO_OBJECT(value));
2176 }
2177 return nil;
2178
2180}
id OOJSNativeObjectFromJSObject(JSContext *context, JSObject *tableObject)
NSString * OOStringFromJSValue(JSContext *context, jsval value)

References nil, OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, OOJSNativeObjectFromJSObject(), and OOStringFromJSValue().

Referenced by OOJSFunction::evaluateWithContext:scope:arguments:, JSArrayConverter(), JSArrayConverter(), JSValueToEquipmentKeyRelaxed(), JSValueToEquipmentKeyRelaxed(), MissionSetInstructionsInternal(), MissionSetInstructionsInternal(), OOJSDictionaryFromJSObject(), OOJSDictionaryFromJSObject(), OOJSNativeObjectOfClassFromJSValue(), OOJSNativeObjectOfClassFromJSValue(), OoliteCompareVersion(), OoliteCompareVersion(), PlayerSetEscapePodDestination(), PlayerSetEscapePodDestination(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomHUDDial(), OOJSScript::propertyWithID:inContext:, ShipRunLegacyScriptActions(), ShipRunLegacyScriptActions(), SystemInfoSetPropertyMethod(), SystemInfoSetPropertyMethod(), SystemInfoStaticSetInterstellarProperty(), and SystemInfoStaticSetInterstellarProperty().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSNativeObjectOfClassFromJSObject()

id OOJSNativeObjectOfClassFromJSObject ( JSContext * context,
JSObject * object,
Class requiredClass )

Definition at line 2215 of file OOJavaScriptEngine.m.

2216{
2217 id result = OOJSNativeObjectFromJSObject(context, object);
2218 if (![result isKindOfClass:requiredClass])
2219 result = nil;
2220 return result;
2221}

References nil, and OOJSNativeObjectFromJSObject().

Referenced by ScriptAddProperty(), SystemInfoGetProperty(), SystemInfoGetProperty(), and SystemInfoSetProperty().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSNativeObjectOfClassFromJSValue()

id OOJSNativeObjectOfClassFromJSValue ( JSContext * context,
jsval value,
Class requiredClass )

Definition at line 2207 of file OOJavaScriptEngine.m.

2208{
2209 id result = OOJSNativeObjectFromJSValue(context, value);
2210 if (![result isKindOfClass:requiredClass])
2211 result = nil;
2212 return result;
2213}

References nil, and OOJSNativeObjectFromJSValue().

Referenced by PlayerShipCancelDockingRequest(), PlayerShipCancelDockingRequest(), PlayerShipEngageAutopilotToStation(), PlayerShipEngageAutopilotToStation(), PlayerShipRequestDockingClearance(), PlayerShipRequestDockingClearance(), ShipGroupAddShip(), ShipGroupAddShip(), ShipGroupConstruct(), ShipGroupConstruct(), ShipGroupContainsShip(), ShipGroupContainsShip(), ShipGroupRemoveShip(), ShipGroupRemoveShip(), ShipGroupSetProperty(), ShipGroupSetProperty(), ShipSetProperty(), ShipSetProperty(), SoundFromJSValue(), and SoundFromJSValue().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSObjectFromNativeObject()

JSObject * OOJSObjectFromNativeObject ( JSContext * context,
id object )

Definition at line 1322 of file OOJavaScriptEngine.m.

1323{
1324 jsval value = OOJSValueFromNativeObject(context, object);
1325 JSObject* result = NULL;
1326 if (JS_ValueToObject(context, value, &result))
1327 return result;
1328 return NULL;
1329}

References OOJSValueFromNativeObject().

Referenced by ShipEntity(PureAI)::scanForNearestShipMatchingPredicate:.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSObjectGetterImplPRIVATE()

BOOL OOJSObjectGetterImplPRIVATE ( JSContext * context,
JSObject * object,
JSClass * requiredJSClass,
Class requiredObjCClass,
const char * name,
id * outObject )

Definition at line 1990 of file OOJavaScriptEngine.m.

1995{
1996#ifndef NDEBUG
1998 NSCParameterAssert(requiredObjCClass != Nil);
1999 NSCParameterAssert(context != NULL && object != NULL && requiredJSClass != NULL && outObject != NULL);
2000#else
2002#endif
2003
2004 /*
2005 Ensure it's a valid type of JS object. This is absolutely necessary,
2006 because if we don't check it we'll crash trying to get the private
2007 field of something that isn't an ObjC object wrapper - for example,
2008 Ship.setAI.call(new Vector3D, "") is valid JavaScript.
2009
2010 Alternatively, we could abuse JSCLASS_PRIVATE_IS_NSISUPPORTS as a
2011 flag for ObjC object wrappers (SpiderMonkey only uses it internally
2012 in a debug function we don't use), but we'd still need to do an
2013 Objective-C class test, and I don't think that's any faster.
2014 TODO: profile.
2015 */
2016 JSClass* actualClass = OOJSGetClass(context, object);
2017 if (EXPECT_NOT(!OOJSIsSubclass(actualClass, requiredJSClass))) {
2018 OOJSReportError(context, @"Native method expected %s, got %@.", requiredJSClass->name, OOStringFromJSValue(context, OBJECT_TO_JSVAL(object)));
2019 return NO;
2020 }
2021 NSCAssert(actualClass->flags & JSCLASS_HAS_PRIVATE, @"Native object accessor requires JS class with private storage.");
2022
2023 // Get the underlying object.
2024 *outObject = [(id)JS_GetPrivate(context, object) weakRefUnderlyingObject];
2025
2026#ifndef NDEBUG
2027 // Double-check that the underlying object is of the expected ObjC class.
2028 if (EXPECT_NOT(*outObject != nil && ![*outObject isKindOfClass:requiredObjCClass])) {
2029 OOJSReportError(context, @"Native method expected %@ from %s and got correct JS type but incorrect native object %@", requiredObjCClass, requiredJSClass->name, *outObject);
2030 return NO;
2031 }
2032#endif
2033
2034 return YES;
2035
2037}
NSString * OOStringFromJSValue(JSContext *context, jsval value)
void OOJSReportError(JSContext *context, NSString *format,...)
BOOL OOJSIsSubclass(JSClass *putativeSubclass, JSClass *superclass)
#define OOJS_PROFILE_ENTER_NAMED(NAME)

References EXPECT_NOT, nil, OOJS_PROFILE_ENTER, OOJS_PROFILE_ENTER_NAMED, OOJS_PROFILE_EXIT, OOJSGetClass(), OOJSIsSubclass(), OOJSReportError(), and OOStringFromJSValue().

Here is the call graph for this function:

◆ OOJSObjectWrapperFinalize()

void OOJSObjectWrapperFinalize ( JSContext * context,
JSObject * this )

Definition at line 1826 of file OOJavaScriptEngine.m.

1827{
1829
1830 id object = JS_GetPrivate(context, this);
1831 if (object != nil) {
1832 [[object weakRefUnderlyingObject] oo_clearJSSelf:this];
1833 [object release];
1834 JS_SetPrivate(context, this, nil);
1835 }
1836
1838}
#define OOJS_PROFILE_EXIT_VOID

References nil, OOJS_PROFILE_ENTER, and OOJS_PROFILE_EXIT_VOID.

Referenced by OOJSScript::dealloc, and SystemInfoFinalize().

Here is the caller graph for this function:

◆ OOJSObjectWrapperToString()

JSBool OOJSObjectWrapperToString ( JSContext * context,
uintN argc,
jsval * vp )

Definition at line 1840 of file OOJavaScriptEngine.m.

1841{
1842 OOJS_NATIVE_ENTER(context)
1843
1844 id object = nil;
1845 NSString* description = nil;
1846 JSClass* jsClass = NULL;
1847
1848 object = OOJSNativeObjectFromJSObject(context, OOJS_THIS);
1849 if (object != nil) {
1850 description = [object oo_jsDescription];
1851 if (description == nil)
1852 description = [object description];
1853 }
1854 if (description == nil) {
1855 jsClass = OOJSGetClass(context, OOJS_THIS);
1856 if (jsClass != NULL) {
1857 description = [NSString stringWithFormat:@"[object %@]", [NSString stringWithUTF8String:jsClass->name]];
1858 }
1859 }
1860 if (description == nil)
1861 description = @"[object]";
1862
1863 OOJS_RETURN_OBJECT(description);
1864
1866}
#define OOJS_NATIVE_ENTER(cx)
#define OOJS_NATIVE_EXIT
#define OOJS_THIS
#define OOJS_RETURN_OBJECT(o)

References nil, OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJS_RETURN_OBJECT, OOJS_THIS, OOJSGetClass(), and OOJSNativeObjectFromJSObject().

Here is the call graph for this function:

◆ OOJSPauseTimeLimiter()

◆ OOJSRegisterObjectConverter()

void OOJSRegisterObjectConverter ( JSClass * theClass,
OOJSClassConverterCallback converter )

Definition at line 2235 of file OOJavaScriptEngine.m.

2236{
2237 NSValue* wrappedClass = nil;
2238 NSValue* wrappedConverter = nil;
2239
2240 if (theClass == NULL)
2241 return;
2242 if (sObjectConverters == nil)
2243 sObjectConverters = [[NSMutableDictionary alloc] init];
2244
2245 wrappedClass = [NSValue valueWithPointer:theClass];
2246 if (converter != NULL) {
2247 wrappedConverter = [NSValue valueWithPointer:converter];
2248 [sObjectConverters setObject:wrappedConverter forKey:wrappedClass];
2249 } else {
2250 [sObjectConverters removeObjectForKey:wrappedClass];
2251 }
2252}

References nil, and sObjectConverters.

Referenced by InitOOJSDock(), InitOOJSDock(), InitOOJSEntity(), InitOOJSEntity(), InitOOJSEquipmentInfo(), InitOOJSEquipmentInfo(), InitOOJSExhaustPlume(), InitOOJSExhaustPlume(), InitOOJSFlasher(), InitOOJSFlasher(), InitOOJSManifest(), InitOOJSManifest(), InitOOJSMissionVariables(), InitOOJSMissionVariables(), InitOOJSPlanet(), InitOOJSPlanet(), InitOOJSPlayer(), InitOOJSPlayer(), InitOOJSPlayerShip(), InitOOJSPlayerShip(), InitOOJSScript(), InitOOJSScript(), InitOOJSShip(), InitOOJSShip(), InitOOJSShipGroup(), InitOOJSShipGroup(), InitOOJSSound(), InitOOJSSound(), InitOOJSSoundSource(), InitOOJSSoundSource(), InitOOJSStation(), InitOOJSStation(), InitOOJSSun(), InitOOJSSun(), InitOOJSSystemInfo(), InitOOJSSystemInfo(), InitOOJSTimer(), InitOOJSTimer(), InitOOJSVisualEffect(), InitOOJSVisualEffect(), InitOOJSWaypoint(), InitOOJSWaypoint(), InitOOJSWormhole(), InitOOJSWormhole(), RegisterStandardObjectConverters(), and OOJavaScriptEngine(Private)::registerStandardObjectConverters.

Here is the caller graph for this function:

◆ OOJSRegisterSubclass()

void OOJSRegisterSubclass ( JSClass * subclass,
JSClass * superclass )

Definition at line 1956 of file OOJavaScriptEngine.m.

1957{
1958 NSCParameterAssert(subclass != NULL && superclass != NULL);
1959
1960 if (sRegisteredSubClasses == NULL) {
1961 sRegisteredSubClasses = NSCreateMapTable(NSNonOwnedPointerMapKeyCallBacks, NSNonOwnedPointerMapValueCallBacks, 0);
1962 }
1963
1964 NSCAssert(NSMapGet(sRegisteredSubClasses, subclass) == NULL, @"A JS class cannot be registered as a subclass of multiple classes.");
1965
1966 NSMapInsertKnownAbsent(sRegisteredSubClasses, subclass, superclass);
1967}

References sRegisteredSubClasses.

Referenced by InitOOJSDock(), InitOOJSDock(), InitOOJSExhaustPlume(), InitOOJSExhaustPlume(), InitOOJSFlasher(), InitOOJSFlasher(), InitOOJSPlanet(), InitOOJSPlanet(), InitOOJSPlayerShip(), InitOOJSPlayerShip(), InitOOJSShip(), InitOOJSShip(), InitOOJSStation(), InitOOJSStation(), InitOOJSSun(), InitOOJSSun(), InitOOJSVisualEffect(), InitOOJSVisualEffect(), InitOOJSWaypoint(), InitOOJSWaypoint(), InitOOJSWormhole(), and InitOOJSWormhole().

Here is the caller graph for this function:

◆ OOJSRelinquishContext()

OOINLINE void OOJSRelinquishContext ( JSContext * context)

Definition at line 125 of file OOJavaScriptEngine.h.

126{
127#ifdef OO_DEBUG_MONITOR_ENABLED
128 extern JSContext* gOOJSMainThreadContext;
129 NSCParameterAssert(context == gOOJSMainThreadContext && JS_IsInRequest(context));
130#endif
131 JS_EndRequest(context);
132}
#define JS_EndRequest(context)

References gOOJSMainThreadContext, JS_EndRequest, JS_IsInRequest, and OOINLINE.

Referenced by StationEntity::acceptDockingClearanceRequestFrom:, PlayerEntity::activatePrimableEquipment:withMode:, PlayerEntity::adjustPriceByScriptForEqKey:withCurrent:, DockEntity::allowsLaunchingOf:, ShipEntity::behaviour_scripted_ai:, OOJSScript::callMethodNamed:withArguments:count:result:, DockEntity::canAcceptShipForDocking:, Universe::canInstantiateShip:, Universe::carryPlayerOn:inWormhole:, ClearPendingCallback(), PlayerEntity::completeSetUpAndSetTarget:, PlayerEntity::cycleNextMultiFunctionDisplay:, PlayerEntity::cyclePreviousMultiFunctionDisplay:, OOJSScript::dealloc, OOJSScript::defineProperty:named:, OOJSGuiScreenKeyDefinition::deleteJSPointers, OOJSInterfaceDefinition::deleteJSPointers, OOJSPopulatorDefinition::deleteJSPointers, OOJSTimer::deleteJSPointers, OOJSFunction::deleteJSValue, OOJSValue::deleteJSValue, OOJSTimer::descriptionComponents, OOJavaScriptEngine(Private)::destroyMainThreadContext, StationEntity::dockingInstructionsForShip:, OOCharacter::doScriptEvent:, OOVisualEffectEntity::doScriptEvent:, ShipEntity::doScriptEvent:, ShipEntity::doScriptEvent:withArgument:, ShipEntity::doScriptEvent:withArgument:andArgument:, ShipEntity::doScriptEvent:withArguments:, ShipEntity::doScriptEvent:withArguments:count:, PlayerEntity::doWorldEventUntilMissionScreen:, PlayerEntity::enterGalacticWitchspace, Universe::enterGUIViewModeWithMouseInteraction:, PlayerEntity::enterWitchspace, PlayerEntity::enterWormhole:, ShipEntity::equipmentValidToAdd:whileLoading:inContext:, OORegExpMatcher::init, OOJSFunction::initWithName:scope:code:argumentCount:argumentNames:fileName:lineNumber:context:, OOJSScript::initWithPath:, OOJSScript::initWithPath:properties:, OOJSScript::javaScriptEngineWillReset:, PlayerEntity(OOJavaScriptExtensions)::javaScriptEngineWillReset:, JSPlayerObject(), JSPlayerShipObject(), OOShipRegistry(OODataLoader)::loadDemoShips, PlayerEntity::markAsOffender:withReason:, ShipEntity::markAsOffender:withReason:, MissionRunCallback(), MissionRunCallback(), OOCommodities(OOPrivate)::modifyGood:withScript:atStation:inSystem:localMode:, PlayerEntity(OOPrivate)::noteCompassLostTarget, PlayerEntity::noteGUIDidChangeFrom:to:refresh:, PlayerEntity::noteGUIWillChangeTo:, ShipEntity::noteKilledBy:damageType:, ShipEntity::noteTakingDamage:from:type:, OOJSFrameCallbacksInvoke(), OOJSFrameCallbacksInvoke(), OOJSFrameCallbacksRemoveAll(), OOJSIDFromString(), OOJSInitJSIDCachePRIVATE(), OOJSStrLiteralCachePRIVATE(), OOStringFromDeciCredits(), OOStringFromJSID(), Universe::populateNormalSpace, OOJSScript::propertyNamed:, ShipEntity(Private)::refreshEscortPositions, OOJSTimer(Private)::releaseJSValues, OOJavaScriptEngine::removeGCObjectRoot:, OOJavaScriptEngine::removeGCValueRoot:, Universe::repopulateSystem, OOJSGuiScreenKeyDefinition::runCallback:, OOJSInterfaceDefinition::runCallback:, OOJSPopulatorDefinition::runCallback:, ShipEntity(PureAI)::scanForNearestShipMatchingPredicate:, PlayerEntity::selectNextMultiFunctionDisplay, PlayerEntity::selectPreviousMultiFunctionDisplay, PlayerEntity::setBounty:withReasonAsString:, ShipEntity::setBounty:withReasonAsString:, OOJSGuiScreenKeyDefinition::setCallback:, OOJSInterfaceDefinition::setCallback:, OOJSPopulatorDefinition::setCallback:, OOJSGuiScreenKeyDefinition::setCallbackThis:, OOJSInterfaceDefinition::setCallbackThis:, OOJSPopulatorDefinition::setCallbackThis:, PlayerEntity::setInfoSystemID:moveChart:, OOJSScript::setProperty:named:, Universe::setUpWitchspaceBetweenSystem:andSystem:, Universe::shipsForSaleForSystem:withTL:atTime:, PlayerEntity::startUpComplete, OORegExpMatcher::string:matchesExpression:flags:, PlayerEntity(OOControlsPrivate)::switchToThisView:fromView:andProcessWeaponFacing:justNotify:, SyntaxIssue(), OOJSTimer::timerFired, OOECMBlastEntity::update:, and Universe::update:.

Here is the caller graph for this function:

◆ OOJSReportBadArguments()

void OOJSReportBadArguments ( JSContext * context,
NSString * scriptClass,
NSString * function,
uintN argc,
jsval * argv,
NSString * message,
NSString * expectedArgsDescription )

Definition at line 1052 of file OOJavaScriptEngine.m.

1053{
1054 @try {
1055 if (message == nil)
1056 message = @"Invalid arguments";
1057 message = [NSString stringWithFormat:@"%@ %@", message, [NSString stringWithJavaScriptParameters:argv count:argc inContext:context]];
1058 if (expectedArgsDescription != nil)
1059 message = [NSString stringWithFormat:@"%@ -- expected %@", message, expectedArgsDescription];
1060
1061 OOJSReportErrorForCaller(context, scriptClass, function, @"%@.", message);
1062 }
1063 @catch (id exception) {
1064 // Squash any secondary errors during error handling.
1065 }
1066}
void OOJSReportErrorForCaller(JSContext *context, NSString *scriptClass, NSString *function, NSString *format,...)
unsigned count

References nil, and OOJSReportErrorForCaller().

Referenced by ClockAddSeconds(), ClockAddSeconds(), ClockClockStringForTime(), ClockClockStringForTime(), DockIsQueued(), DockIsQueued(), EquipmentInfoStaticInfoForKey(), EquipmentInfoStaticInfoForKey(), FontMeasureString(), FontMeasureString(), GetRelativeToAndRange(), GetRelativeToAndRange(), GetThisQuaternion(), GetThisQuaternion(), GetThisVector(), GetThisVector(), GlobalAddFrameCallback(), GlobalAddFrameCallback(), GlobalAutoAIForRole(), GlobalAutoAIForRole(), GlobalClearExtraGuiScreenKeys(), GlobalClearExtraGuiScreenKeys(), GlobalDisplayNameForCommodity(), GlobalDisplayNameForCommodity(), GlobalExpandDescription(), GlobalExpandDescription(), GlobalExpandMissionText(), GlobalExpandMissionText(), GlobalGetGuiColorSettingForKey(), GlobalGetGuiColorSettingForKey(), GlobalGetScreenBackgroundForKey(), GlobalGetScreenBackgroundForKey(), GlobalIsValidFrameCallback(), GlobalIsValidFrameCallback(), GlobalKeyBindingDescription(), GlobalKeyBindingDescription(), GlobalRandomInhabitantsDescription(), GlobalRandomInhabitantsDescription(), GlobalRemoveFrameCallback(), GlobalRemoveFrameCallback(), GlobalSetExtraGuiScreenKeys(), GlobalSetExtraGuiScreenKeys(), GlobalSetGuiColorSettingForKey(), GlobalSetGuiColorSettingForKey(), GlobalSetScreenBackground(), GlobalSetScreenBackground(), GlobalSetScreenBackgroundForKey(), GlobalSetScreenBackgroundForKey(), GlobalSetScreenOverlay(), GlobalSetScreenOverlay(), ManifestComment(), ManifestComment(), ManifestSetComment(), ManifestSetComment(), ManifestSetShortComment(), ManifestSetShortComment(), ManifestShortComment(), ManifestShortComment(), MissionMarkSystem(), MissionMarkSystem(), MissionRunScreen(), MissionRunScreen(), MissionSetInstructionsInternal(), MissionSetInstructionsInternal(), MissionUnmarkSystem(), MissionUnmarkSystem(), OOJSArgumentListGetNumber(), OOJSArgumentListGetNumber(), PlayerAddMessageToArrivalReport(), PlayerAddMessageToArrivalReport(), PlayerAudioMessage(), PlayerAudioMessage(), PlayerCommsMessage(), PlayerCommsMessage(), PlayerConsoleMessage(), PlayerConsoleMessage(), PlayerEndScenario(), PlayerEndScenario(), PlayerReplaceShip(), PlayerReplaceShip(), PlayerSetEscapePodDestination(), PlayerSetEscapePodDestination(), PlayerSetPlayerRole(), PlayerSetPlayerRole(), PlayerShipAddParcel(), PlayerShipAddParcel(), PlayerShipAddPassenger(), PlayerShipAddPassenger(), PlayerShipAwardContract(), PlayerShipAwardContract(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipAwardEquipmentToCurrentPylon(), PlayerShipBeginGalacticHyperspaceCountdown(), PlayerShipBeginGalacticHyperspaceCountdown(), PlayerShipBeginHyperspaceCountdown(), PlayerShipBeginHyperspaceCountdown(), PlayerShipCancelDockingRequest(), PlayerShipCancelDockingRequest(), PlayerShipEngageAutopilotToStation(), PlayerShipEngageAutopilotToStation(), PlayerShipHideHUDSelector(), PlayerShipHideHUDSelector(), PlayerShipRemoveContract(), PlayerShipRemoveContract(), PlayerShipRemoveParcel(), PlayerShipRemoveParcel(), PlayerShipRemovePassenger(), PlayerShipRemovePassenger(), PlayerShipRequestDockingClearance(), PlayerShipRequestDockingClearance(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomView(), PlayerShipSetCustomView(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionText(), PlayerShipSetMultiFunctionText(), PlayerShipSetPrimedEquipment(), PlayerShipSetPrimedEquipment(), PlayerShipShowHUDSelector(), PlayerShipShowHUDSelector(), PlayerShipUseSpecialCargo(), PlayerShipUseSpecialCargo(), QuaternionConstruct(), QuaternionConstruct(), QuaternionFromArgumentList(), QuaternionFromArgumentList(), ShipAddCargoEntity(), ShipAddCargoEntity(), ShipAddCollisionException(), ShipAddCollisionException(), ShipAddDefenseTarget(), ShipAddDefenseTarget(), ShipAdjustCargo(), ShipAdjustCargo(), ShipAwardEquipment(), ShipAwardEquipment(), ShipCanAwardEquipment(), ShipCanAwardEquipment(), ShipCheckScanner(), ShipCheckScanner(), ShipCommsMessage(), ShipCommsMessage(), ShipDealEnergyDamage(), ShipDealEnergyDamage(), ShipDumpCargo(), ShipDumpCargo(), ShipEjectItem(), ShipEjectItem(), ShipEjectSpecificItem(), ShipEjectSpecificItem(), ShipEnterWormhole(), ShipEnterWormhole(), ShipEquipmentStatus(), ShipEquipmentStatus(), ShipExitSystem(), ShipExitSystem(), ShipGroupAddShip(), ShipGroupAddShip(), ShipGroupConstruct(), ShipGroupConstruct(), ShipGroupContainsShip(), ShipGroupContainsShip(), ShipGroupRemoveShip(), ShipGroupRemoveShip(), ShipHasEquipmentProviding(), ShipHasEquipmentProviding(), ShipHasRole(), ShipHasRole(), ShipOfferToEscort(), ShipOfferToEscort(), ShipPatrolReportIn(), ShipPatrolReportIn(), ShipReactToAIMessage(), ShipReactToAIMessage(), ShipRemove(), ShipRemove(), ShipRemoveCollisionException(), ShipRemoveCollisionException(), ShipRemoveDefenseTarget(), ShipRemoveDefenseTarget(), ShipRemoveEquipment(), ShipRemoveEquipment(), ShipRunLegacyScriptActions(), ShipRunLegacyScriptActions(), ShipSendAIMessage(), ShipSendAIMessage(), ShipSetAI(), ShipSetAI(), ShipSetBounty(), ShipSetBounty(), ShipSetCargo(), ShipSetCargo(), ShipSetCargoType(), ShipSetCargoType(), ShipSetCrew(), ShipSetCrew(), ShipSetEquipmentStatus(), ShipSetEquipmentStatus(), ShipSetMaterials(), ShipSetMaterials(), ShipSetScript(), ShipSetScript(), ShipSetShaders(), ShipSetShaders(), ShipSpawn(), ShipSpawn(), ShipStaticKeysForRole(), ShipStaticKeysForRole(), ShipStaticRoleIsInCategory(), ShipStaticRoleIsInCategory(), ShipStaticSetShipDataForKey(), ShipStaticSetShipDataForKey(), ShipStaticShipDataForKey(), ShipStaticShipDataForKey(), ShipSwitchAI(), ShipSwitchAI(), ShipThreatAssessment(), ShipThreatAssessment(), SoundSourcePlay(), SoundSourcePlay(), SoundStaticLoad(), SoundStaticLoad(), SoundStaticPlayMusic(), SoundStaticPlayMusic(), SoundStaticStopMusic(), SoundStaticStopMusic(), SpecialJSWarning(), SpecialJSWarning(), StationAbortDockingForShip(), StationAbortDockingForShip(), StationAddShipToShipyard(), StationAddShipToShipyard(), StationCanDockShip(), StationCanDockShip(), StationLaunchShipWithRole(), StationLaunchShipWithRole(), StationRemoveShipFromShipyard(), StationRemoveShipFromShipyard(), StationSetInterface(), StationSetInterface(), StationSetMarketPrice(), StationSetMarketPrice(), StationSetMarketQuantity(), StationSetMarketQuantity(), SystemAddMoon(), SystemAddMoon(), SystemAddPlanet(), SystemAddPlanet(), SystemAddShipsOrGroup(), SystemAddShipsOrGroup(), SystemAddShipsOrGroupToRoute(), SystemAddShipsOrGroupToRoute(), SystemAddVisualEffect(), SystemAddVisualEffect(), SystemCountEntitiesWithScanClass(), SystemCountEntitiesWithScanClass(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithRole(), SystemCountShipsWithRole(), SystemEntitiesWithScanClass(), SystemEntitiesWithScanClass(), SystemFilteredEntities(), SystemFilteredEntities(), SystemInfoDistanceToSystem(), SystemInfoDistanceToSystem(), SystemInfoRouteToSystem(), SystemInfoRouteToSystem(), SystemInfoSamplePrice(), SystemInfoSamplePrice(), SystemInfoSetPropertyMethod(), SystemInfoSetPropertyMethod(), SystemInfoStaticFilteredSystems(), SystemInfoStaticFilteredSystems(), SystemInfoStaticSetInterstellarProperty(), SystemInfoStaticSetInterstellarProperty(), SystemLegacyAddShips(), SystemLegacyAddShips(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddSystemShips(), SystemLegacyAddSystemShips(), SystemLegacySpawnShip(), SystemLegacySpawnShip(), SystemLocationFromCode(), SystemLocationFromCode(), SystemSetPopulator(), SystemSetPopulator(), SystemSetWaypoint(), SystemSetWaypoint(), SystemShipsWithPrimaryRole(), SystemShipsWithPrimaryRole(), SystemShipsWithRole(), SystemShipsWithRole(), SystemStaticInfoForSystem(), SystemStaticInfoForSystem(), SystemStaticSystemIDForName(), SystemStaticSystemIDForName(), SystemStaticSystemNameForID(), SystemStaticSystemNameForID(), TimerConstruct(), TimerConstruct(), ValidateContracts(), ValidateContracts(), VectorConstruct(), VectorConstruct(), VectorFromArgumentList(), VectorFromArgumentList(), VectorFromCoordinateSystem(), VectorFromCoordinateSystem(), VectorStaticInterpolate(), VectorStaticInterpolate(), VectorToCoordinateSystem(), VectorToCoordinateSystem(), VisualEffectScale(), VisualEffectScale(), VisualEffectSetMaterials(), VisualEffectSetMaterials(), VisualEffectSetShaders(), and VisualEffectSetShaders().

Here is the call graph for this function:

◆ OOJSReportBadPropertySelector()

void OOJSReportBadPropertySelector ( JSContext * context,
JSObject * thisObj,
jsid propID,
JSPropertySpec * propertySpec )

Definition at line 1035 of file OOJavaScriptEngine.m.

1036{
1037 NSString* propName = OOStringFromJSPropertyIDAndSpec(context, propID, propertySpec);
1038 const char* className = OOJSGetClass(context, thisObj)->name;
1039
1040 OOJSReportError(context, @"Invalid property identifier %@ for instance of %s.", propName, className);
1041}
NSString * OOStringFromJSPropertyIDAndSpec(JSContext *context, jsid propID, JSPropertySpec *propertySpec)

References OOJSGetClass(), OOJSReportError(), and OOStringFromJSPropertyIDAndSpec().

Referenced by ClockGetProperty(), ClockGetProperty(), DockGetProperty(), DockGetProperty(), DockSetProperty(), DockSetProperty(), EntityGetProperty(), EntityGetProperty(), EntitySetProperty(), EntitySetProperty(), EquipmentInfoGetProperty(), EquipmentInfoGetProperty(), EquipmentInfoSetProperty(), EquipmentInfoSetProperty(), ExhaustPlumeGetProperty(), ExhaustPlumeGetProperty(), ExhaustPlumeSetProperty(), ExhaustPlumeSetProperty(), FlasherGetProperty(), FlasherGetProperty(), FlasherSetProperty(), FlasherSetProperty(), GlobalGetProperty(), GlobalGetProperty(), ManifestGetProperty(), ManifestGetProperty(), MissionGetProperty(), MissionGetProperty(), MissionSetProperty(), MissionSetProperty(), OoliteGetProperty(), OoliteGetProperty(), OoliteSetProperty(), OoliteSetProperty(), PlanetGetProperty(), PlanetGetProperty(), PlanetSetProperty(), PlanetSetProperty(), PlayerGetProperty(), PlayerGetProperty(), PlayerSetProperty(), PlayerSetProperty(), PlayerShipGetProperty(), PlayerShipGetProperty(), PlayerShipSetProperty(), PlayerShipSetProperty(), QuaternionGetProperty(), QuaternionGetProperty(), QuaternionSetProperty(), QuaternionSetProperty(), ShipGetProperty(), ShipGetProperty(), ShipGroupGetProperty(), ShipGroupGetProperty(), ShipGroupSetProperty(), ShipGroupSetProperty(), ShipSetProperty(), ShipSetProperty(), SoundGetProperty(), SoundGetProperty(), SoundSourceGetProperty(), SoundSourceGetProperty(), SoundSourceSetProperty(), SoundSourceSetProperty(), StationGetProperty(), StationGetProperty(), StationSetProperty(), StationSetProperty(), SunGetProperty(), SunGetProperty(), SystemGetProperty(), SystemGetProperty(), SystemInfoGetProperty(), SystemInfoGetProperty(), SystemSetProperty(), SystemSetProperty(), TimerGetProperty(), TimerGetProperty(), TimerSetProperty(), TimerSetProperty(), VectorGetProperty(), VectorGetProperty(), VectorSetProperty(), VectorSetProperty(), VisualEffectGetProperty(), VisualEffectGetProperty(), VisualEffectSetProperty(), VisualEffectSetProperty(), WaypointGetProperty(), WaypointGetProperty(), WaypointSetProperty(), WaypointSetProperty(), WormholeGetProperty(), WormholeGetProperty(), and WormholeSetProperty().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSReportBadPropertyValue()

void OOJSReportBadPropertyValue ( JSContext * context,
JSObject * thisObj,
jsid propID,
JSPropertySpec * propertySpec,
jsval value )

Definition at line 1043 of file OOJavaScriptEngine.m.

1044{
1045 NSString* propName = OOStringFromJSPropertyIDAndSpec(context, propID, propertySpec);
1046 const char* className = OOJSGetClass(context, thisObj)->name;
1047 NSString* valueDesc = OOJSDescribeValue(context, value, YES);
1048
1049 OOJSReportError(context, @"Cannot set property %@ of instance of %s to invalid value %@.", propName, className, valueDesc);
1050}
NSString * OOJSDescribeValue(JSContext *context, jsval value, BOOL abbreviateObjects)

References OOJSDescribeValue(), OOJSGetClass(), OOJSReportError(), and OOStringFromJSPropertyIDAndSpec().

Referenced by DockSetProperty(), DockSetProperty(), EntitySetProperty(), EntitySetProperty(), EquipmentInfoSetProperty(), EquipmentInfoSetProperty(), ExhaustPlumeSetProperty(), ExhaustPlumeSetProperty(), FlasherSetProperty(), FlasherSetProperty(), ManifestSetProperty(), MissionSetProperty(), MissionSetProperty(), OoliteSetProperty(), OoliteSetProperty(), PlanetSetProperty(), PlanetSetProperty(), PlayerSetProperty(), PlayerSetProperty(), PlayerShipSetProperty(), PlayerShipSetProperty(), QuaternionSetProperty(), QuaternionSetProperty(), ShipGroupSetProperty(), ShipGroupSetProperty(), ShipSetProperty(), ShipSetProperty(), SoundSourceSetProperty(), SoundSourceSetProperty(), StationSetProperty(), StationSetProperty(), SystemSetProperty(), SystemSetProperty(), TimerSetProperty(), TimerSetProperty(), VectorSetProperty(), VectorSetProperty(), VisualEffectSetProperty(), VisualEffectSetProperty(), WaypointSetProperty(), WaypointSetProperty(), and WormholeSetProperty().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSReportError()

void OOJSReportError ( JSContext * context,
NSString * format,
... )

Definition at line 930 of file OOJavaScriptEngine.m.

931{
932 va_list args;
933
934 va_start(args, format);
935 OOJSReportErrorWithArguments(context, format, args);
936 va_end(args);
937}
void OOJSReportErrorWithArguments(JSContext *context, NSString *format, va_list args)

References OOJSReportErrorWithArguments().

Referenced by EntitySetProperty(), EntitySetProperty(), GlobalAddFrameCallback(), GlobalAddFrameCallback(), ManifestSetProperty(), ManifestSetPropertyExotic(), MissionVariablesDefineOwnProperty(), MissionVariablesSetProperty(), OOJSObjectGetterImplPRIVATE(), OOJSObjectGetterImplPRIVATE(), OOJSReportBadPropertySelector(), OOJSReportBadPropertySelector(), OOJSReportBadPropertyValue(), OOJSReportBadPropertyValue(), OOJSReportErrorForCaller(), OOJSReportWrappedException(), OOJSUnconstructableConstruct(), OOJSUnconstructableConstruct(), OOJSValueToInt32(), PlayerReplaceShip(), PlayerReplaceShip(), PlayerSetEscapePodDestination(), PlayerSetEscapePodDestination(), PlayerShipRemoveAllCargo(), PlayerShipRemoveAllCargo(), PlayerShipResetCustomView(), PlayerShipResetCustomView(), PlayerShipSetCustomView(), PlayerShipSetCustomView(), PlayerShipSetProperty(), PlayerShipSetProperty(), RemoveOrExplodeShip(), RemoveOrExplodeShip(), SetMissionVariable(), ShipAdjustCargo(), ShipAdjustCargo(), ShipEnterWormhole(), ShipEnterWormhole(), ShipGroupConstruct(), ShipGroupConstruct(), ShipRemove(), ShipRemove(), ShipSetProperty(), ShipSetProperty(), SoundSourceConstruct(), SoundSourceConstruct(), SystemInfoGetProperty(), SystemInfoGetProperty(), TimerConstruct(), and TimerConstruct().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSReportErrorForCaller()

void OOJSReportErrorForCaller ( JSContext * context,
NSString * scriptClass,
NSString * function,
NSString * format,
... )

Definition at line 939 of file OOJavaScriptEngine.m.

940{
941 va_list args;
942 NSString* msg = nil;
943
944 @try {
945 va_start(args, format);
946 msg = [[NSString alloc] initWithFormat:format arguments:args];
947 va_end(args);
948
949 OOJSReportError(context, @"%@%@", CallerPrefix(scriptClass, function), msg);
950 }
951 @catch (id exception) {
952 // Squash any secondary errors during error handling.
953 }
954 [msg release];
955}
static NSString * CallerPrefix(NSString *scriptClass, NSString *function)

References CallerPrefix(), nil, and OOJSReportError().

Referenced by OOJSReportBadArguments(), OOJSReportBadArguments(), ShipExitAI(), ShipExitAI(), ShipExitSystem(), ShipExitSystem(), ShipReactToAIMessage(), ShipReactToAIMessage(), ShipSendAIMessage(), ShipSendAIMessage(), ShipSetAI(), ShipSetAI(), ShipSetEquipmentStatus(), ShipSetEquipmentStatus(), ShipSetScript(), ShipSetScript(), ShipSwitchAI(), ShipSwitchAI(), SystemInfoDistanceToSystem(), SystemInfoDistanceToSystem(), SystemInfoRouteToSystem(), SystemInfoRouteToSystem(), SystemInfoSamplePrice(), and SystemInfoSamplePrice().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSReportErrorWithArguments()

void OOJSReportErrorWithArguments ( JSContext * context,
NSString * format,
va_list args )

Definition at line 957 of file OOJavaScriptEngine.m.

958{
959 NSString* msg = nil;
960
961 NSCParameterAssert(JS_IsInRequest(context));
962
963 @try {
964 msg = [[NSString alloc] initWithFormat:format arguments:args];
965 JS_ReportError(context, "%s", [msg UTF8String]);
966 }
967 @catch (id exception) {
968 // Squash any secondary errors during error handling.
969 }
970 [msg release];
971}

References JS_IsInRequest, and nil.

Referenced by OOJSReportError().

Here is the caller graph for this function:

◆ OOJSReportPendingException()

◆ OOJSReportWarning()

void OOJSReportWarning ( JSContext * context,
NSString * format,
... )

Definition at line 994 of file OOJavaScriptEngine.m.

995{
996 va_list args;
997
998 va_start(args, format);
999 OOJSReportWarningWithArguments(context, format, args);
1000 va_end(args);
1001}
void OOJSReportWarningWithArguments(JSContext *context, NSString *format, va_list args)

References OOJSReportWarningWithArguments().

Referenced by OOJSScript(OOPrivate)::checkForTickle:, EntityFromArgumentList(), EntityFromArgumentList(), EquipmentInfoSetProperty(), EquipmentInfoSetProperty(), GetJSSystemInfoForSystem(), GlobalRemoveFrameCallback(), GlobalRemoveFrameCallback(), GlobalSetScreenBackground(), GlobalSetScreenBackground(), GlobalSetScreenOverlay(), GlobalSetScreenOverlay(), ManifestSetProperty(), ManifestSetProperty(), MissionRunScreen(), MissionRunScreen(), MissionRunShipLibrary(), MissionRunShipLibrary(), MissionSetInstructionsInternal(), MissionSetInstructionsInternal(), OOJSReportWarningForCaller(), OoliteSetProperty(), OoliteSetProperty(), PlanetSetProperty(), PlanetSetProperty(), PlayerShipSetProperty(), PlayerShipSetProperty(), ScriptAddProperty(), ShipFireECM(), ShipFireECM(), ShipSetMaterialsInternal(), ShipSetMaterialsInternal(), ShipSetShaders(), ShipSetShaders(), SpecialJSWarning(), SpecialJSWarning(), GuiDisplayGen::textureDescriptorFromJSValue:inContext:callerDescription:, TimerSetProperty(), TimerSetProperty(), VisualEffectSetMaterialsInternal(), VisualEffectSetMaterialsInternal(), VisualEffectSetShaders(), and VisualEffectSetShaders().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSReportWarningForCaller()

void OOJSReportWarningForCaller ( JSContext * context,
NSString * scriptClass,
NSString * function,
NSString * format,
... )

Definition at line 1003 of file OOJavaScriptEngine.m.

1004{
1005 va_list args;
1006 NSString* msg = nil;
1007
1008 @try {
1009 va_start(args, format);
1010 msg = [[NSString alloc] initWithFormat:format arguments:args];
1011 va_end(args);
1012
1013 OOJSReportWarning(context, @"%@%@", CallerPrefix(scriptClass, function), msg);
1014 }
1015 @catch (id exception) {
1016 // Squash any secondary errors during error handling.
1017 }
1018 [msg release];
1019}
void OOJSReportWarning(JSContext *context, NSString *format,...)

References CallerPrefix(), nil, and OOJSReportWarning().

Referenced by ShipAddCargoEntity(), ShipAddCargoEntity(), ShipDumpCargo(), ShipDumpCargo(), ShipExitAI(), ShipExitAI(), ShipGroupAddShip(), ShipGroupAddShip(), ShipSetEquipmentStatus(), ShipSetEquipmentStatus(), StationAddShipToShipyard(), StationAddShipToShipyard(), StationRemoveShipFromShipyard(), and StationRemoveShipFromShipyard().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSReportWarningWithArguments()

void OOJSReportWarningWithArguments ( JSContext * context,
NSString * format,
va_list args )

Definition at line 1021 of file OOJavaScriptEngine.m.

1022{
1023 NSString* msg = nil;
1024
1025 @try {
1026 msg = [[NSString alloc] initWithFormat:format arguments:args];
1027 JS_ReportWarning(context, "%s", [msg UTF8String]);
1028 }
1029 @catch (id exception) {
1030 // Squash any secondary errors during error handling.
1031 }
1032 [msg release];
1033}

References nil.

Referenced by OOJSReportWarning(), and SyntaxIssue().

Here is the caller graph for this function:

◆ OOJSResumeTimeLimiter()

void OOJSResumeTimeLimiter ( void )

Definition at line 137 of file OOJSEngineTimeManagement.m.

138{
139 if (--sLimiterPauseDepth == 0)
140
141 {
145
146 sLimiterTimeLimit += elapsed;
147 }
148}
static double sLimiterTimeLimit
OOTimeDelta OOHighResTimeDeltaInSeconds(OOHighResTimeValue startTime, OOHighResTimeValue endTime)
uint64_t OOHighResTimeValue
double OOTimeDelta
Definition OOTypes.h:193

References OODisposeHighResTime, OOGetHighResTime, OOHighResTimeDeltaInSeconds(), sLimiterPauseDepth, sLimiterPauseStart, and sLimiterTimeLimit.

Referenced by Universe::findEntitiesMatchingPredicate:parameter:inRange:ofEntity:, Universe::findOneEntityMatchingPredicate:parameter:, JSFunctionPredicate(), MissionRunScreen(), MissionRunScreen(), OOJSReportPendingException(), OOJSReportWarningWithArguments(), PlanetSetProperty(), PlanetSetProperty(), ReportJSError(), SoundFromJSValue(), SoundFromJSValue(), SystemFilteredEntities(), SystemFilteredEntities(), SystemInfoStaticFilteredSystems(), and SystemInfoStaticFilteredSystems().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSSetWarningOrErrorStackSkip()

void OOJSSetWarningOrErrorStackSkip ( unsigned skip)

Definition at line 1068 of file OOJavaScriptEngine.m.

1069{
1071}
static unsigned sErrorHandlerStackSkip

References sErrorHandlerStackSkip.

Referenced by SpecialJSWarning(), and SpecialJSWarning().

Here is the caller graph for this function:

◆ OOJSStrLiteralCachePRIVATE()

void OOJSStrLiteralCachePRIVATE ( const char * string,
jsval * strCache,
BOOL * inited )

Definition at line 1413 of file OOJavaScriptEngine.m.

1414{
1415 NSCParameterAssert(string != NULL && strCache != NULL && inited != NULL && !*inited);
1416
1417 JSContext* context = OOJSAcquireContext();
1418
1419 JSString* jsString = JS_InternString(context, string);
1420 if (EXPECT_NOT(string == NULL)) {
1421 [NSException raise:NSGenericException format:@"Failed to initialize JavaScript string literal cache for \"%@\".", [[NSString stringWithUTF8String:string] escapedForJavaScriptLiteral]];
1422 }
1423
1424 *strCache = STRING_TO_JSVAL(jsString);
1425 *inited = YES;
1426
1427 OOJSRelinquishContext(context);
1428}

References EXPECT_NOT, OOJSAcquireContext(), and OOJSRelinquishContext().

Here is the call graph for this function:

◆ OOJSUnconstructableConstruct()

JSBool OOJSUnconstructableConstruct ( JSContext * context,
uintN argc,
jsval * vp )

Definition at line 1813 of file OOJavaScriptEngine.m.

1814{
1815 OOJS_NATIVE_ENTER(context)
1816
1817 JSFunction* function = JS_ValueToFunction(context, JS_CALLEE(context, vp));
1818 NSString* name = OOStringFromJSString(context, JS_GetFunctionId(function));
1819
1820 OOJSReportError(context, @"%@ cannot be used as a constructor.", name);
1821 return NO;
1822
1824}

References OOJS_NATIVE_ENTER, OOJS_NATIVE_EXIT, OOJSReportError(), and OOStringFromJSString().

Referenced by InitOOJSClock(), InitOOJSClock(), InitOOJSDock(), InitOOJSDock(), InitOOJSEntity(), InitOOJSEntity(), InitOOJSEquipmentInfo(), InitOOJSEquipmentInfo(), InitOOJSExhaustPlume(), InitOOJSExhaustPlume(), InitOOJSFlasher(), InitOOJSFlasher(), InitOOJSManifest(), InitOOJSManifest(), InitOOJSMission(), InitOOJSMission(), InitOOJSOolite(), InitOOJSOolite(), InitOOJSPlanet(), InitOOJSPlanet(), InitOOJSPlayer(), InitOOJSPlayer(), InitOOJSPlayerShip(), InitOOJSPlayerShip(), InitOOJSScript(), InitOOJSScript(), InitOOJSShip(), InitOOJSShip(), InitOOJSSound(), InitOOJSSound(), InitOOJSStation(), InitOOJSStation(), InitOOJSSun(), InitOOJSSun(), InitOOJSSystem(), InitOOJSSystem(), InitOOJSSystemInfo(), InitOOJSSystemInfo(), InitOOJSVisualEffect(), InitOOJSVisualEffect(), InitOOJSWaypoint(), InitOOJSWaypoint(), InitOOJSWormhole(), and InitOOJSWormhole().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOJSValueFromBOOL()

◆ OOJSValueFromDouble()

◆ OOJSValueFromNativeObject()

OOINLINE jsval OOJSValueFromNativeObject ( JSContext * context,
id object )

Definition at line 269 of file OOJavaScriptEngine.h.

270{
271 if (object != nil)
272 return [object oo_jsValueInContext:context];
273 return JSVAL_NULL;
274}

References nil, and OOINLINE.

Referenced by StationEntity::acceptDockingClearanceRequestFrom:, PlayerEntity::adjustPriceByScriptForEqKey:withCurrent:, DockEntity::allowsLaunchingOf:, DockEntity::canAcceptShipForDocking:, Universe::canInstantiateShip:, Universe::carryPlayerOn:inWormhole:, ClockGetProperty(), ClockGetProperty(), PlayerEntity::cycleNextMultiFunctionDisplay:, PlayerEntity::cyclePreviousMultiFunctionDisplay:, OOJSScript::defineProperty:withID:inContext:, StationEntity::dockingInstructionsForShip:, ShipEntity::doScriptEvent:withArgument:, ShipEntity::doScriptEvent:withArgument:andArgument:, PlayerEntity::enterGalacticWitchspace, PlayerEntity::enterWitchspace, PlayerEntity::enterWormhole:, EntityGetProperty(), EntityGetProperty(), EquipmentInfoGetAllEqipment(), EquipmentInfoGetAllEqipment(), EquipmentInfoGetProperty(), EquipmentInfoGetProperty(), ShipEntity::equipmentValidToAdd:whileLoading:inContext:, ExhaustPlumeGetProperty(), ExhaustPlumeGetProperty(), FlasherGetProperty(), FlasherGetProperty(), GetJSSystemInfoForSystem(), OOShipRegistry(OODataLoader)::loadDemoShips, OOJSScript(Private)::loadScriptWithContext:, ManifestGetProperty(), ManifestGetProperty(), MissionGetProperty(), MissionGetProperty(), MissionRunCallback(), MissionRunCallback(), MissionRunScreen(), MissionRunScreen(), MissionVariablesGetProperty(), OOCommodities(OOPrivate)::modifyGood:withScript:atStation:inSystem:localMode:, ShipEntity::noteKilledBy:damageType:, ShipEntity::noteTakingDamage:from:type:, OOJSObjectFromNativeObject(), OoliteGetProperty(), OoliteGetProperty(), PlanetGetProperty(), PlanetGetProperty(), PlayerGetProperty(), PlayerGetProperty(), PlayerShipGetProperty(), PlayerShipGetProperty(), RewriteLegacyConst(), OOJSGuiScreenKeyDefinition::runCallback:, OOJSInterfaceDefinition::runCallback:, RunDeferredOperations(), PlayerEntity::setBounty:withReasonAsString:, ShipEntity::setBounty:withReasonAsString:, OOJSScript::setProperty:withID:inContext:, ShipGetProperty(), ShipGetProperty(), ShipGroupGetProperty(), ShipGroupGetProperty(), Universe::shipsForSaleForSystem:withTL:atTime:, SoundGetProperty(), SoundGetProperty(), SoundSourceGetProperty(), SoundSourceGetProperty(), StationGetProperty(), StationGetProperty(), OORegExpMatcher::string:matchesExpression:flags:, SunGetProperty(), SunGetProperty(), SystemGetProperty(), SystemGetProperty(), SystemInfoStaticFilteredSystems(), SystemInfoStaticFilteredSystems(), OOECMBlastEntity::update:, ValueForMissionVariable(), VisualEffectGetProperty(), VisualEffectGetProperty(), WaypointGetProperty(), WaypointGetProperty(), WormholeGetProperty(), and WormholeGetProperty().

Here is the caller graph for this function:

◆ OOJSValueIsArray()

OOINLINE BOOL OOJSValueIsArray ( JSContext * context,
jsval value )

Definition at line 414 of file OOJavaScriptEngine.h.

415{
416 return JSVAL_IS_OBJECT(value) && !JSVAL_IS_NULL(value) && JS_IsArrayObject(context, JSVAL_TO_OBJECT(value));
417}

References OOINLINE.

◆ OOJSValueIsFunction()

OOINLINE BOOL OOJSValueIsFunction ( JSContext * context,
jsval value )

Definition at line 401 of file OOJavaScriptEngine.h.

402{
403 return JSVAL_IS_OBJECT(value) && !JSVAL_IS_NULL(value) && JS_ObjectIsFunction(context, JSVAL_TO_OBJECT(value));
404}

References OOINLINE.

Referenced by DescribeValue(), GlobalAddFrameCallback(), GlobalAddFrameCallback(), GlobalSetExtraGuiScreenKeys(), GlobalSetExtraGuiScreenKeys(), OOJSTimer::initWithDelay:interval:context:function:this:, OOJSTimer(Private)::initWithDelay:interval:context:function:this:, JSFunctionPredicate(), MissionRunScreen(), MissionRunScreen(), StationSetInterface(), StationSetInterface(), SystemFilteredEntities(), SystemFilteredEntities(), SystemInfoStaticFilteredSystems(), and SystemInfoStaticFilteredSystems().

Here is the caller graph for this function:

◆ OOJSValueIsUndefined()

OOINLINE BOOL OOJSValueIsUndefined ( jsval value)

Definition at line 151 of file OOJavaScriptEngine.h.

152{
153 return JSVAL_IS_VOID(value);
154}

References OOINLINE.

◆ OOJSValueToBOOL()

OOINLINE BOOL OOJSValueToBOOL ( JSContext * context,
jsval value )

Definition at line 162 of file OOJavaScriptEngine.h.

163{
164 JSBool result;
165 if (!JS_ValueToBoolean(context, value, &result))
166 return NO;
167 return result;
168}

References OOINLINE.

Referenced by StationEntity::acceptDockingClearanceRequestFrom:, DockEntity::allowsLaunchingOf:, DockEntity::canAcceptShipForDocking:, Universe::canInstantiateShip:, StationEntity::dockingInstructionsForShip:, ShipEntity::equipmentValidToAdd:whileLoading:inContext:, JSFunctionPredicate(), LoadCompatibilityScript(), OOShipRegistry(OODataLoader)::loadDemoShips, ShipEquipmentStatus(), and Universe::shipsForSaleForSystem:withTL:atTime:.

Here is the caller graph for this function:

◆ OOJSValueToInt32()

◆ OOStringFromJSID()

NSString * OOStringFromJSID ( jsid propID)

Definition at line 906 of file OOJavaScriptEngine.m.

907{
908 JSContext* context = OOJSAcquireContext();
909
910 jsval value;
911 NSString* result = nil;
912 if (JS_IdToValue(context, propID, &value)) {
913 result = OOStringFromJSString(context, JS_ValueToString(context, value));
914 }
915
916 OOJSRelinquishContext(context);
917
918 return result;
919}

References nil, OOJSAcquireContext(), OOJSRelinquishContext(), and OOStringFromJSString().

Referenced by OOJSScript::callMethod:inContext:withArguments:count:result:, KeyForAtom(), MissionVariablesDefineOwnProperty(), MissionVariablesSetProperty(), and OOJSDictionaryFromStringTable().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOStringFromJSPropertyIDAndSpec()

NSString * OOStringFromJSPropertyIDAndSpec ( JSContext * context,
jsid propID,
JSPropertySpec * propertySpec )

Definition at line 1473 of file OOJavaScriptEngine.m.

1474{
1475 if (JSID_IS_STRING(propID)) {
1476 return OOStringFromJSString(context, JSID_TO_STRING(propID));
1477 } else if (JSID_IS_INT(propID) && propertySpec != NULL) {
1478 int tinyid = JSID_TO_INT(propID);
1479
1480 while (propertySpec->name != NULL) {
1481 if (propertySpec->tinyid == tinyid)
1482 return [NSString stringWithUTF8String:propertySpec->name];
1483 propertySpec++;
1484 }
1485 }
1486
1487 jsval value;
1488 if (!JS_IdToValue(context, propID, &value))
1489 return @"unknown";
1490 return OOStringFromJSString(context, JS_ValueToString(context, value));
1491}

References OOStringFromJSString().

Referenced by OOJSReportBadPropertySelector(), OOJSReportBadPropertyValue(), and ShipSetProperty().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OOStringFromJSString()

NSString * OOStringFromJSString ( JSContext * context,
JSString * string )

Definition at line 1430 of file OOJavaScriptEngine.m.

1431{
1433
1434 if (EXPECT_NOT(string == NULL))
1435 return nil;
1436
1437 size_t length;
1438 const jschar* chars = JS_GetStringCharsAndLength(context, string, &length);
1439
1440 if (EXPECT(chars != NULL)) {
1441 return [NSString stringWithCharacters:chars length:length];
1442 } else {
1443 return nil;
1444 }
1445
1447}

References EXPECT, EXPECT_NOT, nil, OOJS_PROFILE_ENTER, and OOJS_PROFILE_EXIT.

Referenced by OOJSTimer::descriptionComponents, KeyForPropertyID(), ManifestGetProperty(), ManifestSetProperty(), OOJSDictionaryFromJSObject(), OOJSDictionaryFromStringTable(), OOJSUnconstructableConstruct(), OOStringFromJSID(), OOStringFromJSPropertyIDAndSpec(), OOStringFromJSValueEvenIfNull(), SystemInfoGetProperty(), SystemInfoSetProperty(), and WorldScriptsGetProperty().

Here is the caller graph for this function:

◆ OOStringFromJSValue()

NSString * OOStringFromJSValue ( JSContext * context,
jsval value )

Definition at line 1461 of file OOJavaScriptEngine.m.

1462{
1464
1465 if (EXPECT(!JSVAL_IS_NULL(value) && !JSVAL_IS_VOID(value))) {
1466 return OOStringFromJSValueEvenIfNull(context, value);
1467 }
1468 return nil;
1469
1471}

References EXPECT, nil, OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, and OOStringFromJSValueEvenIfNull().

Referenced by DescribeValue(), EquipmentInfoStaticInfoForKey(), EquipmentInfoStaticInfoForKey(), FontMeasureString(), FontMeasureString(), GetParameterString(), GetParameterString(), GlobalAutoAIForRole(), GlobalAutoAIForRole(), GlobalClearExtraGuiScreenKeys(), GlobalClearExtraGuiScreenKeys(), GlobalDisplayNameForCommodity(), GlobalDisplayNameForCommodity(), GlobalExpandDescription(), GlobalExpandDescription(), GlobalExpandMissionText(), GlobalExpandMissionText(), GlobalGetGuiColorSettingForKey(), GlobalGetGuiColorSettingForKey(), GlobalGetScreenBackgroundForKey(), GlobalGetScreenBackgroundForKey(), GlobalKeyBindingDescription(), GlobalKeyBindingDescription(), GlobalLog(), GlobalLog(), GlobalSetExtraGuiScreenKeys(), GlobalSetExtraGuiScreenKeys(), GlobalSetGuiColorSettingForKey(), GlobalSetGuiColorSettingForKey(), GlobalSetScreenBackgroundForKey(), GlobalSetScreenBackgroundForKey(), OOJSTimer::initWithDelay:interval:context:function:this:, OOJSFunction::initWithFunction:context:, JSStringConverter(), JSStringConverter(), JSValueToEquipmentType(), JSValueToEquipmentType(), ManifestComment(), ManifestComment(), ManifestSetComment(), ManifestSetComment(), ManifestSetShortComment(), ManifestSetShortComment(), ManifestShortComment(), ManifestShortComment(), MissionAddMessageText(), MissionAddMessageText(), MissionRunScreen(), MissionRunScreen(), MissionSetInstructionsInternal(), MissionSetInstructionsInternal(), MissionVariablesSetProperty(), NameForPropertyID(), NameForPropertyID(), OOJSClassNameOfValue(), OOJSNativeObjectFromJSValue(), OOJSNativeObjectFromJSValue(), OOJSObjectGetterImplPRIVATE(), OOJSObjectGetterImplPRIVATE(), OOJSReportPendingException(), OOJSUnconstructableConstruct(), OoliteSetProperty(), OoliteSetProperty(), OOStringFromDeciCredits(), OOStringFromJSID(), PlanetSetProperty(), PlanetSetProperty(), PlayerAddMessageToArrivalReport(), PlayerAddMessageToArrivalReport(), PlayerAudioMessage(), PlayerAudioMessage(), PlayerCommsMessage(), PlayerCommsMessage(), PlayerConsoleMessage(), PlayerConsoleMessage(), PlayerEndScenario(), PlayerEndScenario(), PlayerReplaceShip(), PlayerReplaceShip(), PlayerSetPlayerRole(), PlayerSetPlayerRole(), PlayerSetProperty(), PlayerSetProperty(), PlayerShipAddParcel(), PlayerShipAddParcel(), PlayerShipAddPassenger(), PlayerShipAddPassenger(), PlayerShipAwardContract(), PlayerShipAwardContract(), PlayerShipHideHUDSelector(), PlayerShipHideHUDSelector(), PlayerShipRemoveContract(), PlayerShipRemoveContract(), PlayerShipRemoveParcel(), PlayerShipRemoveParcel(), PlayerShipRemovePassenger(), PlayerShipRemovePassenger(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomHUDDial(), PlayerShipSetCustomView(), PlayerShipSetCustomView(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionDisplay(), PlayerShipSetMultiFunctionText(), PlayerShipSetMultiFunctionText(), PlayerShipSetPrimedEquipment(), PlayerShipSetPrimedEquipment(), PlayerShipSetProperty(), PlayerShipSetProperty(), PlayerShipShowHUDSelector(), PlayerShipShowHUDSelector(), PlayerShipUseSpecialCargo(), PlayerShipUseSpecialCargo(), RewriteLegacyConst(), ScriptNameForPropertyID(), SetMissionVariable(), ShipAdjustCargo(), ShipAdjustCargo(), ShipCanAwardEquipment(), ShipCanAwardEquipment(), ShipCommsMessage(), ShipCommsMessage(), ShipDumpCargo(), ShipDumpCargo(), ShipEjectItem(), ShipEjectItem(), ShipEjectSpecificItem(), ShipEjectSpecificItem(), ShipExitAI(), ShipExitAI(), ShipGroupConstruct(), ShipGroupConstruct(), ShipHasEquipmentProviding(), ShipHasEquipmentProviding(), ShipHasRole(), ShipHasRole(), ShipReactToAIMessage(), ShipReactToAIMessage(), ShipSendAIMessage(), ShipSendAIMessage(), ShipSetAI(), ShipSetAI(), ShipSetBounty(), ShipSetBounty(), ShipSetCargo(), ShipSetCargo(), ShipSetCargoType(), ShipSetCargoType(), ShipSetEquipmentStatus(), ShipSetEquipmentStatus(), ShipSetProperty(), ShipSetProperty(), ShipSetScript(), ShipSetScript(), ShipSpawn(), ShipSpawn(), ShipStaticKeysForRole(), ShipStaticKeysForRole(), ShipStaticRoleIsInCategory(), ShipStaticRoleIsInCategory(), ShipStaticSetShipDataForKey(), ShipStaticSetShipDataForKey(), ShipStaticShipDataForKey(), ShipStaticShipDataForKey(), ShipSwitchAI(), ShipSwitchAI(), SoundFromJSValue(), SoundFromJSValue(), SoundStaticLoad(), SoundStaticLoad(), SoundStaticPlayMusic(), SoundStaticPlayMusic(), SoundStaticStopMusic(), SoundStaticStopMusic(), SpecialJSWarning(), SpecialJSWarning(), StackOfValue(), StationLaunchShipWithRole(), StationLaunchShipWithRole(), StationSetInterface(), StationSetInterface(), StationSetMarketPrice(), StationSetMarketPrice(), StationSetMarketQuantity(), StationSetMarketQuantity(), StationSetProperty(), StationSetProperty(), OOJSScript(Private)::stringPropertyNamed:inContext:, SystemAddMoon(), SystemAddMoon(), SystemAddPlanet(), SystemAddPlanet(), SystemAddShipsOrGroup(), SystemAddShipsOrGroup(), SystemAddShipsOrGroupToRoute(), SystemAddShipsOrGroupToRoute(), SystemAddVisualEffect(), SystemAddVisualEffect(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithPrimaryRole(), SystemCountShipsWithRole(), SystemCountShipsWithRole(), SystemInfoKeyForAtom(), SystemInfoRouteToSystem(), SystemInfoRouteToSystem(), SystemInfoSamplePrice(), SystemInfoSamplePrice(), SystemInfoSetPropertyMethod(), SystemInfoSetPropertyMethod(), SystemInfoStaticSetInterstellarProperty(), SystemInfoStaticSetInterstellarProperty(), SystemLegacyAddShips(), SystemLegacyAddShips(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAt(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsAtPrecisely(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddShipsWithinRadius(), SystemLegacyAddSystemShips(), SystemLegacyAddSystemShips(), SystemLegacySpawnShip(), SystemLegacySpawnShip(), SystemLocationFromCode(), SystemLocationFromCode(), SystemSetPopulator(), SystemSetPopulator(), SystemSetProperty(), SystemSetProperty(), SystemSetWaypoint(), SystemSetWaypoint(), SystemShipsWithPrimaryRole(), SystemShipsWithPrimaryRole(), SystemShipsWithRole(), SystemShipsWithRole(), SystemStaticSystemIDForName(), SystemStaticSystemIDForName(), GuiDisplayGen::textureDescriptorFromJSValue:inContext:callerDescription:, VectorFromCoordinateSystem(), VectorFromCoordinateSystem(), VectorToCoordinateSystem(), VectorToCoordinateSystem(), VisualEffectSetProperty(), VisualEffectSetProperty(), WaypointSetProperty(), and WaypointSetProperty().

Here is the call graph for this function:

◆ OOStringFromJSValueEvenIfNull()

NSString * OOStringFromJSValueEvenIfNull ( JSContext * context,
jsval value )

Definition at line 1449 of file OOJavaScriptEngine.m.

1450{
1452
1453 NSCParameterAssert(context != NULL && JS_IsInRequest(context));
1454
1455 JSString* string = JS_ValueToString(context, value); // Calls the value's toString method if needed.
1456 return OOStringFromJSString(context, string);
1457
1459}

References JS_IsInRequest, OOJS_PROFILE_ENTER, OOJS_PROFILE_EXIT, and OOStringFromJSString().

Referenced by CallForString(), NSString(OOJavaScriptExtensions)::concatenationOfStringsFromJavaScriptValues:count:separator:inContext:, DescribeValue(), DescribeValue(), GlobalLog(), GlobalLog(), MissionSetInstructionsInternal(), MissionSetInstructionsInternal(), OOJSDictionaryFromStringTable(), OOJSDictionaryFromStringTable(), OOJSReportPendingException(), OOJSValueToInt32(), OOStringFromJSValue(), OOStringFromJSValue(), ShipSetMaterialsInternal(), ShipSetMaterialsInternal(), ShipSetShaders(), ShipSetShaders(), VisualEffectSetMaterialsInternal(), VisualEffectSetMaterialsInternal(), VisualEffectSetShaders(), and VisualEffectSetShaders().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ kOOJavaScriptEngineDidResetNotification

NSString* const kOOJavaScriptEngineDidResetNotification
extern

Definition at line 97 of file OOJavaScriptEngine.m.

◆ kOOJavaScriptEngineWillResetNotification

NSString* const kOOJavaScriptEngineWillResetNotification
extern

Definition at line 96 of file OOJavaScriptEngine.m.