From e3f45676d614902d3643fbe847d479368ce77df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=8A=B2=E9=B9=8F?= Date: Fri, 7 Jan 2022 17:21:41 +0800 Subject: [PATCH] add interface to provide jse --- doric-iOS/Pod/Classes/DoricNativeDriver.h | 3 +++ doric-iOS/Pod/Classes/DoricNativeDriver.m | 1 - doric-iOS/Pod/Classes/Engine/DoricJSCoreExecutor.h | 2 ++ doric-iOS/Pod/Classes/Engine/DoricJSCoreExecutor.m | 2 -- doric-iOS/Pod/Classes/Engine/DoricJSEngine.h | 1 + doric-iOS/Pod/Classes/Engine/DoricJSEngine.m | 1 - 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/doric-iOS/Pod/Classes/DoricNativeDriver.h b/doric-iOS/Pod/Classes/DoricNativeDriver.h index 58a0506e..59a823d8 100644 --- a/doric-iOS/Pod/Classes/DoricNativeDriver.h +++ b/doric-iOS/Pod/Classes/DoricNativeDriver.h @@ -33,6 +33,9 @@ NS_ASSUME_NONNULL_BEGIN @interface DoricNativeDriver : NSObject + (instancetype)instance DEPRECATED_MSG_ATTRIBUTE("Do not use this api");; + +@property(nonatomic, strong) DoricJSEngine *jsExecutor; + @end NS_ASSUME_NONNULL_END diff --git a/doric-iOS/Pod/Classes/DoricNativeDriver.m b/doric-iOS/Pod/Classes/DoricNativeDriver.m index 7e5e37e1..6876a6b4 100644 --- a/doric-iOS/Pod/Classes/DoricNativeDriver.m +++ b/doric-iOS/Pod/Classes/DoricNativeDriver.m @@ -28,7 +28,6 @@ #import "DoricSingleton.h" @interface DoricNativeDriver () -@property(nonatomic, strong) DoricJSEngine *jsExecutor; @end @implementation DoricNativeDriver diff --git a/doric-iOS/Pod/Classes/Engine/DoricJSCoreExecutor.h b/doric-iOS/Pod/Classes/Engine/DoricJSCoreExecutor.h index 0718eb3e..ba7296f9 100644 --- a/doric-iOS/Pod/Classes/Engine/DoricJSCoreExecutor.h +++ b/doric-iOS/Pod/Classes/Engine/DoricJSCoreExecutor.h @@ -27,6 +27,8 @@ NS_ASSUME_NONNULL_BEGIN @interface DoricJSCoreExecutor : NSObject +@property(nonatomic, strong) JSContext *jsContext; + @end NS_ASSUME_NONNULL_END diff --git a/doric-iOS/Pod/Classes/Engine/DoricJSCoreExecutor.m b/doric-iOS/Pod/Classes/Engine/DoricJSCoreExecutor.m index 60b88624..a67cb4e7 100644 --- a/doric-iOS/Pod/Classes/Engine/DoricJSCoreExecutor.m +++ b/doric-iOS/Pod/Classes/Engine/DoricJSCoreExecutor.m @@ -30,8 +30,6 @@ void ReleaseArrayBufferData(void *bytes, void *deallocatorContext) { @interface DoricJSCoreExecutor () -@property(nonatomic, strong) JSContext *jsContext; - @end @implementation DoricJSCoreExecutor diff --git a/doric-iOS/Pod/Classes/Engine/DoricJSEngine.h b/doric-iOS/Pod/Classes/Engine/DoricJSEngine.h index 4bf3f8ae..f6c8ad5e 100644 --- a/doric-iOS/Pod/Classes/Engine/DoricJSEngine.h +++ b/doric-iOS/Pod/Classes/Engine/DoricJSEngine.h @@ -32,6 +32,7 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic, strong) id jsExecutor; +@property(nonatomic, strong) NSThread *jsThread; @property(nonatomic, strong) DoricRegistry *registry; diff --git a/doric-iOS/Pod/Classes/Engine/DoricJSEngine.m b/doric-iOS/Pod/Classes/Engine/DoricJSEngine.m index 9723bf65..d581071d 100644 --- a/doric-iOS/Pod/Classes/Engine/DoricJSEngine.m +++ b/doric-iOS/Pod/Classes/Engine/DoricJSEngine.m @@ -47,7 +47,6 @@ @interface DoricJSEngine () @property(nonatomic, strong) NSMutableDictionary *timers; @property(nonatomic, strong) DoricBridgeExtension *bridgeExtension; @property(nonatomic, strong) NSMutableDictionary *environmentDictionary; -@property(nonatomic, strong) NSThread *jsThread; @property(nonatomic, assign) BOOL destroyed; @property(nonatomic, assign) BOOL initialized; @property(nonatomic, strong) DoricPerformanceProfile *profile;