2015-03-23 20:28:42 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
*/
|
2015-02-20 04:10:52 +00:00
|
|
|
|
|
|
|
#import <JavaScriptCore/JavaScriptCore.h>
|
|
|
|
|
2015-04-23 15:04:16 +00:00
|
|
|
#import "RCTJavaScriptExecutor.h"
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2016-02-12 11:49:51 +00:00
|
|
|
/**
|
|
|
|
* Default name for the JS thread
|
|
|
|
*/
|
|
|
|
RCT_EXTERN NSString *const RCTJSCThreadName;
|
|
|
|
|
2016-02-15 20:57:21 +00:00
|
|
|
/**
|
|
|
|
* This notification fires on the JS thread immediately after a `JSContext`
|
|
|
|
* is fully initialized, but before the JS bundle has been loaded. The object
|
|
|
|
* of this notification is the `JSContext`. Native modules should listen for
|
|
|
|
* notification only if they need to install custom functionality into the
|
|
|
|
* context. Note that this notification won't fire when debugging in Chrome.
|
|
|
|
*/
|
|
|
|
RCT_EXTERN NSString *const RCTJavaScriptContextCreatedNotification;
|
|
|
|
|
2016-04-28 20:41:55 +00:00
|
|
|
/**
|
|
|
|
* Create a NSError from a JSError object.
|
|
|
|
*
|
|
|
|
* If available, the error's userInfo property will contain the JS stacktrace under
|
|
|
|
* the RCTJSStackTraceKey key.
|
|
|
|
*/
|
|
|
|
RCT_EXTERN NSError *RCTNSErrorFromJSError(JSContextRef context, JSValueRef jsError);
|
|
|
|
|
2015-02-20 04:10:52 +00:00
|
|
|
/**
|
|
|
|
* Uses a JavaScriptCore context as the execution engine.
|
|
|
|
*/
|
2015-12-16 10:49:27 +00:00
|
|
|
@interface RCTJSCExecutor : NSObject <RCTJavaScriptExecutor>
|
2015-02-20 04:10:52 +00:00
|
|
|
|
|
|
|
@end
|