react-native 0.68.2 → 0.68.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTUtils.h +2 -0
- package/React/Base/RCTUtils.m +5 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTDeviceInfo.mm +29 -11
- package/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm +8 -2
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/JSInterpreter.java +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManagerBuilder.java +50 -30
- package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +15 -5
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/Android.mk +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/turbomodule/core/jni/Android.mk +1 -1
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNIVanilla.cpp +2 -2
- package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YogaJniException.cpp +1 -1
- package/ReactAndroid/src/main/jni/react/jni/Android.mk +0 -60
- package/ReactAndroid/src/main/jni/react/jni/NativeTime.cpp +8 -2
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/components/progressbar/Android.mk +1 -1
- package/ReactCommon/react/renderer/components/slider/Android.mk +1 -1
- package/ReactCommon/react/renderer/components/switch/Android.mk +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/Android.mk +1 -1
- package/android/com/facebook/react/react-native/{0.68.2/react-native-0.68.2-sources.jar → 0.68.4/react-native-0.68.4-sources.jar} +0 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4-sources.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4-sources.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4-sources.jar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4-sources.jar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.68.2/react-native-0.68.2.aar → 0.68.4/react-native-0.68.4.aar} +0 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.aar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.aar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.aar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.aar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.68.2/react-native-0.68.2.module → 0.68.4/react-native-0.68.4.module} +15 -15
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.module.md5 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.module.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.module.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.module.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.68.2/react-native-0.68.2.pom → 0.68.4/react-native-0.68.4.pom} +1 -1
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.pom.md5 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.pom.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.pom.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.68.4/react-native-0.68.4.pom.sha512 +1 -0
- package/android/com/facebook/react/react-native/maven-metadata.xml +4 -4
- package/android/com/facebook/react/react-native/maven-metadata.xml.md5 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha1 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha256 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha512 +1 -1
- package/package.json +3 -3
- package/template/Gemfile.lock +9 -9
- package/template/package.json +1 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2-sources.jar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2-sources.jar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2-sources.jar.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2-sources.jar.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.aar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.aar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.aar.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.aar.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.module.md5 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.module.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.module.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.module.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.pom.md5 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.pom.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.pom.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2.pom.sha512 +0 -1
package/React/Base/RCTUtils.h
CHANGED
package/React/Base/RCTUtils.m
CHANGED
package/React/Base/RCTVersion.m
CHANGED
|
@@ -26,6 +26,7 @@ using namespace facebook::react;
|
|
|
26
26
|
@implementation RCTDeviceInfo {
|
|
27
27
|
UIInterfaceOrientation _currentInterfaceOrientation;
|
|
28
28
|
NSDictionary *_currentInterfaceDimensions;
|
|
29
|
+
BOOL _isFullscreen;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
32
|
@synthesize moduleRegistry = _moduleRegistry;
|
|
@@ -59,7 +60,7 @@ RCT_EXPORT_MODULE()
|
|
|
59
60
|
_currentInterfaceDimensions = RCTExportedDimensions(_moduleRegistry);
|
|
60
61
|
|
|
61
62
|
[[NSNotificationCenter defaultCenter] addObserver:self
|
|
62
|
-
selector:@selector(
|
|
63
|
+
selector:@selector(interfaceOrientationDidChange)
|
|
63
64
|
name:UIApplicationDidBecomeActiveNotification
|
|
64
65
|
object:nil];
|
|
65
66
|
|
|
@@ -168,21 +169,36 @@ static NSDictionary *RCTExportedDimensions(RCTModuleRegistry *moduleRegistry)
|
|
|
168
169
|
|
|
169
170
|
- (void)_interfaceOrientationDidChange
|
|
170
171
|
{
|
|
171
|
-
|
|
172
|
+
UIApplication *application = RCTSharedApplication();
|
|
173
|
+
UIInterfaceOrientation nextOrientation = [application statusBarOrientation];
|
|
174
|
+
|
|
175
|
+
BOOL isRunningInFullScreen =
|
|
176
|
+
CGRectEqualToRect(application.delegate.window.frame, application.delegate.window.screen.bounds);
|
|
177
|
+
// We are catching here two situations for multitasking view:
|
|
178
|
+
// a) The app is in Split View and the container gets resized -> !isRunningInFullScreen
|
|
179
|
+
// b) The app changes to/from fullscreen example: App runs in slide over mode and goes into fullscreen->
|
|
180
|
+
// isRunningInFullScreen != _isFullscreen The above two cases a || b can be shortened to !isRunningInFullScreen ||
|
|
181
|
+
// !_isFullscreen;
|
|
182
|
+
BOOL isResizingOrChangingToFullscreen = !isRunningInFullScreen || !_isFullscreen;
|
|
183
|
+
BOOL isOrientationChanging = (UIInterfaceOrientationIsPortrait(_currentInterfaceOrientation) &&
|
|
184
|
+
!UIInterfaceOrientationIsPortrait(nextOrientation)) ||
|
|
185
|
+
(UIInterfaceOrientationIsLandscape(_currentInterfaceOrientation) &&
|
|
186
|
+
!UIInterfaceOrientationIsLandscape(nextOrientation));
|
|
172
187
|
|
|
173
188
|
// Update when we go from portrait to landscape, or landscape to portrait
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
(UIInterfaceOrientationIsLandscape(_currentInterfaceOrientation) &&
|
|
177
|
-
!UIInterfaceOrientationIsLandscape(nextOrientation))) {
|
|
189
|
+
// Also update when the fullscreen state changes (multitasking) and only when the app is in active state.
|
|
190
|
+
if ((isOrientationChanging || isResizingOrChangingToFullscreen) && RCTIsAppActive()) {
|
|
178
191
|
#pragma clang diagnostic push
|
|
179
192
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
180
193
|
[[_moduleRegistry moduleForName:"EventDispatcher"] sendDeviceEventWithName:@"didUpdateDimensions"
|
|
181
194
|
body:RCTExportedDimensions(_moduleRegistry)];
|
|
195
|
+
|
|
196
|
+
// We only want to track the current _currentInterfaceOrientation and _isFullscreen only
|
|
197
|
+
// when it happens and only when it is published.
|
|
198
|
+
_currentInterfaceOrientation = nextOrientation;
|
|
199
|
+
_isFullscreen = isRunningInFullScreen;
|
|
182
200
|
#pragma clang diagnostic pop
|
|
183
201
|
}
|
|
184
|
-
|
|
185
|
-
_currentInterfaceOrientation = nextOrientation;
|
|
186
202
|
}
|
|
187
203
|
|
|
188
204
|
- (void)interfaceFrameDidChange
|
|
@@ -197,15 +213,17 @@ static NSDictionary *RCTExportedDimensions(RCTModuleRegistry *moduleRegistry)
|
|
|
197
213
|
{
|
|
198
214
|
NSDictionary *nextInterfaceDimensions = RCTExportedDimensions(_moduleRegistry);
|
|
199
215
|
|
|
200
|
-
|
|
216
|
+
// update and publish the even only when the app is in active state
|
|
217
|
+
if (!([nextInterfaceDimensions isEqual:_currentInterfaceDimensions]) && RCTIsAppActive()) {
|
|
201
218
|
#pragma clang diagnostic push
|
|
202
219
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
203
220
|
[[_moduleRegistry moduleForName:"EventDispatcher"] sendDeviceEventWithName:@"didUpdateDimensions"
|
|
204
221
|
body:nextInterfaceDimensions];
|
|
222
|
+
// We only want to track the current _currentInterfaceOrientation only
|
|
223
|
+
// when it happens and only when it is published.
|
|
224
|
+
_currentInterfaceDimensions = nextInterfaceDimensions;
|
|
205
225
|
#pragma clang diagnostic pop
|
|
206
226
|
}
|
|
207
|
-
|
|
208
|
-
_currentInterfaceDimensions = nextInterfaceDimensions;
|
|
209
227
|
}
|
|
210
228
|
|
|
211
229
|
- (std::shared_ptr<TurboModule>)getTurboModule:(const ObjCTurboModule::InitParams &)params
|
|
@@ -22,8 +22,14 @@ JSIExecutor::RuntimeInstaller RCTJSIExecutorRuntimeInstaller(JSIExecutor::Runtim
|
|
|
22
22
|
bindNativeLogger(runtime, iosLoggingBinder);
|
|
23
23
|
|
|
24
24
|
PerformanceNow iosPerformanceNowBinder = []() {
|
|
25
|
-
auto time = std::chrono::
|
|
26
|
-
|
|
25
|
+
auto time = std::chrono::steady_clock::now();
|
|
26
|
+
auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(
|
|
27
|
+
time.time_since_epoch())
|
|
28
|
+
.count();
|
|
29
|
+
|
|
30
|
+
constexpr double NANOSECONDS_IN_MILLISECOND = 1000000.0;
|
|
31
|
+
|
|
32
|
+
return duration / NANOSECONDS_IN_MILLISECOND;
|
|
27
33
|
};
|
|
28
34
|
bindNativePerformanceNow(runtime, iosPerformanceNowBinder);
|
|
29
35
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
package com.facebook.react;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An enum that specifies the JS Engine to be used in the app Old Logic uses the legacy code
|
|
12
|
+
* JSC/HERMES loads the respective engine using the revamped logic
|
|
13
|
+
*/
|
|
14
|
+
public enum JSInterpreter {
|
|
15
|
+
OLD_LOGIC,
|
|
16
|
+
JSC,
|
|
17
|
+
HERMES
|
|
18
|
+
}
|
|
@@ -66,6 +66,7 @@ public class ReactInstanceManagerBuilder {
|
|
|
66
66
|
private @Nullable Map<String, RequestHandler> mCustomPackagerCommandHandlers;
|
|
67
67
|
private @Nullable ReactPackageTurboModuleManagerDelegate.Builder mTMMDelegateBuilder;
|
|
68
68
|
private @Nullable SurfaceDelegateFactory mSurfaceDelegateFactory;
|
|
69
|
+
private JSInterpreter jsInterpreter = JSInterpreter.OLD_LOGIC;
|
|
69
70
|
|
|
70
71
|
/* package protected */ ReactInstanceManagerBuilder() {}
|
|
71
72
|
|
|
@@ -125,6 +126,31 @@ public class ReactInstanceManagerBuilder {
|
|
|
125
126
|
return this;
|
|
126
127
|
}
|
|
127
128
|
|
|
129
|
+
/**
|
|
130
|
+
* Sets the jsEngine as JSC or HERMES as per the setJsEngineAsHermes call Uses the enum {@link
|
|
131
|
+
* JSInterpreter}
|
|
132
|
+
*
|
|
133
|
+
* @param jsInterpreter
|
|
134
|
+
*/
|
|
135
|
+
private void setJSEngine(JSInterpreter jsInterpreter) {
|
|
136
|
+
this.jsInterpreter = jsInterpreter;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Utility setter to set the required JSEngine as HERMES or JSC Defaults to OLD_LOGIC if not
|
|
141
|
+
* called by the host app
|
|
142
|
+
*
|
|
143
|
+
* @param hermesEnabled hermesEnabled = true sets the JS Engine as HERMES and JSC otherwise
|
|
144
|
+
*/
|
|
145
|
+
public ReactInstanceManagerBuilder setJsEngineAsHermes(boolean hermesEnabled) {
|
|
146
|
+
if (hermesEnabled) {
|
|
147
|
+
setJSEngine(JSInterpreter.HERMES);
|
|
148
|
+
} else {
|
|
149
|
+
setJSEngine(JSInterpreter.JSC);
|
|
150
|
+
}
|
|
151
|
+
return this;
|
|
152
|
+
}
|
|
153
|
+
|
|
128
154
|
/**
|
|
129
155
|
* Path to your app's main module on Metro. This is used when reloading JS during development. All
|
|
130
156
|
* paths are relative to the root folder the packager is serving files from. Examples: {@code
|
|
@@ -345,41 +371,35 @@ public class ReactInstanceManagerBuilder {
|
|
|
345
371
|
|
|
346
372
|
private JavaScriptExecutorFactory getDefaultJSExecutorFactory(
|
|
347
373
|
String appName, String deviceName, Context applicationContext) {
|
|
348
|
-
try {
|
|
349
|
-
// If JSC is included, use it as normal
|
|
350
|
-
initializeSoLoaderIfNecessary(applicationContext);
|
|
351
|
-
JSCExecutor.loadLibrary();
|
|
352
|
-
return new JSCExecutorFactory(appName, deviceName);
|
|
353
|
-
} catch (UnsatisfiedLinkError jscE) {
|
|
354
|
-
// https://github.com/facebook/hermes/issues/78 shows that
|
|
355
|
-
// people who aren't trying to use Hermes are having issues.
|
|
356
|
-
// https://github.com/facebook/react-native/issues/25923#issuecomment-554295179
|
|
357
|
-
// includes the actual JSC error in at least one case.
|
|
358
|
-
//
|
|
359
|
-
// So, if "__cxa_bad_typeid" shows up in the jscE exception
|
|
360
|
-
// message, then we will assume that's the failure and just
|
|
361
|
-
// throw now.
|
|
362
|
-
|
|
363
|
-
if (jscE.getMessage().contains("__cxa_bad_typeid")) {
|
|
364
|
-
throw jscE;
|
|
365
|
-
}
|
|
366
374
|
|
|
367
|
-
|
|
375
|
+
// Relying solely on try catch block and loading jsc even when
|
|
376
|
+
// project is using hermes can lead to launch-time crashes especially in
|
|
377
|
+
// monorepo architectures and hybrid apps using both native android
|
|
378
|
+
// and react native.
|
|
379
|
+
// So we can use the value of enableHermes received by the constructor
|
|
380
|
+
// to decide which library to load at launch
|
|
381
|
+
|
|
382
|
+
// if nothing is specified, use old loading method
|
|
383
|
+
// else load the required engine
|
|
384
|
+
if (jsInterpreter == JSInterpreter.OLD_LOGIC) {
|
|
368
385
|
try {
|
|
386
|
+
// If JSC is included, use it as normal
|
|
387
|
+
initializeSoLoaderIfNecessary(applicationContext);
|
|
388
|
+
JSCExecutor.loadLibrary();
|
|
389
|
+
return new JSCExecutorFactory(appName, deviceName);
|
|
390
|
+
} catch (UnsatisfiedLinkError jscE) {
|
|
391
|
+
if (jscE.getMessage().contains("__cxa_bad_typeid")) {
|
|
392
|
+
throw jscE;
|
|
393
|
+
}
|
|
369
394
|
HermesExecutor.loadLibrary();
|
|
370
395
|
return new HermesExecutorFactory();
|
|
371
|
-
} catch (UnsatisfiedLinkError hermesE) {
|
|
372
|
-
// If we get here, either this is a JSC build, and of course
|
|
373
|
-
// Hermes failed (since it's not in the APK), or it's a Hermes
|
|
374
|
-
// build, and Hermes had a problem.
|
|
375
|
-
|
|
376
|
-
// We suspect this is a JSC issue (it's the default), so we
|
|
377
|
-
// will throw that exception, but we will print hermesE first,
|
|
378
|
-
// since it could be a Hermes issue and we don't want to
|
|
379
|
-
// swallow that.
|
|
380
|
-
hermesE.printStackTrace();
|
|
381
|
-
throw jscE;
|
|
382
396
|
}
|
|
397
|
+
} else if (jsInterpreter == JSInterpreter.HERMES) {
|
|
398
|
+
HermesExecutor.loadLibrary();
|
|
399
|
+
return new HermesExecutorFactory();
|
|
400
|
+
} else {
|
|
401
|
+
JSCExecutor.loadLibrary();
|
|
402
|
+
return new JSCExecutorFactory(appName, deviceName);
|
|
383
403
|
}
|
|
384
404
|
}
|
|
385
405
|
}
|
|
@@ -719,12 +719,22 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
|
|
|
719
719
|
|
|
720
720
|
// React Native requires that the RootView id be managed entirely by React Native, and will
|
|
721
721
|
// crash in addRootView/startSurface if the native View id isn't set to NO_ID.
|
|
722
|
+
|
|
723
|
+
// This behavior can not be guaranteed in hybrid apps that have a native android layer over
|
|
724
|
+
// which reactRootViews are added and the native views need to have ids on them in order to
|
|
725
|
+
// work.
|
|
726
|
+
// Hence this can cause unnecessary crashes at runtime for hybrid apps.
|
|
727
|
+
// So converting this to a soft exception such that pure react-native devs can still see the
|
|
728
|
+
// warning while hybrid apps continue to run without crashes
|
|
729
|
+
|
|
722
730
|
if (getId() != View.NO_ID) {
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
731
|
+
ReactSoftExceptionLogger.logSoftException(
|
|
732
|
+
TAG,
|
|
733
|
+
new IllegalViewOperationException(
|
|
734
|
+
"Trying to attach a ReactRootView with an explicit id already set to ["
|
|
735
|
+
+ getId()
|
|
736
|
+
+ "]. React Native uses the id field to track react tags and will overwrite this"
|
|
737
|
+
+ " field. If that is fine, explicitly overwrite the id field to View.NO_ID."));
|
|
728
738
|
}
|
|
729
739
|
|
|
730
740
|
try {
|
|
@@ -19,7 +19,7 @@ LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
|
|
|
19
19
|
|
|
20
20
|
LOCAL_CFLAGS += -fexceptions -frtti -std=c++17 -Wall
|
|
21
21
|
|
|
22
|
-
LOCAL_SHARED_LIBRARIES = libfb libfbjni
|
|
22
|
+
LOCAL_SHARED_LIBRARIES = libfb libfbjni libreactnativejni libruntimeexecutor
|
|
23
23
|
|
|
24
24
|
LOCAL_STATIC_LIBRARIES = libcallinvoker libreactperfloggerjni
|
|
25
25
|
|
|
@@ -147,7 +147,7 @@ static int YGJNILogFunc(
|
|
|
147
147
|
if (*jloggerPtr) {
|
|
148
148
|
JNIEnv* env = getCurrentEnv();
|
|
149
149
|
|
|
150
|
-
jclass cl = env->FindClass("
|
|
150
|
+
jclass cl = env->FindClass("com/facebook/yoga/YogaLogLevel");
|
|
151
151
|
static const jmethodID smethodId =
|
|
152
152
|
facebook::yoga::vanillajni::getStaticMethodId(
|
|
153
153
|
env, cl, "fromInt", "(I)Lcom/facebook/yoga/YogaLogLevel;");
|
|
@@ -386,7 +386,7 @@ static void jni_YGNodeCalculateLayoutJNI(
|
|
|
386
386
|
}
|
|
387
387
|
} catch (const std::logic_error& ex) {
|
|
388
388
|
env->ExceptionClear();
|
|
389
|
-
jclass cl = env->FindClass("
|
|
389
|
+
jclass cl = env->FindClass("java/lang/IllegalStateException");
|
|
390
390
|
static const jmethodID methodId = facebook::yoga::vanillajni::getMethodId(
|
|
391
391
|
env, cl, "<init>", "(Ljava/lang/String;)V");
|
|
392
392
|
auto throwable = env->NewObject(cl, methodId, env->NewStringUTF(ex.what()));
|
|
@@ -15,7 +15,7 @@ namespace yoga {
|
|
|
15
15
|
namespace vanillajni {
|
|
16
16
|
|
|
17
17
|
YogaJniException::YogaJniException() {
|
|
18
|
-
jclass cl = getCurrentEnv()->FindClass("
|
|
18
|
+
jclass cl = getCurrentEnv()->FindClass("java/lang/RuntimeException");
|
|
19
19
|
static const jmethodID methodId = facebook::yoga::vanillajni::getMethodId(
|
|
20
20
|
getCurrentEnv(), cl, "<init>", "()V");
|
|
21
21
|
auto throwable = getCurrentEnv()->NewObject(cl, methodId);
|
|
@@ -3,67 +3,8 @@
|
|
|
3
3
|
# This source code is licensed under the MIT license found in the
|
|
4
4
|
# LICENSE file in the root directory of this source tree.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
##########################
|
|
8
|
-
### React Native Utils ###
|
|
9
|
-
##########################
|
|
10
|
-
|
|
11
6
|
LOCAL_PATH := $(call my-dir)
|
|
12
7
|
|
|
13
|
-
include $(CLEAR_VARS)
|
|
14
|
-
|
|
15
|
-
# Include . in the header search path for all source files in this module.
|
|
16
|
-
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
|
17
|
-
|
|
18
|
-
# Include ./../../ in the header search path for modules that depend on
|
|
19
|
-
# reactnativejni. This will allow external modules to require this module's
|
|
20
|
-
# headers using #include <react/jni/<header>.h>, assuming:
|
|
21
|
-
# . == jni
|
|
22
|
-
# ./../ == react
|
|
23
|
-
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
|
|
24
|
-
|
|
25
|
-
LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
|
|
26
|
-
|
|
27
|
-
LOCAL_LDLIBS += -landroid
|
|
28
|
-
|
|
29
|
-
# The dynamic libraries (.so files) that this module depends on.
|
|
30
|
-
LOCAL_SHARED_LIBRARIES := \
|
|
31
|
-
libfb \
|
|
32
|
-
libfbjni \
|
|
33
|
-
libfolly_json \
|
|
34
|
-
libglog_init \
|
|
35
|
-
libreact_render_runtimescheduler \
|
|
36
|
-
libruntimeexecutor \
|
|
37
|
-
libyoga
|
|
38
|
-
|
|
39
|
-
# The static libraries (.a files) that this module depends on.
|
|
40
|
-
LOCAL_STATIC_LIBRARIES := libreactnative libcallinvokerholder
|
|
41
|
-
|
|
42
|
-
# Name of this module.
|
|
43
|
-
#
|
|
44
|
-
# Other modules can depend on this one by adding libreactnativejni to their
|
|
45
|
-
# LOCAL_SHARED_LIBRARIES variable.
|
|
46
|
-
LOCAL_MODULE := reactnativeutilsjni
|
|
47
|
-
|
|
48
|
-
# Compile all local c++ files.
|
|
49
|
-
LOCAL_SRC_FILES := $(wildcard $(LOCAL_PATH)/*.cpp)
|
|
50
|
-
LOCAL_SRC_FILES := $(subst $(LOCAL_PATH)/,,$(LOCAL_SRC_FILES))
|
|
51
|
-
|
|
52
|
-
ifeq ($(APP_OPTIM),debug)
|
|
53
|
-
# Keep symbols by overriding the strip command invoked by ndk-build.
|
|
54
|
-
# Note that this will apply to all shared libraries,
|
|
55
|
-
# i.e. shared libraries will NOT be stripped
|
|
56
|
-
# even though we override it in this Android.mk
|
|
57
|
-
cmd-strip :=
|
|
58
|
-
endif
|
|
59
|
-
|
|
60
|
-
# Build the files in this directory as a shared library
|
|
61
|
-
include $(BUILD_SHARED_LIBRARY)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
8
|
######################
|
|
68
9
|
### reactnativejni ###
|
|
69
10
|
######################
|
|
@@ -91,7 +32,6 @@ LOCAL_SHARED_LIBRARIES := \
|
|
|
91
32
|
libfolly_json \
|
|
92
33
|
libglog_init \
|
|
93
34
|
libreact_render_runtimescheduler \
|
|
94
|
-
libreactnativeutilsjni \
|
|
95
35
|
libruntimeexecutor \
|
|
96
36
|
libyoga \
|
|
97
37
|
logger
|
|
@@ -12,8 +12,14 @@ namespace facebook {
|
|
|
12
12
|
namespace react {
|
|
13
13
|
|
|
14
14
|
double reactAndroidNativePerformanceNowHook() {
|
|
15
|
-
auto time = std::chrono::
|
|
16
|
-
|
|
15
|
+
auto time = std::chrono::steady_clock::now();
|
|
16
|
+
auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(
|
|
17
|
+
time.time_since_epoch())
|
|
18
|
+
.count();
|
|
19
|
+
|
|
20
|
+
constexpr double NANOSECONDS_IN_MILLISECOND = 1000000.0;
|
|
21
|
+
|
|
22
|
+
return duration / NANOSECONDS_IN_MILLISECOND;
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
} // namespace react
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3a54a7151da62c2a7e177f5837e8d6b4
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
15dc280696c55d5ebecee6e6ec59d5d51014dfdc
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
68222e23dc12acbe658d4d642689c95362b5de5f9eb16e6951e7f9921ec9eac0
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
c72afd11233f3353ba5d5844773599a11229e5f875a80fb870b45a877537c2856c2e15d0ef3b7e91e5837108ab4d08a808b2595070ff0ef0b32358905d8d489c
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
785d2e11f8d7730e07e68cd5fdf76bcf
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
99c1ca2d54896975e6415ec76302d1c90fd5060e
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
36f0b709b38c553125931555157c8e8429e45676c74f1c41c67cf7ab0f9523af
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
1f60c5e4865c1b2abbd87cdfba101d196ed2e34a7bb079230d37d9960a4e12f7ea9666860491926d2b097f19e7549cd61fe4f6236293a71c18123a399bf6c2ab
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"component": {
|
|
4
4
|
"group": "com.facebook.react",
|
|
5
5
|
"module": "react-native",
|
|
6
|
-
"version": "0.68.
|
|
6
|
+
"version": "0.68.4",
|
|
7
7
|
"attributes": {
|
|
8
8
|
"org.gradle.status": "release"
|
|
9
9
|
}
|
|
@@ -131,13 +131,13 @@
|
|
|
131
131
|
],
|
|
132
132
|
"files": [
|
|
133
133
|
{
|
|
134
|
-
"name": "react-native-0.68.
|
|
135
|
-
"url": "react-native-0.68.
|
|
136
|
-
"size":
|
|
137
|
-
"sha512": "
|
|
138
|
-
"sha256": "
|
|
139
|
-
"sha1": "
|
|
140
|
-
"md5": "
|
|
134
|
+
"name": "react-native-0.68.4.aar",
|
|
135
|
+
"url": "react-native-0.68.4.aar",
|
|
136
|
+
"size": 15448544,
|
|
137
|
+
"sha512": "1f60c5e4865c1b2abbd87cdfba101d196ed2e34a7bb079230d37d9960a4e12f7ea9666860491926d2b097f19e7549cd61fe4f6236293a71c18123a399bf6c2ab",
|
|
138
|
+
"sha256": "36f0b709b38c553125931555157c8e8429e45676c74f1c41c67cf7ab0f9523af",
|
|
139
|
+
"sha1": "99c1ca2d54896975e6415ec76302d1c90fd5060e",
|
|
140
|
+
"md5": "785d2e11f8d7730e07e68cd5fdf76bcf"
|
|
141
141
|
}
|
|
142
142
|
]
|
|
143
143
|
},
|
|
@@ -258,13 +258,13 @@
|
|
|
258
258
|
],
|
|
259
259
|
"files": [
|
|
260
260
|
{
|
|
261
|
-
"name": "react-native-0.68.
|
|
262
|
-
"url": "react-native-0.68.
|
|
263
|
-
"size":
|
|
264
|
-
"sha512": "
|
|
265
|
-
"sha256": "
|
|
266
|
-
"sha1": "
|
|
267
|
-
"md5": "
|
|
261
|
+
"name": "react-native-0.68.4.aar",
|
|
262
|
+
"url": "react-native-0.68.4.aar",
|
|
263
|
+
"size": 15448544,
|
|
264
|
+
"sha512": "1f60c5e4865c1b2abbd87cdfba101d196ed2e34a7bb079230d37d9960a4e12f7ea9666860491926d2b097f19e7549cd61fe4f6236293a71c18123a399bf6c2ab",
|
|
265
|
+
"sha256": "36f0b709b38c553125931555157c8e8429e45676c74f1c41c67cf7ab0f9523af",
|
|
266
|
+
"sha1": "99c1ca2d54896975e6415ec76302d1c90fd5060e",
|
|
267
|
+
"md5": "785d2e11f8d7730e07e68cd5fdf76bcf"
|
|
268
268
|
}
|
|
269
269
|
]
|
|
270
270
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3714874059b37046dbc52345a297e587
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
32b2a152fb29e7d9bd441a74ba39e464da0492db
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
9279e8fec8e8f6d8be440526a8f3f1696697a197d7bf7d4ef632a26b41f2f739
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
86179473480cdec2fa1128447e667c3da89dc45734922b35d6c49b3417ee616a5adc8bac91fc2d6d8e8c6301f6ceb92f3693351835debc7b6bb76ee5b41edbb5
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<modelVersion>4.0.0</modelVersion>
|
|
10
10
|
<groupId>com.facebook.react</groupId>
|
|
11
11
|
<artifactId>react-native</artifactId>
|
|
12
|
-
<version>0.68.
|
|
12
|
+
<version>0.68.4</version>
|
|
13
13
|
<packaging>aar</packaging>
|
|
14
14
|
<name>ReactNative</name>
|
|
15
15
|
<description>A framework for building native apps with React</description>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
51ec2257a317c46dfa10223728c05623
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5c53de4d27c661d0a979af3286f4c20ef6032993
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
df544faeb08ae6c239c8d50dbb4bb008f1b49983769aee5f020060693a0b928a
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
f911b52e0aa445dd22ffd4dd83b91fada4ec792f3aaa1adefcde288bbf61b71225319043a850e055a2bf99a7728e266bfb557031d33328d6c8b78d45e821138c
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
<groupId>com.facebook.react</groupId>
|
|
4
4
|
<artifactId>react-native</artifactId>
|
|
5
5
|
<versioning>
|
|
6
|
-
<latest>0.68.
|
|
7
|
-
<release>0.68.
|
|
6
|
+
<latest>0.68.4</latest>
|
|
7
|
+
<release>0.68.4</release>
|
|
8
8
|
<versions>
|
|
9
|
-
<version>0.68.
|
|
9
|
+
<version>0.68.4</version>
|
|
10
10
|
</versions>
|
|
11
|
-
<lastUpdated>
|
|
11
|
+
<lastUpdated>20221010133451</lastUpdated>
|
|
12
12
|
</versioning>
|
|
13
13
|
</metadata>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
ba7bb65ba87a6af060e01f17835adf72
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
d80e3d201b5417e3f2b0cfe2821730d96fcaf6e4
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
7d68cba6e4f6bbfa76b03a8ede875f77045fbba4281d46b1c96ff9c429939ce9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
4d13858b3f0f7b7a89a2dd7716d6dd615689942842adb89f0b5c2aed9dcb97abcb9d5682283eb8f8053a834ce1b06d20d3c13937a6cebf3c802dab25f9ea3b73
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.68.
|
|
3
|
+
"version": "0.68.4",
|
|
4
4
|
"bin": "./cli.js",
|
|
5
5
|
"description": "A framework for building native apps using React",
|
|
6
6
|
"license": "MIT",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"metro-source-map": "0.67.0",
|
|
107
107
|
"nullthrows": "^1.1.1",
|
|
108
108
|
"pretty-format": "^26.5.2",
|
|
109
|
-
"promise": "^8.0
|
|
109
|
+
"promise": "^8.2.0",
|
|
110
110
|
"react-devtools-core": "^4.23.0",
|
|
111
111
|
"react-native-gradle-plugin": "^0.0.6",
|
|
112
112
|
"react-refresh": "^0.4.0",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"use-subscription": ">=1.0.0 <1.6.0",
|
|
118
118
|
"whatwg-fetch": "^3.0.0",
|
|
119
119
|
"ws": "^6.1.4",
|
|
120
|
-
"react-native-codegen": "^0.0.
|
|
120
|
+
"react-native-codegen": "^0.0.18"
|
|
121
121
|
},
|
|
122
122
|
"devDependencies": {
|
|
123
123
|
"flow-bin": "^0.170.0",
|
package/template/Gemfile.lock
CHANGED
|
@@ -3,14 +3,14 @@ GEM
|
|
|
3
3
|
specs:
|
|
4
4
|
CFPropertyList (3.0.5)
|
|
5
5
|
rexml
|
|
6
|
-
activesupport (6.1.
|
|
6
|
+
activesupport (6.1.7)
|
|
7
7
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
8
8
|
i18n (>= 1.6, < 2)
|
|
9
9
|
minitest (>= 5.1)
|
|
10
10
|
tzinfo (~> 2.0)
|
|
11
11
|
zeitwerk (~> 2.3)
|
|
12
|
-
addressable (2.8.
|
|
13
|
-
public_suffix (>= 2.0.2, <
|
|
12
|
+
addressable (2.8.1)
|
|
13
|
+
public_suffix (>= 2.0.2, < 6.0)
|
|
14
14
|
algoliasearch (1.27.5)
|
|
15
15
|
httpclient (~> 2.8, >= 2.8.3)
|
|
16
16
|
json (>= 1.5.1)
|
|
@@ -63,10 +63,10 @@ GEM
|
|
|
63
63
|
fuzzy_match (2.0.4)
|
|
64
64
|
gh_inspector (1.1.3)
|
|
65
65
|
httpclient (2.8.3)
|
|
66
|
-
i18n (1.
|
|
66
|
+
i18n (1.12.0)
|
|
67
67
|
concurrent-ruby (~> 1.0)
|
|
68
|
-
json (2.6.
|
|
69
|
-
minitest (5.
|
|
68
|
+
json (2.6.2)
|
|
69
|
+
minitest (5.16.3)
|
|
70
70
|
molinillo (0.8.0)
|
|
71
71
|
nanaimo (0.3.0)
|
|
72
72
|
nap (1.1.0)
|
|
@@ -76,16 +76,16 @@ GEM
|
|
|
76
76
|
ruby-macho (2.5.1)
|
|
77
77
|
typhoeus (1.4.0)
|
|
78
78
|
ethon (>= 0.9.0)
|
|
79
|
-
tzinfo (2.0.
|
|
79
|
+
tzinfo (2.0.5)
|
|
80
80
|
concurrent-ruby (~> 1.0)
|
|
81
|
-
xcodeproj (1.
|
|
81
|
+
xcodeproj (1.22.0)
|
|
82
82
|
CFPropertyList (>= 2.3.3, < 4.0)
|
|
83
83
|
atomos (~> 0.1.3)
|
|
84
84
|
claide (>= 1.0.2, < 2.0)
|
|
85
85
|
colored2 (~> 3.1)
|
|
86
86
|
nanaimo (~> 0.3.0)
|
|
87
87
|
rexml (~> 3.2.4)
|
|
88
|
-
zeitwerk (2.
|
|
88
|
+
zeitwerk (2.6.1)
|
|
89
89
|
|
|
90
90
|
PLATFORMS
|
|
91
91
|
ruby
|
package/template/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
00c463ff871e0304a451c9dacff46ce1
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
adf0d286c68566df24959324849d01de574b45e3
|
package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2-sources.jar.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
346f21bdb20c96ee71bcf6d79b6366ce43d5d5f09e30d8452c7fa5402f74c397
|
package/android/com/facebook/react/react-native/0.68.2/react-native-0.68.2-sources.jar.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a9a21e5dab561ed6157cea21b331cf26a4c02f56f474c0cfcb73488b472ed3539ccb8956241a3c47ce788e604828b44736c24b196a0469d718086ed171be80e4
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d666afe8cd0cc343ccb5a563ba6ec0de
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4280fad14bfe5be0c48e726b9a3198c3cf14b656
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9b66dd0a4da6f0f2f91b9d80a2b0f3f9cb0b9dce61d82b18a53b8291978d58fc
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3a382af29982d6cbbee62463d499f8d29be1ebc64a1633b07a470c3cb3686d5c1aa101902c43dc1512f4fa5957c5e35b910f847cf0fd0aff223417eea78c782a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a9cf9e60e16064fef22766a1ab4b2962
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4c6983eba482e2e4cb39a10b0a0ffce014e4b30e
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
9542c7bab4d20071b9915c6bb624067cf9160271ebf02dd63ed81bf70444cd90
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2f07244d0bdfc10ab83deb415f686f3a0e2e845400456df8aa9a646c6ebb5f08b7a1d5bd03ac4160b5183d6c0ea9ab33a6631cb64992d1b1980f5a73d87f0db3
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fd65034eccc6c3ae104fd76ef9aa451d
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ee236855ea6fd44906b6bb7f0d87cf69ec44d09d
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
210584bb40ca9aa7865f8fd095ba4f10b8a2fcf9940a9d906df6b122fc1e466a
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e8b67488f4a6aa0894b378af89f6c0567c479ac920297eb9c0626a6d7892fed6857606f7e46aca5a7ed00a4bb30ca638e0a82b5956d99e7683976fb339aca1cf
|