JSContextInternal.h [plain text]
#ifndef JSContextInternal_h
#define JSContextInternal_h
#import <JavaScriptCore/JavaScriptCore.h>
#if JSC_OBJC_API_ENABLED
#import <JavaScriptCore/JSContext.h>
struct CallbackData {
CallbackData *next;
JSContext *context;
JSValue *preservedException;
JSValueRef calleeValue;
JSValueRef thisValue;
size_t argumentCount;
const JSValueRef *arguments;
NSArray *currentArguments;
};
class WeakContextRef {
public:
WeakContextRef(JSContext * = nil);
~WeakContextRef();
JSContext * get();
void set(JSContext *);
private:
JSContext *m_weakContext;
};
@class JSWrapperMap;
@interface JSContext(Internal)
- (id)initWithGlobalContextRef:(JSGlobalContextRef)context;
- (void)notifyException:(JSValueRef)exception;
- (JSValue *)valueFromNotifyException:(JSValueRef)exception;
- (BOOL)boolFromNotifyException:(JSValueRef)exception;
- (void)beginCallbackWithData:(CallbackData *)callbackData calleeValue:(JSValueRef)calleeValue thisValue:(JSValueRef)thisValue argumentCount:(size_t)argumentCount arguments:(const JSValueRef *)arguments;
- (void)endCallbackWithData:(CallbackData *)callbackData;
- (JSValue *)wrapperForObjCObject:(id)object;
- (JSValue *)wrapperForJSObject:(JSValueRef)value;
@property (readonly, retain) JSWrapperMap *wrapperMap;
@end
#endif
#endif // JSContextInternal_h