This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
@interface ChakraProxy : NSObject | |
-(void)run; | |
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)runJSVMThread { | |
[[[ChakraProxy alloc] init] run]; | |
NSRunLoop *runloop = [NSRunLoop currentRunLoop]; | |
while (true) { | |
[runloop runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification { | |
_jsvmThread = [[NSThread alloc] initWithTarget:self | |
selector:@selector(runJSVMThread) | |
object:nil]; | |
[_jsvmThread start]; | |
} |
NewerOlder