Oolite 1.91.0.7645-241119-222d325
Loading...
Searching...
No Matches
OOJSPropID.h File Reference
#include <jsapi.h>
import "OOFunctionAttributes.h"
+ Include dependency graph for OOJSPropID.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define OOJSID(str)
 

Functions

void OOJSInitJSIDCachePRIVATE (const char *name, jsid *idCache)
 

Macro Definition Documentation

◆ OOJSID

#define OOJSID ( str)
Value:
({ static jsid idCache = JSID_VOID; if (EXPECT_NOT(idCache == JSID_VOID)) OOJSInitJSIDCachePRIVATE(""str, &idCache); idCache; })
#define EXPECT_NOT(x)
void OOJSInitJSIDCachePRIVATE(const char *name, jsid *idCache)

Definition at line 38 of file OOJSPropID.h.

Referenced by OOStringFromDeciCredits().

Function Documentation

◆ OOJSInitJSIDCachePRIVATE()

void OOJSInitJSIDCachePRIVATE ( const char * name,
jsid * idCache )

Definition at line 925 of file OOJavaScriptEngine.m.

926{
927 NSCParameterAssert(name != NULL && name[0] != '\0' && idCache != NULL);
928
929 JSContext *context = OOJSAcquireContext();
930
931 JSString *string = JS_InternString(context, name);
932 if (EXPECT_NOT(string == NULL))
933 {
934 [NSException raise:NSGenericException format:@"Failed to initialize JS ID cache for \"%s\".", name];
935 }
936
937 *idCache = INTERNED_STRING_TO_JSID(string);
938
939 OOJSRelinquishContext(context);
940}
OOINLINE JSContext * OOJSAcquireContext(void)
OOINLINE void OOJSRelinquishContext(JSContext *context)

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

+ Here is the call graph for this function: