#include <OOJavaScriptEngine.h>
Definition at line 262 of file OOJavaScriptEngine.h.
◆ dealloc
◆ deleteJSValue
Definition at line 622 of file OOJavaScriptEngine.m.
1513{
1514 if (!JSVAL_IS_VOID(
_val))
1515 {
1517 JS_RemoveValueRoot(context, &
_val);
1519
1521 [[NSNotificationCenter defaultCenter] removeObserver:self
1522 name:kOOJavaScriptEngineWillResetNotification
1524 }
1525}
OOINLINE JSContext * OOJSAcquireContext(void)
OOINLINE void OOJSRelinquishContext(JSContext *context)
OOJavaScriptEngine * sharedEngine()
◆ initWithJSObject:inContext:
- (id) initWithJSObject: |
|
(JSObject *) | object |
inContext: |
|
(JSContext *) | context |
Definition at line 622 of file OOJavaScriptEngine.m.
1506 :(JSObject *)object inContext:(JSContext *)context
1507{
1508 return [self initWithJSValue:OBJECT_TO_JSVAL(object) inContext:context];
1509}
◆ initWithJSValue:inContext:
- (id) initWithJSValue: |
|
(jsval) | value |
inContext: |
|
(JSContext *) | context |
Definition at line 622 of file OOJavaScriptEngine.m.
1473 :(jsval)value inContext:(JSContext *)context
1474{
1476
1477 self = [super init];
1479 {
1480 BOOL tempCtxt = NO;
1481 if (context == NULL)
1482 {
1484 tempCtxt = YES;
1485 }
1486
1488 if (!JSVAL_IS_VOID(
_val))
1489 {
1490 JS_AddNamedValueRoot(context, &
_val,
"OOJSValue");
1491
1492 [[NSNotificationCenter defaultCenter] addObserver:self
1493 selector:@selector(deleteJSValue)
1494 name:kOOJavaScriptEngineWillResetNotification
1496 }
1497
1499 }
1500 return self;
1501
1503}
#define OOJS_PROFILE_EXIT
#define OOJS_PROFILE_ENTER
◆ oo_jsValueInContext:
- (jsval) oo_jsValueInContext: |
|
(JSContext *) | context |
|
|
implementation |
◆ valueWithJSObject:inContext:
+ (id) valueWithJSObject: |
|
(JSObject *) | object |
inContext: |
|
(JSContext *) | context |
◆ valueWithJSValue:inContext:
+ (id) valueWithJSValue: |
|
(jsval) | value |
inContext: |
|
(JSContext *) | context |
Definition at line 622 of file OOJavaScriptEngine.m.
1453 :(jsval)value inContext:(JSContext *)context
1454{
1456
1457 return [[[self alloc] initWithJSValue:value inContext:context] autorelease];
1458
1460}
◆ _val
The documentation for this class was generated from the following files: