docstring_tokens
stringlengths
18
16.9k
code_tokens
stringlengths
75
1.81M
html_url
stringlengths
74
116
file_name
stringlengths
3
311
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> public void test_onMessage_WithInvalidContentType_ShouldNotTriggerCallback() throws IOException { <mask> RequestHandler handler = mock(RequestHandler.class); <mask> final JSPackagerClient client = new JSPackagerClient("test_client", mSettings, createRH("methodValue", handler)); <mask> <mask> client.onMessage( <mask> ResponseBody.create( <mask> WebSocket.BINARY, <mask> "{\"version\": 2, \"method\": \"methodValue\"}")); <mask> verify(handler, never()).onNotification(any()); <mask> verify(handler, never()).onRequest(any(), any(Responder.class)); <mask> } <mask> <mask> @Test </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove client.onMessage( ResponseBody.create( WebSocket.BINARY, "{\"version\": 2, \"method\": \"methodValue2\"}")); </s> add client.onMessage(ByteString.EMPTY); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": null}")); </s> add client.onMessage("{\"version\": 2, \"method\": null}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": \"methodValue\"}")); </s> add client.onMessage("{\"version\": 2, \"method\": \"methodValue\"}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 1, \"method\": \"methodValue\"}")); </s> add client.onMessage("{\"version\": 1, \"method\": \"methodValue\"}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2}")); </s> add client.onMessage("{\"version\": 2}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": \"methodValue\", \"params\": \"paramsValue\"}")); </s> add client.onMessage("{\"version\": 2, \"method\": \"methodValue\", \"params\": \"paramsValue\"}");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/packagerconnection/JSPackagerClientTest.java
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> public void test_onMessage_WithoutMethod_ShouldNotTriggerCallback() throws IOException { <mask> RequestHandler handler = mock(RequestHandler.class); <mask> final JSPackagerClient client = new JSPackagerClient("test_client", mSettings, createRH("methodValue", handler)); <mask> <mask> client.onMessage( <mask> ResponseBody.create( <mask> WebSocket.TEXT, <mask> "{\"version\": 2}")); <mask> verify(handler, never()).onNotification(any()); <mask> verify(handler, never()).onRequest(any(), any(Responder.class)); <mask> } <mask> <mask> @Test </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": null}")); </s> add client.onMessage("{\"version\": 2, \"method\": null}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.BINARY, "{\"version\": 2, \"method\": \"methodValue2\"}")); </s> add client.onMessage(ByteString.EMPTY); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 1, \"method\": \"methodValue\"}")); </s> add client.onMessage("{\"version\": 1, \"method\": \"methodValue\"}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.BINARY, "{\"version\": 2, \"method\": \"methodValue\"}")); </s> add client.onMessage(ByteString.encodeUtf8("{\"version\": 2, \"method\": \"methodValue\"}")); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": \"methodValue\"}")); </s> add client.onMessage("{\"version\": 2, \"method\": \"methodValue\"}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": \"methodValue\", \"params\": \"paramsValue\"}")); </s> add client.onMessage("{\"version\": 2, \"method\": \"methodValue\", \"params\": \"paramsValue\"}");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/packagerconnection/JSPackagerClientTest.java
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> public void test_onMessage_With_Null_Action_ShouldNotTriggerCallback() throws IOException { <mask> RequestHandler handler = mock(RequestHandler.class); <mask> final JSPackagerClient client = new JSPackagerClient("test_client", mSettings, createRH("methodValue", handler)); <mask> <mask> client.onMessage( <mask> ResponseBody.create( <mask> WebSocket.TEXT, <mask> "{\"version\": 2, \"method\": null}")); <mask> verify(handler, never()).onNotification(any()); <mask> verify(handler, never()).onRequest(any(), any(Responder.class)); <mask> } <mask> <mask> @Test </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove client.onMessage( ResponseBody.create( WebSocket.BINARY, "{\"version\": 2, \"method\": \"methodValue\"}")); </s> add client.onMessage(ByteString.encodeUtf8("{\"version\": 2, \"method\": \"methodValue\"}")); </s> remove client.onMessage( ResponseBody.create( WebSocket.BINARY, "{\"version\": 2, \"method\": \"methodValue2\"}")); </s> add client.onMessage(ByteString.EMPTY); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": \"methodValue\"}")); </s> add client.onMessage("{\"version\": 2, \"method\": \"methodValue\"}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2}")); </s> add client.onMessage("{\"version\": 2}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 1, \"method\": \"methodValue\"}")); </s> add client.onMessage("{\"version\": 1, \"method\": \"methodValue\"}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": \"methodValue\", \"params\": \"paramsValue\"}")); </s> add client.onMessage("{\"version\": 2, \"method\": \"methodValue\", \"params\": \"paramsValue\"}");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/packagerconnection/JSPackagerClientTest.java
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> public void test_onMessage_WithInvalidMethod_ShouldNotTriggerCallback() throws IOException { <mask> RequestHandler handler = mock(RequestHandler.class); <mask> final JSPackagerClient client = new JSPackagerClient("test_client", mSettings, createRH("methodValue", handler)); <mask> <mask> client.onMessage( <mask> ResponseBody.create( <mask> WebSocket.BINARY, <mask> "{\"version\": 2, \"method\": \"methodValue2\"}")); <mask> verify(handler, never()).onNotification(any()); <mask> verify(handler, never()).onRequest(any(), any(Responder.class)); <mask> } <mask> <mask> @Test </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove client.onMessage( ResponseBody.create( WebSocket.BINARY, "{\"version\": 2, \"method\": \"methodValue\"}")); </s> add client.onMessage(ByteString.encodeUtf8("{\"version\": 2, \"method\": \"methodValue\"}")); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": null}")); </s> add client.onMessage("{\"version\": 2, \"method\": null}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": \"methodValue\"}")); </s> add client.onMessage("{\"version\": 2, \"method\": \"methodValue\"}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2}")); </s> add client.onMessage("{\"version\": 2}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 1, \"method\": \"methodValue\"}")); </s> add client.onMessage("{\"version\": 1, \"method\": \"methodValue\"}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": \"methodValue\", \"params\": \"paramsValue\"}")); </s> add client.onMessage("{\"version\": 2, \"method\": \"methodValue\", \"params\": \"paramsValue\"}");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/packagerconnection/JSPackagerClientTest.java
keep keep keep keep replace replace replace replace keep keep keep keep
<mask> public void test_onMessage_WrongVersion_ShouldNotTriggerCallback() throws IOException { <mask> RequestHandler handler = mock(RequestHandler.class); <mask> final JSPackagerClient client = new JSPackagerClient("test_client", mSettings, createRH("methodValue", handler)); <mask> <mask> client.onMessage( <mask> ResponseBody.create( <mask> WebSocket.TEXT, <mask> "{\"version\": 1, \"method\": \"methodValue\"}")); <mask> verify(handler, never()).onNotification(any()); <mask> verify(handler, never()).onRequest(any(), any(Responder.class)); <mask> } <mask> } </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove client.onMessage( ResponseBody.create( WebSocket.BINARY, "{\"version\": 2, \"method\": \"methodValue\"}")); </s> add client.onMessage(ByteString.encodeUtf8("{\"version\": 2, \"method\": \"methodValue\"}")); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": null}")); </s> add client.onMessage("{\"version\": 2, \"method\": null}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": \"methodValue\"}")); </s> add client.onMessage("{\"version\": 2, \"method\": \"methodValue\"}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2}")); </s> add client.onMessage("{\"version\": 2}"); </s> remove client.onMessage( ResponseBody.create( WebSocket.BINARY, "{\"version\": 2, \"method\": \"methodValue2\"}")); </s> add client.onMessage(ByteString.EMPTY); </s> remove client.onMessage( ResponseBody.create( WebSocket.TEXT, "{\"version\": 2, \"method\": \"methodValue\", \"params\": \"paramsValue\"}")); </s> add client.onMessage("{\"version\": 2, \"method\": \"methodValue\", \"params\": \"paramsValue\"}");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/packagerconnection/JSPackagerClientTest.java
keep keep keep keep replace keep keep keep keep keep
<mask> UIManagerModule uiManager = getUIManagerModule(); <mask> <mask> ReactRootView rootView = <mask> new ReactRootView(RuntimeEnvironment.application.getApplicationContext()); <mask> int rootTag = uiManager.addMeasuredRootView(rootView); <mask> int viewTag = rootTag + 1; <mask> int subViewTag = viewTag + 1; <mask> <mask> uiManager.createView( <mask> viewTag, </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/uimanager/UIManagerModuleTest.java
keep keep keep keep replace keep keep keep keep keep
<mask> public void testRemoveSubviewsFromContainerWithID() { <mask> UIManagerModule uiManager = getUIManagerModule(); <mask> ReactRootView rootView = <mask> new ReactRootView(RuntimeEnvironment.application.getApplicationContext()); <mask> int rootTag = uiManager.addMeasuredRootView(rootView); <mask> <mask> final int containerTag = rootTag + 1; <mask> final int containerSiblingTag = containerTag + 1; <mask> <mask> uiManager.createView( </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/uimanager/UIManagerModuleTest.java
keep keep keep keep replace keep keep keep keep keep
<mask> */ <mask> private ViewGroup createSimpleTextHierarchy(UIManagerModule uiManager, String text) { <mask> ReactRootView rootView = <mask> new ReactRootView(RuntimeEnvironment.application.getApplicationContext()); <mask> int rootTag = uiManager.addMeasuredRootView(rootView); <mask> int textTag = rootTag + 1; <mask> int rawTextTag = textTag + 1; <mask> <mask> uiManager.createView( <mask> textTag, </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/uimanager/UIManagerModuleTest.java
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> private TestMoveDeleteHierarchy createMoveDeleteHierarchy(UIManagerModule uiManager) { <mask> ReactRootView rootView = new ReactRootView(mReactContext); <mask> int rootTag = uiManager.addMeasuredRootView(rootView); <mask> <mask> TestMoveDeleteHierarchy hierarchy = new TestMoveDeleteHierarchy(rootView, rootTag); <mask> <mask> uiManager.createView( <mask> hierarchy.view0, </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/uimanager/UIManagerModuleTest.java
keep keep keep keep replace keep keep keep keep keep
<mask> UIManagerModule uiManager, <mask> JavaOnlyMap textProps, <mask> JavaOnlyMap rawTextProps) { <mask> ReactRootView rootView = new ReactRootView(RuntimeEnvironment.application); <mask> int rootTag = uiManager.addMeasuredRootView(rootView); <mask> int textTag = rootTag + 1; <mask> int rawTextTag = textTag + 1; <mask> <mask> uiManager.createView( <mask> textTag, </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/views/text/ReactTextTest.java
keep keep keep keep replace keep keep keep keep keep
<mask> UIManagerModule uiManager = getUIManagerModule(); <mask> <mask> ReactRootView rootView = new ReactRootView(RuntimeEnvironment.application); <mask> rootView.setLayoutParams(new ReactRootView.LayoutParams(100, 100)); <mask> int rootTag = uiManager.addMeasuredRootView(rootView); <mask> int textInputTag = rootTag + 1; <mask> final String hintStr = "placeholder text"; <mask> <mask> uiManager.createView( <mask> textInputTag, </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/views/textinput/TextInputTest.java
keep keep keep keep replace keep keep keep keep keep
<mask> UIManagerModule uiManager = getUIManagerModule(); <mask> <mask> ReactRootView rootView = new ReactRootView(RuntimeEnvironment.application); <mask> rootView.setLayoutParams(new ReactRootView.LayoutParams(100, 100)); <mask> int rootTag = uiManager.addMeasuredRootView(rootView); <mask> int textInputTag = rootTag + 1; <mask> final String hintStr = "placeholder text"; <mask> <mask> uiManager.createView( <mask> textInputTag, </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactAndroid/src/test/java/com/facebook/react/views/textinput/TextInputTest.java
keep add keep keep keep keep keep
<mask> # Set up common deps <mask> <mask> GLOG_DEP = "//ReactAndroid/build/third-party-ndk/glog:glog" <mask> <mask> INSPECTOR_FLAGS = [] <mask> DEBUG_PREPROCESSOR_FLAGS = [] <mask> STATIC_LIBRARY_IOS_FLAGS = [] </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add INSPECTOR_FLAGS = [] DEBUG_PREPROCESSOR_FLAGS = [] STATIC_LIBRARY_IOS_FLAGS = [] JSC_DEPS = [] JSC_INTERNAL_DEPS = [] THIS_IS_FBOBJC = False THIS_IS_FBANDROID = False </s> remove REACT_LIBRARY_EXTRA_COMPILER_FLAGS = [] </s> add CXX_LIBRARY_COMPILER_FLAGS = [ "-std=c++14", "-Wall", ] </s> remove def react_library(**kwargs): fb_apple_library( name = 'bridge', header_path_prefix = "cxxreact", inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, frameworks = [ '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', ], tests = [ react_native_xplat_target('cxxreact/tests:tests') ], **kwargs_add( kwargs, preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + INSPECTOR_FLAGS, deps = [ '//xplat/folly:molly', ], visibility = [ 'PUBLIC' ], ) ) cxx_library( </s> add rn_xplat_cxx_library( </s> remove CXX_LIBRARY_COMPILER_FLAGS = [] </s> add include_defs("//ReactCommon/DEFS") </s> remove include_defs("xplat//configurations/buck/apple/dependency_aggregator_defs") </s> add </s> remove CXX_LIBRARY_COMPILER_FLAGS = inherited_buck_flags.get_flag_value('compiler_flags') REACT_LIBRARY_EXTRA_COMPILER_FLAGS = ['-Wno-shadow', '-Wno-missing-prototypes', '-Wno-global-constructors'] def kwargs_add(base_kwargs, **new_kwargs): ret_kwargs = dict(base_kwargs) for name, add_value in new_kwargs.iteritems(): if name in ret_kwargs: # Don't use +=, it will modify base_kwargs ret_kwargs[name] = ret_kwargs[name] + add_value else: ret_kwargs[name] = add_value return ret_kwargs if THIS_IS_FBANDROID: include_defs('//ReactAndroid/DEFS') def react_library(**kwargs): kwargs = kwargs_add( kwargs, compiler_flags = [ '-Wno-pessimizing-move', ], deps = [ '//xplat/folly:molly' ]) cxx_library( name = 'bridge', **kwargs_add( kwargs, preprocessor_flags = [ '-DWITH_JSC_EXTRA_TRACING=1', '-DWITH_JSC_MEMORY_PRESSURE=1', '-DWITH_REACT_INTERNAL_SETTINGS=1', '-DWITH_FB_MEMORY_PROFILING=1', '-DWITH_INSPECTOR=1', ], deps = JSC_DEPS, visibility = [ # TL;DR: If you depend on this target directly, you're gonna have a # Bad Time(TM). # # `facebook::react::JSCExecutor::initOnJSVMThread` (in `:bridge`) does # some platform-dependant setup. Exactly what setup to do is # determined by some static functors, defined in `Platform.h`, which # are initially `nullptr`. On Android, these functors are properly # assigned as part of `xreact`'s `JNI_OnLoad`. By depending directly # on the bridge, we can mess up the SO initialisation order, causing # `initOnJSVMThread` to be called before the platform-specific hooks # have been properly initialised. Bad Times(TM). # -- @ashokmenon (2017/01/03) react_native_target('jni/xreact/jni:jni'), react_native_xplat_target('cxxreact/...'), ], ) ) if THIS_IS_FBOBJC: if should_use_dependency_aggregation(): INSPECTOR_FLAGS = [] else: INSPECTOR_FLAGS = [ '-DWITH_INSPECTOR=1', ] </s> add CXX_LIBRARY_COMPILER_FLAGS += inherited_buck_flags.get_flag_value('compiler_flags')
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/DEFS
keep keep keep add
<mask> def react_native_xplat_target(path): <mask> return '//ReactCommon/' + path <mask> <mask> GLOG_DEP = "//ReactAndroid/build/third-party-ndk/glog:glog" </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add # Building is not supported in OSS right now def rn_xplat_cxx_library(name, **kwargs): cxx_library(name = name) # Helper for referring to an Android RN target def react_native_target(path): return '//ReactAndroid/src/main/' + path # Helper for referring to an xplat RN target def react_native_xplat_target(path): return '//ReactCommon/' + path </s> remove include_defs("xplat//configurations/buck/apple/dependency_aggregator_defs") </s> add </s> remove def react_library(**kwargs): fb_apple_library( name = 'bridge', header_path_prefix = "cxxreact", inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, frameworks = [ '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', ], tests = [ react_native_xplat_target('cxxreact/tests:tests') ], **kwargs_add( kwargs, preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + INSPECTOR_FLAGS, deps = [ '//xplat/folly:molly', ], visibility = [ 'PUBLIC' ], ) ) cxx_library( </s> add rn_xplat_cxx_library( </s> remove CXX_LIBRARY_COMPILER_FLAGS = inherited_buck_flags.get_flag_value('compiler_flags') REACT_LIBRARY_EXTRA_COMPILER_FLAGS = ['-Wno-shadow', '-Wno-missing-prototypes', '-Wno-global-constructors'] def kwargs_add(base_kwargs, **new_kwargs): ret_kwargs = dict(base_kwargs) for name, add_value in new_kwargs.iteritems(): if name in ret_kwargs: # Don't use +=, it will modify base_kwargs ret_kwargs[name] = ret_kwargs[name] + add_value else: ret_kwargs[name] = add_value return ret_kwargs if THIS_IS_FBANDROID: include_defs('//ReactAndroid/DEFS') def react_library(**kwargs): kwargs = kwargs_add( kwargs, compiler_flags = [ '-Wno-pessimizing-move', ], deps = [ '//xplat/folly:molly' ]) cxx_library( name = 'bridge', **kwargs_add( kwargs, preprocessor_flags = [ '-DWITH_JSC_EXTRA_TRACING=1', '-DWITH_JSC_MEMORY_PRESSURE=1', '-DWITH_REACT_INTERNAL_SETTINGS=1', '-DWITH_FB_MEMORY_PROFILING=1', '-DWITH_INSPECTOR=1', ], deps = JSC_DEPS, visibility = [ # TL;DR: If you depend on this target directly, you're gonna have a # Bad Time(TM). # # `facebook::react::JSCExecutor::initOnJSVMThread` (in `:bridge`) does # some platform-dependant setup. Exactly what setup to do is # determined by some static functors, defined in `Platform.h`, which # are initially `nullptr`. On Android, these functors are properly # assigned as part of `xreact`'s `JNI_OnLoad`. By depending directly # on the bridge, we can mess up the SO initialisation order, causing # `initOnJSVMThread` to be called before the platform-specific hooks # have been properly initialised. Bad Times(TM). # -- @ashokmenon (2017/01/03) react_native_target('jni/xreact/jni:jni'), react_native_xplat_target('cxxreact/...'), ], ) ) if THIS_IS_FBOBJC: if should_use_dependency_aggregation(): INSPECTOR_FLAGS = [] else: INSPECTOR_FLAGS = [ '-DWITH_INSPECTOR=1', ] </s> add CXX_LIBRARY_COMPILER_FLAGS += inherited_buck_flags.get_flag_value('compiler_flags') </s> remove int top = bounds.top; </s> add </s> remove int width = bounds.width(); int height = bounds.height(); // If the path drawn previously is of the same color, // there would be a slight white space between borders // with anti-alias set to true. // Therefore we need to disable anti-alias, and // after drawing is done, we will re-enable it. mPaint.setAntiAlias(false); if (mPathForBorder == null) { mPathForBorder = new Path(); } if (borderLeft > 0 && colorLeft != Color.TRANSPARENT) { mPaint.setColor(colorLeft); mPathForBorder.reset(); mPathForBorder.moveTo(left, top); mPathForBorder.lineTo(left + borderLeft, top + borderTop); mPathForBorder.lineTo(left + borderLeft, top + height - borderBottom); mPathForBorder.lineTo(left, top + height); mPathForBorder.lineTo(left, top); canvas.drawPath(mPathForBorder, mPaint); } if (borderTop > 0 && colorTop != Color.TRANSPARENT) { mPaint.setColor(colorTop); mPathForBorder.reset(); mPathForBorder.moveTo(left, top); mPathForBorder.lineTo(left + borderLeft, top + borderTop); mPathForBorder.lineTo(left + width - borderRight, top + borderTop); mPathForBorder.lineTo(left + width, top); mPathForBorder.lineTo(left, top); canvas.drawPath(mPathForBorder, mPaint); } if (borderRight > 0 && colorRight != Color.TRANSPARENT) { mPaint.setColor(colorRight); mPathForBorder.reset(); mPathForBorder.moveTo(left + width, top); mPathForBorder.lineTo(left + width, top + height); mPathForBorder.lineTo(left + width - borderRight, top + height - borderBottom); mPathForBorder.lineTo(left + width - borderRight, top + borderTop); mPathForBorder.lineTo(left + width, top); canvas.drawPath(mPathForBorder, mPaint); } </s> add int top = bounds.top;
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/DEFS
keep keep keep keep replace keep keep keep keep keep
<mask> LOCAL_PATH := $(call my-dir) <mask> <mask> include $(CLEAR_VARS) <mask> <mask> LOCAL_MODULE := libreactnativefb <mask> <mask> LOCAL_SRC_FILES := \ <mask> CxxNativeModule.cpp \ <mask> Instance.cpp \ <mask> JSCExecutor.cpp \ </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove LOCAL_MODULE := libreactnativejni </s> add LOCAL_MODULE := reactnativejni </s> remove Dummy.cpp \ </s> add CatalystInstanceImpl.cpp \ CxxModuleWrapper.cpp \ JavaModuleWrapper.cpp \ JMessageQueueThread.cpp \ JSCPerfLogging.cpp \ JSLoader.cpp \ JSLogging.cpp \ JniJSModulesUnbundle.cpp \ MethodInvoker.cpp \ ModuleRegistryBuilder.cpp \ NativeArray.cpp \ NativeCommon.cpp \ NativeMap.cpp \ OnLoad.cpp \ ProxyExecutor.cpp \ ReadableNativeArray.cpp \ ReadableNativeMap.cpp \ WritableNativeArray.cpp \ WritableNativeMap.cpp \ </s> remove LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../.. $(LOCAL_PATH)/.. </s> add LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../.. </s> remove LOCAL_SHARED_LIBRARIES := libreactnativejnifb LOCAL_STATIC_LIBRARIES := </s> add LOCAL_SHARED_LIBRARIES := libfolly_json libfbjni libjsc libglog_init libyoga LOCAL_STATIC_LIBRARIES := libreactnative </s> remove #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, edge < YGEdgeEnd, "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> add #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, \ edge < YGEdgeEnd, \ "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> remove $(call import-module,xreact/jni) </s> add $(call import-module,cxxreact) $(call import-module,fb) $(call import-module,fbgloginit) $(call import-module,folly) $(call import-module,jsc) $(call import-module,yogajni)
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/Android.mk
replace keep replace keep keep keep keep keep
<mask> CXX_LIBRARY_COMPILER_FLAGS = [] <mask> <mask> REACT_LIBRARY_EXTRA_COMPILER_FLAGS = [] <mask> <mask> if THIS_IS_FBOBJC: <mask> include_defs("xplat//configurations/buck/apple/dependency_aggregator_defs") <mask> inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS <mask> CXX_LIBRARY_COMPILER_FLAGS = inherited_buck_flags.get_flag_value('compiler_flags') </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove include_defs("xplat//configurations/buck/apple/dependency_aggregator_defs") </s> add </s> add INSPECTOR_FLAGS = [] DEBUG_PREPROCESSOR_FLAGS = [] STATIC_LIBRARY_IOS_FLAGS = [] JSC_DEPS = [] JSC_INTERNAL_DEPS = [] THIS_IS_FBOBJC = False THIS_IS_FBANDROID = False </s> remove CXX_LIBRARY_COMPILER_FLAGS = inherited_buck_flags.get_flag_value('compiler_flags') REACT_LIBRARY_EXTRA_COMPILER_FLAGS = ['-Wno-shadow', '-Wno-missing-prototypes', '-Wno-global-constructors'] def kwargs_add(base_kwargs, **new_kwargs): ret_kwargs = dict(base_kwargs) for name, add_value in new_kwargs.iteritems(): if name in ret_kwargs: # Don't use +=, it will modify base_kwargs ret_kwargs[name] = ret_kwargs[name] + add_value else: ret_kwargs[name] = add_value return ret_kwargs if THIS_IS_FBANDROID: include_defs('//ReactAndroid/DEFS') def react_library(**kwargs): kwargs = kwargs_add( kwargs, compiler_flags = [ '-Wno-pessimizing-move', ], deps = [ '//xplat/folly:molly' ]) cxx_library( name = 'bridge', **kwargs_add( kwargs, preprocessor_flags = [ '-DWITH_JSC_EXTRA_TRACING=1', '-DWITH_JSC_MEMORY_PRESSURE=1', '-DWITH_REACT_INTERNAL_SETTINGS=1', '-DWITH_FB_MEMORY_PROFILING=1', '-DWITH_INSPECTOR=1', ], deps = JSC_DEPS, visibility = [ # TL;DR: If you depend on this target directly, you're gonna have a # Bad Time(TM). # # `facebook::react::JSCExecutor::initOnJSVMThread` (in `:bridge`) does # some platform-dependant setup. Exactly what setup to do is # determined by some static functors, defined in `Platform.h`, which # are initially `nullptr`. On Android, these functors are properly # assigned as part of `xreact`'s `JNI_OnLoad`. By depending directly # on the bridge, we can mess up the SO initialisation order, causing # `initOnJSVMThread` to be called before the platform-specific hooks # have been properly initialised. Bad Times(TM). # -- @ashokmenon (2017/01/03) react_native_target('jni/xreact/jni:jni'), react_native_xplat_target('cxxreact/...'), ], ) ) if THIS_IS_FBOBJC: if should_use_dependency_aggregation(): INSPECTOR_FLAGS = [] else: INSPECTOR_FLAGS = [ '-DWITH_INSPECTOR=1', ] </s> add CXX_LIBRARY_COMPILER_FLAGS += inherited_buck_flags.get_flag_value('compiler_flags') </s> add # Building is not supported in OSS right now def rn_xplat_cxx_library(name, **kwargs): cxx_library(name = name) # Helper for referring to an Android RN target def react_native_target(path): return '//ReactAndroid/src/main/' + path # Helper for referring to an xplat RN target def react_native_xplat_target(path): return '//ReactCommon/' + path </s> remove def react_library(**kwargs): fb_apple_library( name = 'bridge', header_path_prefix = "cxxreact", inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, frameworks = [ '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', ], tests = [ react_native_xplat_target('cxxreact/tests:tests') ], **kwargs_add( kwargs, preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + INSPECTOR_FLAGS, deps = [ '//xplat/folly:molly', ], visibility = [ 'PUBLIC' ], ) ) cxx_library( </s> add rn_xplat_cxx_library(
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> REACT_LIBRARY_EXTRA_COMPILER_FLAGS = [] <mask> <mask> if THIS_IS_FBOBJC: <mask> include_defs("xplat//configurations/buck/apple/dependency_aggregator_defs") <mask> inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS <mask> CXX_LIBRARY_COMPILER_FLAGS = inherited_buck_flags.get_flag_value('compiler_flags') <mask> REACT_LIBRARY_EXTRA_COMPILER_FLAGS = ['-Wno-shadow', '-Wno-missing-prototypes', '-Wno-global-constructors'] <mask> <mask> def kwargs_add(base_kwargs, **new_kwargs): </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove REACT_LIBRARY_EXTRA_COMPILER_FLAGS = [] </s> add CXX_LIBRARY_COMPILER_FLAGS = [ "-std=c++14", "-Wall", ] </s> remove CXX_LIBRARY_COMPILER_FLAGS = [] </s> add include_defs("//ReactCommon/DEFS") </s> remove CXX_LIBRARY_COMPILER_FLAGS = inherited_buck_flags.get_flag_value('compiler_flags') REACT_LIBRARY_EXTRA_COMPILER_FLAGS = ['-Wno-shadow', '-Wno-missing-prototypes', '-Wno-global-constructors'] def kwargs_add(base_kwargs, **new_kwargs): ret_kwargs = dict(base_kwargs) for name, add_value in new_kwargs.iteritems(): if name in ret_kwargs: # Don't use +=, it will modify base_kwargs ret_kwargs[name] = ret_kwargs[name] + add_value else: ret_kwargs[name] = add_value return ret_kwargs if THIS_IS_FBANDROID: include_defs('//ReactAndroid/DEFS') def react_library(**kwargs): kwargs = kwargs_add( kwargs, compiler_flags = [ '-Wno-pessimizing-move', ], deps = [ '//xplat/folly:molly' ]) cxx_library( name = 'bridge', **kwargs_add( kwargs, preprocessor_flags = [ '-DWITH_JSC_EXTRA_TRACING=1', '-DWITH_JSC_MEMORY_PRESSURE=1', '-DWITH_REACT_INTERNAL_SETTINGS=1', '-DWITH_FB_MEMORY_PROFILING=1', '-DWITH_INSPECTOR=1', ], deps = JSC_DEPS, visibility = [ # TL;DR: If you depend on this target directly, you're gonna have a # Bad Time(TM). # # `facebook::react::JSCExecutor::initOnJSVMThread` (in `:bridge`) does # some platform-dependant setup. Exactly what setup to do is # determined by some static functors, defined in `Platform.h`, which # are initially `nullptr`. On Android, these functors are properly # assigned as part of `xreact`'s `JNI_OnLoad`. By depending directly # on the bridge, we can mess up the SO initialisation order, causing # `initOnJSVMThread` to be called before the platform-specific hooks # have been properly initialised. Bad Times(TM). # -- @ashokmenon (2017/01/03) react_native_target('jni/xreact/jni:jni'), react_native_xplat_target('cxxreact/...'), ], ) ) if THIS_IS_FBOBJC: if should_use_dependency_aggregation(): INSPECTOR_FLAGS = [] else: INSPECTOR_FLAGS = [ '-DWITH_INSPECTOR=1', ] </s> add CXX_LIBRARY_COMPILER_FLAGS += inherited_buck_flags.get_flag_value('compiler_flags') </s> add INSPECTOR_FLAGS = [] DEBUG_PREPROCESSOR_FLAGS = [] STATIC_LIBRARY_IOS_FLAGS = [] JSC_DEPS = [] JSC_INTERNAL_DEPS = [] THIS_IS_FBOBJC = False THIS_IS_FBANDROID = False </s> add # Building is not supported in OSS right now def rn_xplat_cxx_library(name, **kwargs): cxx_library(name = name) # Helper for referring to an Android RN target def react_native_target(path): return '//ReactAndroid/src/main/' + path # Helper for referring to an xplat RN target def react_native_xplat_target(path): return '//ReactCommon/' + path </s> remove def react_library(**kwargs): fb_apple_library( name = 'bridge', header_path_prefix = "cxxreact", inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, frameworks = [ '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', ], tests = [ react_native_xplat_target('cxxreact/tests:tests') ], **kwargs_add( kwargs, preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + INSPECTOR_FLAGS, deps = [ '//xplat/folly:molly', ], visibility = [ 'PUBLIC' ], ) ) cxx_library( </s> add rn_xplat_cxx_library(
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep
<mask> if THIS_IS_FBOBJC: <mask> include_defs("xplat//configurations/buck/apple/dependency_aggregator_defs") <mask> inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS <mask> CXX_LIBRARY_COMPILER_FLAGS = inherited_buck_flags.get_flag_value('compiler_flags') <mask> REACT_LIBRARY_EXTRA_COMPILER_FLAGS = ['-Wno-shadow', '-Wno-missing-prototypes', '-Wno-global-constructors'] <mask> <mask> def kwargs_add(base_kwargs, **new_kwargs): <mask> ret_kwargs = dict(base_kwargs) <mask> for name, add_value in new_kwargs.iteritems(): <mask> if name in ret_kwargs: <mask> # Don't use +=, it will modify base_kwargs <mask> ret_kwargs[name] = ret_kwargs[name] + add_value <mask> else: <mask> ret_kwargs[name] = add_value <mask> return ret_kwargs <mask> <mask> if THIS_IS_FBANDROID: <mask> include_defs('//ReactAndroid/DEFS') <mask> <mask> def react_library(**kwargs): <mask> kwargs = kwargs_add( <mask> kwargs, <mask> compiler_flags = [ <mask> '-Wno-pessimizing-move', <mask> ], <mask> deps = [ <mask> '//xplat/folly:molly' <mask> ]) <mask> <mask> cxx_library( <mask> name = 'bridge', <mask> **kwargs_add( <mask> kwargs, <mask> preprocessor_flags = [ <mask> '-DWITH_JSC_EXTRA_TRACING=1', <mask> '-DWITH_JSC_MEMORY_PRESSURE=1', <mask> '-DWITH_REACT_INTERNAL_SETTINGS=1', <mask> '-DWITH_FB_MEMORY_PROFILING=1', <mask> '-DWITH_INSPECTOR=1', <mask> ], <mask> deps = JSC_DEPS, <mask> visibility = [ <mask> # TL;DR: If you depend on this target directly, you're gonna have a <mask> # Bad Time(TM). <mask> # <mask> # `facebook::react::JSCExecutor::initOnJSVMThread` (in `:bridge`) does <mask> # some platform-dependant setup. Exactly what setup to do is <mask> # determined by some static functors, defined in `Platform.h`, which <mask> # are initially `nullptr`. On Android, these functors are properly <mask> # assigned as part of `xreact`'s `JNI_OnLoad`. By depending directly <mask> # on the bridge, we can mess up the SO initialisation order, causing <mask> # `initOnJSVMThread` to be called before the platform-specific hooks <mask> # have been properly initialised. Bad Times(TM). <mask> # -- @ashokmenon (2017/01/03) <mask> react_native_target('jni/xreact/jni:jni'), <mask> react_native_xplat_target('cxxreact/...'), <mask> ], <mask> ) <mask> ) <mask> <mask> if THIS_IS_FBOBJC: <mask> <mask> if should_use_dependency_aggregation(): <mask> INSPECTOR_FLAGS = [] <mask> else: <mask> INSPECTOR_FLAGS = [ '-DWITH_INSPECTOR=1', ] <mask> <mask> def react_library(**kwargs): <mask> fb_apple_library( <mask> name = 'bridge', <mask> header_path_prefix = "cxxreact", <mask> inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, <mask> frameworks = [ <mask> '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', <mask> ], <mask> tests = [ <mask> react_native_xplat_target('cxxreact/tests:tests') <mask> ], <mask> **kwargs_add( <mask> kwargs, <mask> preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + INSPECTOR_FLAGS, <mask> deps = [ <mask> '//xplat/folly:molly', <mask> ], <mask> visibility = [ 'PUBLIC' ], <mask> ) <mask> ) <mask> <mask> cxx_library( <mask> name = "module", <mask> compiler_flags = CXX_LIBRARY_COMPILER_FLAGS, <mask> exported_headers = [ </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove "-std=c++1y", ] + REACT_LIBRARY_EXTRA_COMPILER_FLAGS, exported_headers = CXXREACT_PUBLIC_HEADERS, </s> add ], exported_headers = dict([ ( "cxxreact/%s" % header, header, ) for header in CXXREACT_PUBLIC_HEADERS ]), fbandroid_preprocessor_flags = [ "-DWITH_JSC_EXTRA_TRACING=1", "-DWITH_JSC_MEMORY_PRESSURE=1", "-DWITH_REACT_INTERNAL_SETTINGS=1", "-DWITH_FB_MEMORY_PROFILING=1", ], fbandroid_visibility = [ # TL;DR: If you depend on this target directly, you're gonna have a # Bad Time(TM). # # `facebook::react::JSCExecutor::initOnJSVMThread` (in `:bridge`) does # some platform-dependant setup. Exactly what setup to do is # determined by some static functors, defined in `Platform.h`, which # are initially `nullptr`. On Android, these functors are properly # assigned as part of `xreact`'s `JNI_OnLoad`. By depending directly # on the bridge, we can mess up the SO initialisation order, causing # `initOnJSVMThread` to be called before the platform-specific hooks # have been properly initialised. Bad Times(TM). # -- @ashokmenon (2017/01/03) react_native_target("jni/react/jni:jni"), react_native_xplat_target("cxxreact/..."), ], fbobjc_frameworks = [ "$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework", ], fbobjc_inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, fbobjc_preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS, fbobjc_visibility = ["PUBLIC"], </s> remove srcs = [ "Dummy.cpp", ], </s> add srcs = glob(["*.cpp"]), headers = glob( ["*.h"], excludes = EXPORTED_HEADERS, ), </s> remove exported_headers = [ "CxxModule.h", "JsArgumentHelpers.h", "JsArgumentHelpers-inl.h", </s> add exported_headers = subdir_glob( [ ("", "CxxModule.h"), ("", "JsArgumentHelpers.h"), ("", "JsArgumentHelpers-inl.h"), ], prefix = "cxxreact", ), force_static = True, header_namespace = "", visibility = [ "PUBLIC", ], xcode_public_headers_symlinks = True, deps = [ "//xplat/folly:molly", ], ) rn_xplat_cxx_library( name = "jsbigstring", srcs = [ "JSBigString.cpp", </s> add # Building is not supported in OSS right now def rn_xplat_cxx_library(name, **kwargs): cxx_library(name = name) # Helper for referring to an Android RN target def react_native_target(path): return '//ReactAndroid/src/main/' + path # Helper for referring to an xplat RN target def react_native_xplat_target(path): return '//ReactCommon/' + path </s> remove # TODO(cjhopman): Remove this target (or move the xreact target to this directory). </s> add EXPORTED_HEADERS = [ "CxxModuleWrapper.h", "CxxModuleWrapperBase.h", "CxxSharedModuleWrapper.h", "JavaModuleWrapper.h", "JSLoader.h", "MethodInvoker.h", "ModuleRegistryBuilder.h", "NativeArray.h", "NativeCommon.h", "NativeMap.h", "ReadableNativeArray.h", "ReadableNativeMap.h", "WritableNativeArray.h", "WritableNativeMap.h", ]
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep keep keep keep replace replace replace replace keep keep keep keep keep
<mask> <mask> cxx_library( <mask> name = "module", <mask> compiler_flags = CXX_LIBRARY_COMPILER_FLAGS, <mask> exported_headers = [ <mask> "CxxModule.h", <mask> "JsArgumentHelpers.h", <mask> "JsArgumentHelpers-inl.h", <mask> ], <mask> force_static = True, <mask> header_namespace = "cxxreact", <mask> labels = ["accounts_for_platform_and_build_mode_flags"], <mask> visibility = [ </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove header_namespace = "cxxreact", labels = ["accounts_for_platform_and_build_mode_flags"], </s> add header_namespace = "", </s> remove def react_library(**kwargs): fb_apple_library( name = 'bridge', header_path_prefix = "cxxreact", inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, frameworks = [ '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', ], tests = [ react_native_xplat_target('cxxreact/tests:tests') ], **kwargs_add( kwargs, preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + INSPECTOR_FLAGS, deps = [ '//xplat/folly:molly', ], visibility = [ 'PUBLIC' ], ) ) cxx_library( </s> add rn_xplat_cxx_library( </s> add compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [ "-fexceptions", "-frtti", ], exported_headers = subdir_glob( [("", "JSBigString.h")], prefix = "cxxreact", ), </s> remove header_namespace = "cxxreact", </s> add header_namespace = "", </s> remove "-Wall", "-Werror", "-std=c++1y", </s> add </s> remove srcs = [ "Dummy.cpp", ], </s> add srcs = glob(["*.cpp"]), headers = glob( ["*.h"], excludes = EXPORTED_HEADERS, ),
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep keep keep add keep keep keep keep keep
<mask> name = "jsbigstring", <mask> srcs = [ <mask> "JSBigString.cpp", <mask> ], <mask> force_static = True, <mask> header_namespace = "", <mask> visibility = [ <mask> "PUBLIC", <mask> ], </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove exported_headers = [ "CxxModule.h", "JsArgumentHelpers.h", "JsArgumentHelpers-inl.h", </s> add exported_headers = subdir_glob( [ ("", "CxxModule.h"), ("", "JsArgumentHelpers.h"), ("", "JsArgumentHelpers-inl.h"), ], prefix = "cxxreact", ), force_static = True, header_namespace = "", visibility = [ "PUBLIC", ], xcode_public_headers_symlinks = True, deps = [ "//xplat/folly:molly", ], ) rn_xplat_cxx_library( name = "jsbigstring", srcs = [ "JSBigString.cpp", </s> remove header_namespace = "cxxreact", labels = ["accounts_for_platform_and_build_mode_flags"], </s> add header_namespace = "", </s> remove srcs = [ "Dummy.cpp", ], </s> add srcs = glob(["*.cpp"]), headers = glob( ["*.h"], excludes = EXPORTED_HEADERS, ), </s> remove srcs = glob(["**/*.java"]), </s> add srcs = glob( ["**/*.java"], excludes = ["SamplingProfilerPackagerMethod.java"] if IS_OSS_BUILD else [], ), </s> remove "-Wall", "-Werror", "-std=c++1y", </s> add </s> remove deps = [ react_native_target("jni/xreact/jni:jni"), ], </s> add xcode_public_headers_symlinks = True, deps = ([ "//native/third-party/android-ndk:android", "//xplat/folly:molly", "//xplat/fbgloginit:fbgloginit", "//xplat/fbsystrace:fbsystrace", react_native_xplat_target("cxxreact:bridge"), react_native_xplat_target("cxxreact:module"), FBJNI_TARGET, ] + JSC_DEPS) if not IS_OSS_BUILD else [],
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep keep keep keep replace replace keep keep keep keep keep
<mask> "JsArgumentHelpers.h", <mask> "JsArgumentHelpers-inl.h", <mask> ], <mask> force_static = True, <mask> header_namespace = "cxxreact", <mask> labels = ["accounts_for_platform_and_build_mode_flags"], <mask> visibility = [ <mask> "PUBLIC", <mask> ], <mask> xcode_public_headers_symlinks = True, <mask> deps = [ </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove exported_headers = [ "CxxModule.h", "JsArgumentHelpers.h", "JsArgumentHelpers-inl.h", </s> add exported_headers = subdir_glob( [ ("", "CxxModule.h"), ("", "JsArgumentHelpers.h"), ("", "JsArgumentHelpers-inl.h"), ], prefix = "cxxreact", ), force_static = True, header_namespace = "", visibility = [ "PUBLIC", ], xcode_public_headers_symlinks = True, deps = [ "//xplat/folly:molly", ], ) rn_xplat_cxx_library( name = "jsbigstring", srcs = [ "JSBigString.cpp", </s> add compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [ "-fexceptions", "-frtti", ], exported_headers = subdir_glob( [("", "JSBigString.h")], prefix = "cxxreact", ), </s> remove deps = [ react_native_target("jni/xreact/jni:jni"), ], </s> add xcode_public_headers_symlinks = True, deps = ([ "//native/third-party/android-ndk:android", "//xplat/folly:molly", "//xplat/fbgloginit:fbgloginit", "//xplat/fbsystrace:fbsystrace", react_native_xplat_target("cxxreact:bridge"), react_native_xplat_target("cxxreact:module"), FBJNI_TARGET, ] + JSC_DEPS) if not IS_OSS_BUILD else [], </s> add ] + INSPECTOR_FLAGS, tests = [ react_native_xplat_target("cxxreact/tests:tests"), </s> remove def react_library(**kwargs): fb_apple_library( name = 'bridge', header_path_prefix = "cxxreact", inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, frameworks = [ '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', ], tests = [ react_native_xplat_target('cxxreact/tests:tests') ], **kwargs_add( kwargs, preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + INSPECTOR_FLAGS, deps = [ '//xplat/folly:molly', ], visibility = [ 'PUBLIC' ], ) ) cxx_library( </s> add rn_xplat_cxx_library( </s> remove header_namespace = "cxxreact", </s> add header_namespace = "",
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep replace keep keep keep keep replace replace replace keep keep
<mask> <mask> cxx_library( <mask> name = "samplemodule", <mask> srcs = ["SampleCxxModule.cpp"], <mask> compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [ <mask> "-fno-omit-frame-pointer", <mask> "-Wall", <mask> "-Werror", <mask> "-std=c++1y", <mask> "-fexceptions", <mask> ], </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove compiler_flags = [ "-Wall", </s> add compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [ </s> remove excludes = ["SampleCxxModule.cpp"], </s> add excludes = [ "JSBigString.cpp", "SampleCxxModule.cpp", ], </s> add compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [ "-fexceptions", "-frtti", ], exported_headers = subdir_glob( [("", "JSBigString.h")], prefix = "cxxreact", ), </s> remove react_library( </s> add rn_xplat_cxx_library( name = "bridge", </s> remove exported_headers = [ "CxxModule.h", "JsArgumentHelpers.h", "JsArgumentHelpers-inl.h", </s> add exported_headers = subdir_glob( [ ("", "CxxModule.h"), ("", "JsArgumentHelpers.h"), ("", "JsArgumentHelpers-inl.h"), ], prefix = "cxxreact", ), force_static = True, header_namespace = "", visibility = [ "PUBLIC", ], xcode_public_headers_symlinks = True, deps = [ "//xplat/folly:molly", ], ) rn_xplat_cxx_library( name = "jsbigstring", srcs = [ "JSBigString.cpp",
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep keep keep keep replace keep keep keep keep keep
<mask> CXXREACT_PUBLIC_HEADERS = [ <mask> "CxxNativeModule.h", <mask> "Executor.h", <mask> "Instance.h", <mask> "JSBigString.h", <mask> "JSBundleType.h", <mask> "JSCExecutor.h", <mask> "JSCNativeModules.h", <mask> "JSIndexedRAMBundle.h", <mask> "JSModulesUnbundle.h", </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove def react_library(**kwargs): fb_apple_library( name = 'bridge', header_path_prefix = "cxxreact", inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, frameworks = [ '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', ], tests = [ react_native_xplat_target('cxxreact/tests:tests') ], **kwargs_add( kwargs, preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + INSPECTOR_FLAGS, deps = [ '//xplat/folly:molly', ], visibility = [ 'PUBLIC' ], ) ) cxx_library( </s> add rn_xplat_cxx_library( </s> remove exported_headers = [ "CxxModule.h", "JsArgumentHelpers.h", "JsArgumentHelpers-inl.h", </s> add exported_headers = subdir_glob( [ ("", "CxxModule.h"), ("", "JsArgumentHelpers.h"), ("", "JsArgumentHelpers-inl.h"), ], prefix = "cxxreact", ), force_static = True, header_namespace = "", visibility = [ "PUBLIC", ], xcode_public_headers_symlinks = True, deps = [ "//xplat/folly:molly", ], ) rn_xplat_cxx_library( name = "jsbigstring", srcs = [ "JSBigString.cpp", </s> add ] + INSPECTOR_FLAGS, tests = [ react_native_xplat_target("cxxreact/tests:tests"), </s> remove "-std=c++1y", ] + REACT_LIBRARY_EXTRA_COMPILER_FLAGS, exported_headers = CXXREACT_PUBLIC_HEADERS, </s> add ], exported_headers = dict([ ( "cxxreact/%s" % header, header, ) for header in CXXREACT_PUBLIC_HEADERS ]), fbandroid_preprocessor_flags = [ "-DWITH_JSC_EXTRA_TRACING=1", "-DWITH_JSC_MEMORY_PRESSURE=1", "-DWITH_REACT_INTERNAL_SETTINGS=1", "-DWITH_FB_MEMORY_PROFILING=1", ], fbandroid_visibility = [ # TL;DR: If you depend on this target directly, you're gonna have a # Bad Time(TM). # # `facebook::react::JSCExecutor::initOnJSVMThread` (in `:bridge`) does # some platform-dependant setup. Exactly what setup to do is # determined by some static functors, defined in `Platform.h`, which # are initially `nullptr`. On Android, these functors are properly # assigned as part of `xreact`'s `JNI_OnLoad`. By depending directly # on the bridge, we can mess up the SO initialisation order, causing # `initOnJSVMThread` to be called before the platform-specific hooks # have been properly initialised. Bad Times(TM). # -- @ashokmenon (2017/01/03) react_native_target("jni/react/jni:jni"), react_native_xplat_target("cxxreact/..."), ], fbobjc_frameworks = [ "$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework", ], fbobjc_inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, fbobjc_preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS, fbobjc_visibility = ["PUBLIC"], </s> add compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [ "-fexceptions", "-frtti", ], exported_headers = subdir_glob( [("", "JSBigString.h")], prefix = "cxxreact", ), </s> add react_native_dep("java/com/facebook/jni:jni"), react_native_dep("java/com/facebook/proguard/annotations:annotations"),
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep replace keep keep replace keep keep keep
<mask> <mask> react_library( <mask> srcs = glob( <mask> ["*.cpp"], <mask> excludes = ["SampleCxxModule.cpp"], <mask> ), <mask> compiler_flags = [ <mask> "-Wall", </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove compiler_flags = [ "-Wall", </s> add compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [ </s> remove cxx_library( </s> add rn_xplat_cxx_library( </s> remove srcs = glob(["**/*.java"]), </s> add srcs = glob( ["**/*.java"], excludes = ["SamplingProfilerPackagerMethod.java"] if IS_OSS_BUILD else [], ), </s> remove "-Wall", "-Werror", "-std=c++1y", </s> add </s> remove srcs = [ "Dummy.cpp", ], </s> add srcs = glob(["*.cpp"]), headers = glob( ["*.h"], excludes = EXPORTED_HEADERS, ),
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep keep keep keep replace replace keep keep replace replace replace keep keep
<mask> srcs = glob( <mask> ["*.cpp"], <mask> excludes = ["SampleCxxModule.cpp"], <mask> ), <mask> compiler_flags = [ <mask> "-Wall", <mask> "-fexceptions", <mask> "-frtti", <mask> "-std=c++1y", <mask> ] + REACT_LIBRARY_EXTRA_COMPILER_FLAGS, <mask> exported_headers = CXXREACT_PUBLIC_HEADERS, <mask> force_static = True, <mask> header_namespace = "cxxreact", </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep keep keep keep replace keep keep keep keep keep
<mask> "-std=c++1y", <mask> ] + REACT_LIBRARY_EXTRA_COMPILER_FLAGS, <mask> exported_headers = CXXREACT_PUBLIC_HEADERS, <mask> force_static = True, <mask> header_namespace = "cxxreact", <mask> headers = glob( <mask> ["*.h"], <mask> excludes = CXXREACT_PUBLIC_HEADERS, <mask> ), <mask> preprocessor_flags = [ </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove compiler_flags = [ "-Wall", </s> add compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [ </s> remove exported_headers = [ "CxxModule.h", "JsArgumentHelpers.h", "JsArgumentHelpers-inl.h", </s> add exported_headers = subdir_glob( [ ("", "CxxModule.h"), ("", "JsArgumentHelpers.h"), ("", "JsArgumentHelpers-inl.h"), ], prefix = "cxxreact", ), force_static = True, header_namespace = "", visibility = [ "PUBLIC", ], xcode_public_headers_symlinks = True, deps = [ "//xplat/folly:molly", ], ) rn_xplat_cxx_library( name = "jsbigstring", srcs = [ "JSBigString.cpp", </s> add compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [ "-fexceptions", "-frtti", ], exported_headers = subdir_glob( [("", "JSBigString.h")], prefix = "cxxreact", ), </s> remove "-std=c++1y", ] + REACT_LIBRARY_EXTRA_COMPILER_FLAGS, exported_headers = CXXREACT_PUBLIC_HEADERS, </s> add ], exported_headers = dict([ ( "cxxreact/%s" % header, header, ) for header in CXXREACT_PUBLIC_HEADERS ]), fbandroid_preprocessor_flags = [ "-DWITH_JSC_EXTRA_TRACING=1", "-DWITH_JSC_MEMORY_PRESSURE=1", "-DWITH_REACT_INTERNAL_SETTINGS=1", "-DWITH_FB_MEMORY_PROFILING=1", ], fbandroid_visibility = [ # TL;DR: If you depend on this target directly, you're gonna have a # Bad Time(TM). # # `facebook::react::JSCExecutor::initOnJSVMThread` (in `:bridge`) does # some platform-dependant setup. Exactly what setup to do is # determined by some static functors, defined in `Platform.h`, which # are initially `nullptr`. On Android, these functors are properly # assigned as part of `xreact`'s `JNI_OnLoad`. By depending directly # on the bridge, we can mess up the SO initialisation order, causing # `initOnJSVMThread` to be called before the platform-specific hooks # have been properly initialised. Bad Times(TM). # -- @ashokmenon (2017/01/03) react_native_target("jni/react/jni:jni"), react_native_xplat_target("cxxreact/..."), ], fbobjc_frameworks = [ "$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework", ], fbobjc_inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, fbobjc_preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS, fbobjc_visibility = ["PUBLIC"], </s> remove srcs = [ "Dummy.cpp", ], </s> add srcs = glob(["*.cpp"]), headers = glob( ["*.h"], excludes = EXPORTED_HEADERS, ), </s> remove header_namespace = "cxxreact", labels = ["accounts_for_platform_and_build_mode_flags"], </s> add header_namespace = "",
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep keep add keep keep keep keep keep keep
<mask> preprocessor_flags = [ <mask> "-DLOG_TAG=\"ReactNative\"", <mask> "-DWITH_FBSYSTRACE=1", <mask> ], <mask> xcode_public_headers_symlinks = True, <mask> deps = [ <mask> ":module", <mask> ":jsbigstring", <mask> "//xplat/fbsystrace:fbsystrace", </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove deps = [ react_native_target("jni/xreact/jni:jni"), ], </s> add xcode_public_headers_symlinks = True, deps = ([ "//native/third-party/android-ndk:android", "//xplat/folly:molly", "//xplat/fbgloginit:fbgloginit", "//xplat/fbsystrace:fbsystrace", react_native_xplat_target("cxxreact:bridge"), react_native_xplat_target("cxxreact:module"), FBJNI_TARGET, ] + JSC_DEPS) if not IS_OSS_BUILD else [], </s> add ":jsbigstring", </s> remove header_namespace = "cxxreact", labels = ["accounts_for_platform_and_build_mode_flags"], </s> add header_namespace = "", </s> remove exported_headers = [ "CxxModule.h", "JsArgumentHelpers.h", "JsArgumentHelpers-inl.h", </s> add exported_headers = subdir_glob( [ ("", "CxxModule.h"), ("", "JsArgumentHelpers.h"), ("", "JsArgumentHelpers-inl.h"), ], prefix = "cxxreact", ), force_static = True, header_namespace = "", visibility = [ "PUBLIC", ], xcode_public_headers_symlinks = True, deps = [ "//xplat/folly:molly", ], ) rn_xplat_cxx_library( name = "jsbigstring", srcs = [ "JSBigString.cpp", </s> remove def react_library(**kwargs): fb_apple_library( name = 'bridge', header_path_prefix = "cxxreact", inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, frameworks = [ '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', ], tests = [ react_native_xplat_target('cxxreact/tests:tests') ], **kwargs_add( kwargs, preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + INSPECTOR_FLAGS, deps = [ '//xplat/folly:molly', ], visibility = [ 'PUBLIC' ], ) ) cxx_library( </s> add rn_xplat_cxx_library( </s> add compiler_flags = CXX_LIBRARY_COMPILER_FLAGS + [ "-fexceptions", "-frtti", ], exported_headers = subdir_glob( [("", "JSBigString.h")], prefix = "cxxreact", ),
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep add keep keep keep keep keep keep
<mask> deps = [ <mask> ":module", <mask> "//xplat/fbsystrace:fbsystrace", <mask> "//xplat/folly:molly", <mask> react_native_xplat_target("jschelpers:jschelpers"), <mask> react_native_xplat_target("microprofiler:microprofiler"), <mask> ] + JSC_DEPS, <mask> ) </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove ], </s> add ] + JSC_DEPS, </s> add "//xplat/folly:molly", </s> add ] + INSPECTOR_FLAGS, tests = [ react_native_xplat_target("cxxreact/tests:tests"), </s> remove deps = [ react_native_target("jni/xreact/jni:jni"), ], </s> add xcode_public_headers_symlinks = True, deps = ([ "//native/third-party/android-ndk:android", "//xplat/folly:molly", "//xplat/fbgloginit:fbgloginit", "//xplat/fbsystrace:fbsystrace", react_native_xplat_target("cxxreact:bridge"), react_native_xplat_target("cxxreact:module"), FBJNI_TARGET, ] + JSC_DEPS) if not IS_OSS_BUILD else [], </s> remove def react_library(**kwargs): fb_apple_library( name = 'bridge', header_path_prefix = "cxxreact", inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, frameworks = [ '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', ], tests = [ react_native_xplat_target('cxxreact/tests:tests') ], **kwargs_add( kwargs, preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + INSPECTOR_FLAGS, deps = [ '//xplat/folly:molly', ], visibility = [ 'PUBLIC' ], ) ) cxx_library( </s> add rn_xplat_cxx_library( </s> remove cxx_library( </s> add rn_xplat_cxx_library(
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep add keep keep keep keep
<mask> ":jsbigstring", <mask> "//xplat/fbsystrace:fbsystrace", <mask> react_native_xplat_target("jschelpers:jschelpers"), <mask> react_native_xplat_target("microprofiler:microprofiler"), <mask> ] + JSC_DEPS, <mask> ) </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add ":jsbigstring", </s> remove ], </s> add ] + JSC_DEPS, </s> add ] + INSPECTOR_FLAGS, tests = [ react_native_xplat_target("cxxreact/tests:tests"), </s> remove deps = [ react_native_target("jni/xreact/jni:jni"), ], </s> add xcode_public_headers_symlinks = True, deps = ([ "//native/third-party/android-ndk:android", "//xplat/folly:molly", "//xplat/fbgloginit:fbgloginit", "//xplat/fbsystrace:fbsystrace", react_native_xplat_target("cxxreact:bridge"), react_native_xplat_target("cxxreact:module"), FBJNI_TARGET, ] + JSC_DEPS) if not IS_OSS_BUILD else [], </s> remove ], </s> add ] + ([react_native_target("jni/packagerconnection:jni")] if not IS_OSS_BUILD else []), </s> remove def react_library(**kwargs): fb_apple_library( name = 'bridge', header_path_prefix = "cxxreact", inherited_buck_flags = STATIC_LIBRARY_IOS_FLAGS, frameworks = [ '$SDKROOT/System/Library/Frameworks/JavaScriptCore.framework', ], tests = [ react_native_xplat_target('cxxreact/tests:tests') ], **kwargs_add( kwargs, preprocessor_flags = DEBUG_PREPROCESSOR_FLAGS + INSPECTOR_FLAGS, deps = [ '//xplat/folly:molly', ], visibility = [ 'PUBLIC' ], ) ) cxx_library( </s> add rn_xplat_cxx_library(
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep keep keep keep replace keep
<mask> ":module", <mask> "//xplat/fbsystrace:fbsystrace", <mask> react_native_xplat_target("jschelpers:jschelpers"), <mask> react_native_xplat_target("microprofiler:microprofiler"), <mask> ], <mask> ) </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add ":jsbigstring", </s> add "//xplat/folly:molly", </s> add ] + INSPECTOR_FLAGS, tests = [ react_native_xplat_target("cxxreact/tests:tests"), </s> remove deps = [ react_native_target("jni/xreact/jni:jni"), ], </s> add xcode_public_headers_symlinks = True, deps = ([ "//native/third-party/android-ndk:android", "//xplat/folly:molly", "//xplat/fbgloginit:fbgloginit", "//xplat/fbsystrace:fbsystrace", react_native_xplat_target("cxxreact:bridge"), react_native_xplat_target("cxxreact:module"), FBJNI_TARGET, ] + JSC_DEPS) if not IS_OSS_BUILD else [], </s> remove react_native_target("java/com/facebook/react/bridge:bridge"), </s> add </s> add react_native_target("java/com/facebook/react/util:util"),
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/BUCK
keep keep keep keep replace keep keep keep keep keep
<mask> #include <iterator> <mask> <mask> #include <folly/json.h> <mask> <mask> #include <cxxreact/JsArgumentHelpers.h> <mask> <mask> using facebook::xplat::module::CxxModule; <mask> <mask> namespace facebook { <mask> namespace react { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove #include <sys/system_properties.h> </s> add # include <fb/Build.h> </s> add #if defined(__ANDROID__) && defined(__ARM_ARCH_5TE__) && !defined(FBJNI_NO_EXCEPTION_PTR) // ARMv5 NDK does not support exception_ptr so we cannot use that when building for it. #define FBJNI_NO_EXCEPTION_PTR #endif </s> add #ifdef USE_LYRA #include <fb/lyra.h> #include <fb/lyra_exceptions.h> #endif </s> remove #include <fb/StaticInitialized.h> </s> add </s> remove #include <pthread.h> </s> add </s> remove class Value; class Context; class JSException : public std::exception { public: explicit JSException(const char* msg) : msg_(msg), stack_("") {} JSException(const char* msg, const char* stack) : msg_(msg), stack_(stack) {} const std::string& getStack() const { return stack_; } virtual const char* what() const noexcept override { return msg_.c_str(); } </s> add #ifndef RN_EXPORT #define RN_EXPORT __attribute__((visibility("default"))) #endif
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/CxxNativeModule.cpp
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> return constants; <mask> } <mask> <mask> void CxxNativeModule::invoke(unsigned int reactMethodId, folly::dynamic&& params) { <mask> if (reactMethodId >= methods_.size()) { <mask> throw std::invalid_argument(folly::to<std::string>("methodId ", reactMethodId, <mask> " out of range [0..", methods_.size(), "]")); <mask> } <mask> if (!params.isArray()) { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove void invoke(unsigned int reactMethodId, folly::dynamic&& params) override; </s> add void invoke(unsigned int reactMethodId, folly::dynamic&& params, int callId) override; </s> remove throw new JavascriptException(stackTraceToString(title, details)); </s> add throw new JavascriptException(JSStackTrace.format(title, details)); </s> remove mShakeListener.onShake(); </s> add if (currentTimestamp - mLastShakeTimestamp >= VISIBLE_TIME_RANGE_NS) { mNumShakes++; } mLastShakeTimestamp = currentTimestamp; if (mNumShakes >= mMinNumShakes) { mNumShakes = 0; mLastShakeTimestamp = 0; mShakeListener.onShake(); } } if (currentTimestamp - mLastShakeTimestamp > SHAKING_WINDOW_NS) { mNumShakes = 0; mLastShakeTimestamp = 0; </s> remove public synchronized void sendMessage(RequestBody message) throws IOException { </s> add public synchronized void sendMessage(String message) throws IOException { if (mWebSocket != null) { mWebSocket.send(message); } else { throw new ClosedChannelException(); } } public synchronized void sendMessage(ByteString message) throws IOException { </s> add @ReactProp(name = "thirdPartyCookiesEnabled") public void setThirdPartyCookiesEnabled(WebView view, boolean enabled) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { CookieManager.getInstance().setAcceptThirdPartyCookies(view, enabled); } } </s> remove std::string exceptionText = Value(m_context, exn).toString().str(); throwJSExecutionException("Failed to set property: %s", exceptionText.c_str()); </s> add throw JSException(m_context, exn, folly::to<std::string>( "Failed to set property '", propName.str(), "'").c_str()); } } void Object::setPropertyAtIndex(unsigned int index, const Value& value) { JSValueRef exn = nullptr; JSC_JSObjectSetPropertyAtIndex(m_context, m_obj, index, value, &exn); if (exn) { throw JSException(m_context, exn, folly::to<std::string>( "Failed to set property at index ", index).c_str());
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/CxxNativeModule.cpp
keep keep keep keep replace keep keep keep keep keep
<mask> // choice. It would be nice to be able to get what() and the C++ <mask> // stack. I'm told that will be possible in the future. TODO <mask> // mhorowitz #7128529: convert C++ exceptions to Java <mask> <mask> messageQueueThread_->runOnQueue([method, params=std::move(params), first, second] () { <mask> try { <mask> method.func(std::move(params), first, second); <mask> } catch (const facebook::xplat::JsArgumentException& ex) { <mask> throw; <mask> } catch (...) { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove // The implementation std::rethrow_if_nested uses a dynamic_cast to determine // if the exception is a nested_exception. If the exception is from a library // built with -fno-rtti, then that will crash. This avoids that. void rethrow_if_nested() { </s> add // For each exception in the chain of the exception_ptr argument, func // will be called with that exception (in reverse order, i.e. innermost first). #ifndef FBJNI_NO_EXCEPTION_PTR void denest(const std::function<void(std::exception_ptr)>& func, std::exception_ptr ptr) { FBASSERT(ptr); </s> remove throw; } catch (const std::exception& e) { try { rethrow_if_nested(); } catch (...) { denest(func); } func(); </s> add std::rethrow_exception(ptr); addCppStack = false; } catch (const JniException& ex) { current = ex.getThrowable(); } catch (const std::ios_base::failure& ex) { current = JIOException::create(ex.what()); } catch (const std::bad_alloc& ex) { current = JOutOfMemoryError::create(ex.what()); } catch (const std::out_of_range& ex) { current = JArrayIndexOutOfBoundsException::create(ex.what()); } catch (const std::system_error& ex) { current = JCppSystemErrorException::create(ex); } catch (const std::runtime_error& ex) { current = JRuntimeException::create(ex.what()); } catch (const std::exception& ex) { current = JCppException::create(ex.what()); } catch (const char* msg) { current = JUnknownCppException::create(msg); </s> remove // For each exception in the chain of the currently handled exception, func // will be called with that exception as the currently handled exception (in // reverse order, i.e. innermost first). void denest(std::function<void()> func) { </s> add local_ref<JThrowable> convertCppExceptionToJavaException(std::exception_ptr ptr) { FBASSERT(ptr); local_ref<JThrowable> current; bool addCppStack = true; </s> remove throw; </s> add std::rethrow_exception(ptr); </s> remove e.rethrow_nested(); </s> add denest(func, e.nested_ptr()); </s> remove denest(func); setJavaExceptionAndAbortOnFailure(previous); } catch (std::exception& e) { FBLOGE("unexpected exception in translatePendingCppExceptionToJavaException: %s", e.what()); // rethrow the exception and let the noexcept handling abort. throw; </s> add #ifndef FBJNI_NO_EXCEPTION_PTR auto exc = getJavaExceptionForCppException(std::current_exception()); #else auto exc = JUnknownCppException::create(); #endif setJavaExceptionAndAbortOnFailure(exc);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/CxxNativeModule.cpp
keep keep keep keep replace keep keep keep keep keep
<mask> <mask> std::string getName() override; <mask> std::vector<MethodDescriptor> getMethods() override; <mask> folly::dynamic getConstants() override; <mask> void invoke(unsigned int reactMethodId, folly::dynamic&& params) override; <mask> MethodCallResult callSerializableNativeHook(unsigned int hookId, folly::dynamic&& args) override; <mask> <mask> private: <mask> void lazyInit(); <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove void CxxNativeModule::invoke(unsigned int reactMethodId, folly::dynamic&& params) { </s> add void CxxNativeModule::invoke(unsigned int reactMethodId, folly::dynamic&& params, int callId) { </s> remove const YGNodeRef node, YGLogLevel level, const char *format, va_list args) { </s> add const YGNodeRef node, YGLogLevel level, const char *format, va_list args) { </s> remove Value getPropertyAtIndex(unsigned index) const; void setProperty(const String& propName, const Value& value) const; void setProperty(const char *propName, const Value& value) const; </s> add Value getPropertyAtIndex(unsigned int index) const; void setProperty(const String& propName, const Value& value); void setProperty(const char *propName, const Value& value); void setPropertyAtIndex(unsigned int index, const Value& value); </s> remove int rootTag = uiManager.addMeasuredRootView(rootView); </s> add int rootTag = uiManager.addRootView(rootView); </s> remove private: std::string msg_; std::string stack_; }; </s> add class Value; </s> remove public interface BundleDownloadCallback { void onSuccess(); void onProgress(@Nullable String status, @Nullable Integer done, @Nullable Integer total); void onFailure(Exception cause); } </s> add
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/cxxreact/CxxNativeModule.h
keep keep keep keep replace replace keep keep keep keep keep
<mask> Value Object::getPropertyAtIndex(unsigned index) const { <mask> JSValueRef exn; <mask> JSValueRef property = JSC_JSObjectGetPropertyAtIndex(m_context, m_obj, index, &exn); <mask> if (!property) { <mask> std::string exceptionText = Value(m_context, exn).toString().str(); <mask> throwJSExecutionException("Failed to get property at index %u: %s", index, exceptionText.c_str()); <mask> } <mask> return Value(m_context, property); <mask> } <mask> <mask> Value Object::getProperty(const char *propName) const { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove std::string exceptionText = Value(m_context, exn).toString().str(); throwJSExecutionException("Failed to set property: %s", exceptionText.c_str()); </s> add throw JSException(m_context, exn, folly::to<std::string>( "Failed to set property '", propName.str(), "'").c_str()); } } void Object::setPropertyAtIndex(unsigned int index, const Value& value) { JSValueRef exn = nullptr; JSC_JSObjectSetPropertyAtIndex(m_context, m_obj, index, value, &exn); if (exn) { throw JSException(m_context, exn, folly::to<std::string>( "Failed to set property at index ", index).c_str()); </s> remove void Object::setProperty(const String& propName, const Value& value) const { JSValueRef exn = NULL; </s> add void Object::setProperty(const String& propName, const Value& value) { JSValueRef exn = nullptr; </s> remove Value getPropertyAtIndex(unsigned index) const; void setProperty(const String& propName, const Value& value) const; void setProperty(const char *propName, const Value& value) const; </s> add Value getPropertyAtIndex(unsigned int index) const; void setProperty(const String& propName, const Value& value); void setProperty(const char *propName, const Value& value); void setPropertyAtIndex(unsigned int index, const Value& value); </s> remove __attribute__((visibility("default"))) std::string toJSONString(unsigned indent = 0) const; __attribute__((visibility("default"))) static Value fromJSON(JSContextRef ctx, const String& json); __attribute__((visibility("default"))) static JSValueRef fromDynamic(JSContextRef ctx, const folly::dynamic& value); __attribute__((visibility("default"))) JSContextRef context() const; protected: </s> add RN_EXPORT std::string toJSONString(unsigned indent = 0) const; RN_EXPORT static Value fromJSON(const String& json); RN_EXPORT static Value fromDynamic(JSContextRef ctx, const folly::dynamic& value); RN_EXPORT JSContextRef context() const; private: </s> remove void Object::setProperty(const char *propName, const Value& value) const { </s> add void Object::setProperty(const char *propName, const Value& value) { </s> remove static Value makeError(JSContextRef ctx, const char *error); </s> add RN_EXPORT static Value makeError(JSContextRef ctx, const char *error);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.cpp
keep keep replace replace keep keep replace replace keep
<mask> } <mask> <mask> void Object::setProperty(const String& propName, const Value& value) const { <mask> JSValueRef exn = NULL; <mask> JSC_JSObjectSetProperty(m_context, m_obj, propName, value, kJSPropertyAttributeNone, &exn); <mask> if (exn) { <mask> std::string exceptionText = Value(m_context, exn).toString().str(); <mask> throwJSExecutionException("Failed to set property: %s", exceptionText.c_str()); <mask> } </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove void Object::setProperty(const char *propName, const Value& value) const { </s> add void Object::setProperty(const char *propName, const Value& value) { </s> remove std::string exceptionText = Value(m_context, exn).toString().str(); throwJSExecutionException("Failed to get property at index %u: %s", index, exceptionText.c_str()); </s> add throw JSException(m_context, exn, folly::to<std::string>( "Failed to get property at index ", index).c_str()); </s> remove Value getPropertyAtIndex(unsigned index) const; void setProperty(const String& propName, const Value& value) const; void setProperty(const char *propName, const Value& value) const; </s> add Value getPropertyAtIndex(unsigned int index) const; void setProperty(const String& propName, const Value& value); void setProperty(const char *propName, const Value& value); void setPropertyAtIndex(unsigned int index, const Value& value); </s> remove __attribute__((visibility("default"))) std::string toJSONString(unsigned indent = 0) const; __attribute__((visibility("default"))) static Value fromJSON(JSContextRef ctx, const String& json); __attribute__((visibility("default"))) static JSValueRef fromDynamic(JSContextRef ctx, const folly::dynamic& value); __attribute__((visibility("default"))) JSContextRef context() const; protected: </s> add RN_EXPORT std::string toJSONString(unsigned indent = 0) const; RN_EXPORT static Value fromJSON(const String& json); RN_EXPORT static Value fromDynamic(JSContextRef ctx, const folly::dynamic& value); RN_EXPORT JSContextRef context() const; private: </s> add String& operator=(String&& other) { if (m_string) { JSC_JSStringRelease(m_context, m_string); } m_context = other.m_context; m_string = other.m_string; other.m_string = nullptr; return *this; }
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.cpp
keep keep keep keep replace keep keep keep keep keep
<mask> throwJSExecutionException("Failed to set property: %s", exceptionText.c_str()); <mask> } <mask> } <mask> <mask> void Object::setProperty(const char *propName, const Value& value) const { <mask> setProperty(String(m_context, propName), value); <mask> } <mask> <mask> std::vector<String> Object::getPropertyNames() const { <mask> auto namesRef = JSC_JSObjectCopyPropertyNames(m_context, m_obj); </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove std::string exceptionText = Value(m_context, exn).toString().str(); throwJSExecutionException("Failed to set property: %s", exceptionText.c_str()); </s> add throw JSException(m_context, exn, folly::to<std::string>( "Failed to set property '", propName.str(), "'").c_str()); } } void Object::setPropertyAtIndex(unsigned int index, const Value& value) { JSValueRef exn = nullptr; JSC_JSObjectSetPropertyAtIndex(m_context, m_obj, index, value, &exn); if (exn) { throw JSException(m_context, exn, folly::to<std::string>( "Failed to set property at index ", index).c_str()); </s> remove void Object::setProperty(const String& propName, const Value& value) const { JSValueRef exn = NULL; </s> add void Object::setProperty(const String& propName, const Value& value) { JSValueRef exn = nullptr; </s> remove Value getPropertyAtIndex(unsigned index) const; void setProperty(const String& propName, const Value& value) const; void setProperty(const char *propName, const Value& value) const; </s> add Value getPropertyAtIndex(unsigned int index) const; void setProperty(const String& propName, const Value& value); void setProperty(const char *propName, const Value& value); void setPropertyAtIndex(unsigned int index, const Value& value); </s> remove std::string exceptionText = Value(m_context, exn).toString().str(); throwJSExecutionException("Failed to get property at index %u: %s", index, exceptionText.c_str()); </s> add throw JSException(m_context, exn, folly::to<std::string>( "Failed to get property at index ", index).c_str()); </s> remove const char *YGExperimentalFeatureToString(const YGExperimentalFeature value) { switch (value) { </s> add const char *YGExperimentalFeatureToString(const YGExperimentalFeature value){ switch(value){ </s> remove const char *YGPositionTypeToString(const YGPositionType value) { switch (value) { </s> add const char *YGPositionTypeToString(const YGPositionType value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.cpp
keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep replace replace replace replace keep keep keep
<mask> <mask> class Value; <mask> class Context; <mask> <mask> class JSException : public std::exception { <mask> public: <mask> explicit JSException(const char* msg) <mask> : msg_(msg), stack_("") {} <mask> <mask> JSException(const char* msg, const char* stack) <mask> : msg_(msg), stack_(stack) {} <mask> <mask> const std::string& getStack() const { <mask> return stack_; <mask> } <mask> <mask> virtual const char* what() const noexcept override { <mask> return msg_.c_str(); <mask> } <mask> <mask> private: <mask> std::string msg_; <mask> std::string stack_; <mask> }; <mask> <mask> class String : public noncopyable { <mask> public: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> add explicit String(): m_context(nullptr), m_string(nullptr) {} // dummy empty constructor explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> add // C++ object wrapper for JSStringRef </s> remove /// Wrapper to provide functionality to jthrowable references class FBEXPORT JThrowable : public JavaClass<JThrowable, JObject, jthrowable> { public: static constexpr const char* kJavaDescriptor = "Ljava/lang/Throwable;"; local_ref<JThrowable> initCause(alias_ref<JThrowable> cause); }; </s> add </s> remove __attribute__((visibility("default"))) Value(JSContextRef context, JSValueRef value); __attribute__((visibility("default"))) Value(JSContextRef context, JSStringRef value); __attribute__((visibility("default"))) Value(Value&&); </s> add RN_EXPORT Value(JSContextRef context, JSValueRef value); RN_EXPORT Value(JSContextRef context, JSStringRef value); RN_EXPORT Value(const Value &o) : Value(o.m_context, o.m_value) {} RN_EXPORT Value(const String &o) : Value(o.context(), o) {} </s> remove return JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8); </s> add return m_string ? JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8) : false;
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep add keep keep keep keep keep keep
<mask> #endif <mask> <mask> class Value; <mask> <mask> class String : public noncopyable { <mask> public: <mask> explicit String(): m_context(nullptr), m_string(nullptr) {} // dummy empty constructor <mask> <mask> explicit String(JSContextRef context, const char* utf8) <mask> : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> add explicit String(): m_context(nullptr), m_string(nullptr) {} // dummy empty constructor explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> remove private: std::string msg_; std::string stack_; }; </s> add class Value; </s> remove class Value; class Context; class JSException : public std::exception { public: explicit JSException(const char* msg) : msg_(msg), stack_("") {} JSException(const char* msg, const char* stack) : msg_(msg), stack_(stack) {} const std::string& getStack() const { return stack_; } virtual const char* what() const noexcept override { return msg_.c_str(); } </s> add #ifndef RN_EXPORT #define RN_EXPORT __attribute__((visibility("default"))) #endif </s> remove __attribute__((visibility("default"))) Value(JSContextRef context, JSValueRef value); __attribute__((visibility("default"))) Value(JSContextRef context, JSStringRef value); __attribute__((visibility("default"))) Value(Value&&); </s> add RN_EXPORT Value(JSContextRef context, JSValueRef value); RN_EXPORT Value(JSContextRef context, JSStringRef value); RN_EXPORT Value(const Value &o) : Value(o.m_context, o.m_value) {} RN_EXPORT Value(const String &o) : Value(o.context(), o) {} </s> remove explicit weak_ref(std::nullptr_t) noexcept </s> add /* implicit */ weak_ref(std::nullptr_t) noexcept </s> remove explicit basic_strong_ref(std::nullptr_t) noexcept </s> add /* implicit */ basic_strong_ref(std::nullptr_t) noexcept
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> }; <mask> <mask> class String : public noncopyable { <mask> public: <mask> explicit String(JSContextRef context, const char* utf8) : <mask> m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) <mask> {} <mask> <mask> String(String&& other) : <mask> m_context(other.m_context), m_string(other.m_string) <mask> { <mask> other.m_string = nullptr; </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add // C++ object wrapper for JSStringRef </s> remove private: std::string msg_; std::string stack_; }; </s> add class Value; </s> remove __attribute__((visibility("default"))) Value(JSContextRef context, JSValueRef value); __attribute__((visibility("default"))) Value(JSContextRef context, JSStringRef value); __attribute__((visibility("default"))) Value(Value&&); </s> add RN_EXPORT Value(JSContextRef context, JSValueRef value); RN_EXPORT Value(JSContextRef context, JSStringRef value); RN_EXPORT Value(const Value &o) : Value(o.m_context, o.m_value) {} RN_EXPORT Value(const String &o) : Value(o.context(), o) {} </s> remove class Value; class Context; class JSException : public std::exception { public: explicit JSException(const char* msg) : msg_(msg), stack_("") {} JSException(const char* msg, const char* stack) : msg_(msg), stack_(stack) {} const std::string& getStack() const { return stack_; } virtual const char* what() const noexcept override { return msg_.c_str(); } </s> add #ifndef RN_EXPORT #define RN_EXPORT __attribute__((visibility("default"))) #endif </s> add // C++ object wrapper for JSObjectRef. The underlying JSObjectRef can be // optionally protected. You must protect the object if it is ever // heap-allocated, since otherwise you may end up with an invalid reference. </s> add // C++ object wrapper for JSValueRef. The underlying JSValueRef is not // protected, so this class should always be used as a stack-allocated // variable.
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep add keep keep keep keep
<mask> } <mask> <mask> operator JSStringRef() const { <mask> return m_string; <mask> } <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove operator const jchar* () const { </s> add const jsize length() const { return length_; } const jchar* chars() const { </s> remove const char *YGExperimentalFeatureToString(const YGExperimentalFeature value) { switch (value) { </s> add const char *YGExperimentalFeatureToString(const YGExperimentalFeature value){ switch(value){ </s> add JSContextRef context() const { return m_context; } </s> remove const char *YGDisplayToString(const YGDisplay value) { switch (value) { </s> add const char *YGDisplayToString(const YGDisplay value){ switch(value){ </s> remove const char *YGPositionTypeToString(const YGPositionType value) { switch (value) { </s> add const char *YGPositionTypeToString(const YGPositionType value){ switch(value){ </s> remove const char *YGDimensionToString(const YGDimension value) { switch (value) { </s> add const char *YGDimensionToString(const YGDimension value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep add keep keep keep keep keep
<mask> } <mask> <mask> // Length in characters <mask> size_t length() const { <mask> return m_string ? JSC_JSStringGetLength(m_context, m_string) : 0; <mask> } <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove return JSC_JSStringGetLength(m_context, m_string); </s> add return m_string ? JSC_JSStringGetLength(m_context, m_string) : 0; </s> remove // Length in bytes of a null-terminated utf8 encoded value </s> add // Length in bytes of a nul-terminated utf8 encoded value </s> remove return JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string); </s> add return m_string ? JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string) : 0; </s> remove return JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8); </s> add return m_string ? JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8) : false; </s> add if (!m_string) { return ""; } </s> remove operator const jchar* () const { </s> add const jsize length() const { return length_; } const jchar* chars() const {
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep replace keep keep replace keep keep keep keep
<mask> size_t length() const { <mask> return JSC_JSStringGetLength(m_context, m_string); <mask> } <mask> <mask> // Length in bytes of a null-terminated utf8 encoded value <mask> size_t utf8Size() const { <mask> return JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string); <mask> } <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove return JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string); </s> add return m_string ? JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string) : 0; </s> add JSContextRef context() const { return m_context; } </s> add if (!m_string) { return ""; } </s> remove // Assumes that utf8 is null terminated </s> add // Assumes that utf8 is nul-terminated </s> remove size_t JByteBuffer::getDirectSize() { </s> add size_t JByteBuffer::getDirectSize() const {
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> // Length in bytes of a null-terminated utf8 encoded value <mask> size_t utf8Size() const { <mask> return JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string); <mask> } <mask> <mask> /* <mask> * JavaScriptCore is built with strict utf16 -> utf8 conversion. <mask> * This means if JSC's built-in conversion function encounters a JavaScript </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove // Length in bytes of a null-terminated utf8 encoded value </s> add // Length in bytes of a nul-terminated utf8 encoded value </s> remove return JSC_JSStringGetLength(m_context, m_string); </s> add return m_string ? JSC_JSStringGetLength(m_context, m_string) : 0; </s> remove // Assumes that utf8 is null terminated </s> add // Assumes that utf8 is nul-terminated </s> add if (!m_string) { return ""; } </s> remove return JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8); </s> add return m_string ? JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8) : false; </s> remove throw; </s> add std::rethrow_exception(ptr);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep add keep keep keep keep
<mask> */ <mask> std::string str() const { <mask> const JSChar* utf16 = JSC_JSStringGetCharactersPtr(m_context, m_string); <mask> size_t stringLength = JSC_JSStringGetLength(m_context, m_string); <mask> return unicode::utf16toUTF8(utf16, stringLength); <mask> } </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove // Assumes that utf8 is null terminated </s> add // Assumes that utf8 is nul-terminated </s> remove return JSC_JSStringGetLength(m_context, m_string); </s> add return m_string ? JSC_JSStringGetLength(m_context, m_string) : 0; </s> remove // Length in bytes of a null-terminated utf8 encoded value </s> add // Length in bytes of a nul-terminated utf8 encoded value </s> add String& operator=(String&& other) { if (m_string) { JSC_JSStringRelease(m_context, m_string); } m_context = other.m_context; m_string = other.m_string; other.m_string = nullptr; return *this; } </s> remove return JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string); </s> add return m_string ? JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string) : 0; </s> add JSContextRef context() const { return m_context; }
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep keep replace keep keep keep keep keep
<mask> size_t stringLength = JSC_JSStringGetLength(m_context, m_string); <mask> return unicode::utf16toUTF8(utf16, stringLength); <mask> } <mask> <mask> // Assumes that utf8 is null terminated <mask> bool equals(const char* utf8) { <mask> return JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8); <mask> } <mask> <mask> // This assumes ascii is nul-terminated. </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove return JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8); </s> add return m_string ? JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8) : false; </s> add if (!m_string) { return ""; } </s> remove return JSC_JSStringGetLength(m_context, m_string); </s> add return m_string ? JSC_JSStringGetLength(m_context, m_string) : 0; </s> remove // Length in bytes of a null-terminated utf8 encoded value </s> add // Length in bytes of a nul-terminated utf8 encoded value </s> remove return JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string); </s> add return m_string ? JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string) : 0; </s> add JSContextRef context() const { return m_context; }
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> // Assumes that utf8 is null terminated <mask> bool equals(const char* utf8) { <mask> return JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8); <mask> } <mask> <mask> // This assumes ascii is nul-terminated. <mask> static String createExpectingAscii(JSContextRef context, const char* ascii, size_t len) { <mask> #if WITH_FBJSCEXTENSIONS </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove // Assumes that utf8 is null terminated </s> add // Assumes that utf8 is nul-terminated </s> remove private: std::string msg_; std::string stack_; }; </s> add class Value; </s> add // Creates a String wrapper and increases the refcount of the JSStringRef </s> remove explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> add explicit String(): m_context(nullptr), m_string(nullptr) {} // dummy empty constructor explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> remove return JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string); </s> add return m_string ? JSC_JSStringGetMaximumUTF8CStringSize(m_context, m_string) : 0; </s> remove // Length in bytes of a null-terminated utf8 encoded value </s> add // Length in bytes of a nul-terminated utf8 encoded value
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep add keep keep keep keep
<mask> static String createExpectingAscii(JSContextRef context, std::string const &ascii) { <mask> return createExpectingAscii(context, ascii.c_str(), ascii.size()); <mask> } <mask> <mask> static String ref(JSContextRef context, JSStringRef string) { <mask> return String(context, string, false); <mask> } <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add // Creates a String wrapper that takes over ownership of the string. The // JSStringRef passed in must previously have been created or retained. </s> remove return JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8); </s> add return m_string ? JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8) : false; </s> remove private: std::string msg_; std::string stack_; }; </s> add class Value; </s> remove String toString() noexcept { return String::adopt(context(), JSC_JSValueToStringCopy(context(), m_value, nullptr)); } </s> add RN_EXPORT String toString() const; </s> remove __attribute__((visibility("default"))) Value(JSContextRef context, JSValueRef value); __attribute__((visibility("default"))) Value(JSContextRef context, JSStringRef value); __attribute__((visibility("default"))) Value(Value&&); </s> add RN_EXPORT Value(JSContextRef context, JSValueRef value); RN_EXPORT Value(JSContextRef context, JSStringRef value); RN_EXPORT Value(const Value &o) : Value(o.m_context, o.m_value) {} RN_EXPORT Value(const String &o) : Value(o.context(), o) {} </s> remove static Value makeError(JSContextRef ctx, const char *error); </s> add RN_EXPORT static Value makeError(JSContextRef ctx, const char *error);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep add keep keep keep keep keep
<mask> static String ref(JSContextRef context, JSStringRef string) { <mask> return String(context, string, false); <mask> } <mask> <mask> static String adopt(JSContextRef context, JSStringRef string) { <mask> return String(context, string, true); <mask> } <mask> <mask> private: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add // Creates a String wrapper and increases the refcount of the JSStringRef </s> remove __attribute__((visibility("default"))) Value(JSContextRef context, JSValueRef value); __attribute__((visibility("default"))) Value(JSContextRef context, JSStringRef value); __attribute__((visibility("default"))) Value(Value&&); </s> add RN_EXPORT Value(JSContextRef context, JSValueRef value); RN_EXPORT Value(JSContextRef context, JSStringRef value); RN_EXPORT Value(const Value &o) : Value(o.m_context, o.m_value) {} RN_EXPORT Value(const String &o) : Value(o.context(), o) {} </s> remove private: std::string msg_; std::string stack_; }; </s> add class Value; </s> remove return JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8); </s> add return m_string ? JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8) : false; </s> add // C++ object wrapper for JSStringRef </s> remove String toString() noexcept { return String::adopt(context(), JSC_JSValueToStringCopy(context(), m_value, nullptr)); } </s> add RN_EXPORT String toString() const;
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep add keep keep keep keep keep
<mask> }; <mask> <mask> class Object : public noncopyable { <mask> public: <mask> Object(JSContextRef context, JSObjectRef obj) : <mask> m_context(context), <mask> m_obj(obj) </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> add explicit String(): m_context(nullptr), m_string(nullptr) {} // dummy empty constructor explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> remove private: std::string msg_; std::string stack_; }; </s> add class Value; </s> add // C++ object wrapper for JSStringRef </s> remove __attribute__((visibility("default"))) Value(JSContextRef context, JSValueRef value); __attribute__((visibility("default"))) Value(JSContextRef context, JSStringRef value); __attribute__((visibility("default"))) Value(Value&&); </s> add RN_EXPORT Value(JSContextRef context, JSValueRef value); RN_EXPORT Value(JSContextRef context, JSStringRef value); RN_EXPORT Value(const Value &o) : Value(o.m_context, o.m_value) {} RN_EXPORT Value(const String &o) : Value(o.context(), o) {} </s> add // C++ object wrapper for JSValueRef. The underlying JSValueRef is not // protected, so this class should always be used as a stack-allocated // variable. </s> remove class Value; class Context; class JSException : public std::exception { public: explicit JSException(const char* msg) : msg_(msg), stack_("") {} JSException(const char* msg, const char* stack) : msg_(msg), stack_(stack) {} const std::string& getStack() const { return stack_; } virtual const char* what() const noexcept override { return msg_.c_str(); } </s> add #ifndef RN_EXPORT #define RN_EXPORT __attribute__((visibility("default"))) #endif
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> Object callAsConstructor(std::initializer_list<JSValueRef> args) const; <mask> <mask> Value getProperty(const String& propName) const; <mask> Value getProperty(const char *propName) const; <mask> Value getPropertyAtIndex(unsigned index) const; <mask> void setProperty(const String& propName, const Value& value) const; <mask> void setProperty(const char *propName, const Value& value) const; <mask> std::vector<String> getPropertyNames() const; <mask> std::unordered_map<std::string, std::string> toJSONMap() const; <mask> <mask> void makeProtected() { <mask> if (!m_isProtected && m_obj) { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove __attribute__((visibility("default"))) std::string toJSONString(unsigned indent = 0) const; __attribute__((visibility("default"))) static Value fromJSON(JSContextRef ctx, const String& json); __attribute__((visibility("default"))) static JSValueRef fromDynamic(JSContextRef ctx, const folly::dynamic& value); __attribute__((visibility("default"))) JSContextRef context() const; protected: </s> add RN_EXPORT std::string toJSONString(unsigned indent = 0) const; RN_EXPORT static Value fromJSON(const String& json); RN_EXPORT static Value fromDynamic(JSContextRef ctx, const folly::dynamic& value); RN_EXPORT JSContextRef context() const; private: </s> remove String toString() noexcept { return String::adopt(context(), JSC_JSValueToStringCopy(context(), m_value, nullptr)); } </s> add RN_EXPORT String toString() const; </s> remove void Object::setProperty(const String& propName, const Value& value) const { JSValueRef exn = NULL; </s> add void Object::setProperty(const String& propName, const Value& value) { JSValueRef exn = nullptr; </s> remove Object asObject(); </s> add RN_EXPORT Object asObject() const; </s> remove uint8_t* getDirectBytes(); size_t getDirectSize(); </s> add uint8_t* getDirectBytes() const; size_t getDirectSize() const; </s> remove void Object::setProperty(const char *propName, const Value& value) const { </s> add void Object::setProperty(const char *propName, const Value& value) {
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep add keep keep keep keep keep
<mask> }; <mask> <mask> class Value : public noncopyable { <mask> public: <mask> RN_EXPORT Value(JSContextRef context, JSValueRef value); <mask> RN_EXPORT Value(JSContextRef context, JSStringRef value); <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove __attribute__((visibility("default"))) Value(JSContextRef context, JSValueRef value); __attribute__((visibility("default"))) Value(JSContextRef context, JSStringRef value); __attribute__((visibility("default"))) Value(Value&&); </s> add RN_EXPORT Value(JSContextRef context, JSValueRef value); RN_EXPORT Value(JSContextRef context, JSStringRef value); RN_EXPORT Value(const Value &o) : Value(o.m_context, o.m_value) {} RN_EXPORT Value(const String &o) : Value(o.context(), o) {} </s> remove __attribute__((visibility("default"))) std::string toJSONString(unsigned indent = 0) const; __attribute__((visibility("default"))) static Value fromJSON(JSContextRef ctx, const String& json); __attribute__((visibility("default"))) static JSValueRef fromDynamic(JSContextRef ctx, const folly::dynamic& value); __attribute__((visibility("default"))) JSContextRef context() const; protected: </s> add RN_EXPORT std::string toJSONString(unsigned indent = 0) const; RN_EXPORT static Value fromJSON(const String& json); RN_EXPORT static Value fromDynamic(JSContextRef ctx, const folly::dynamic& value); RN_EXPORT JSContextRef context() const; private: </s> add // C++ object wrapper for JSStringRef </s> remove private: std::string msg_; std::string stack_; }; </s> add class Value; </s> remove explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> add explicit String(): m_context(nullptr), m_string(nullptr) {} // dummy empty constructor explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> remove class Value; class Context; class JSException : public std::exception { public: explicit JSException(const char* msg) : msg_(msg), stack_("") {} JSException(const char* msg, const char* stack) : msg_(msg), stack_(stack) {} const std::string& getStack() const { return stack_; } virtual const char* what() const noexcept override { return msg_.c_str(); } </s> add #ifndef RN_EXPORT #define RN_EXPORT __attribute__((visibility("default"))) #endif
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> }; <mask> <mask> class Value : public noncopyable { <mask> public: <mask> __attribute__((visibility("default"))) Value(JSContextRef context, JSValueRef value); <mask> __attribute__((visibility("default"))) Value(JSContextRef context, JSStringRef value); <mask> __attribute__((visibility("default"))) Value(Value&&); <mask> <mask> Value& operator=(Value&& other) { <mask> m_context = other.m_context; <mask> m_value = other.m_value; <mask> other.m_value = NULL; </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add // C++ object wrapper for JSValueRef. The underlying JSValueRef is not // protected, so this class should always be used as a stack-allocated // variable. </s> remove __attribute__((visibility("default"))) std::string toJSONString(unsigned indent = 0) const; __attribute__((visibility("default"))) static Value fromJSON(JSContextRef ctx, const String& json); __attribute__((visibility("default"))) static JSValueRef fromDynamic(JSContextRef ctx, const folly::dynamic& value); __attribute__((visibility("default"))) JSContextRef context() const; protected: </s> add RN_EXPORT std::string toJSONString(unsigned indent = 0) const; RN_EXPORT static Value fromJSON(const String& json); RN_EXPORT static Value fromDynamic(JSContextRef ctx, const folly::dynamic& value); RN_EXPORT JSContextRef context() const; private: </s> remove explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> add explicit String(): m_context(nullptr), m_string(nullptr) {} // dummy empty constructor explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> add // C++ object wrapper for JSStringRef </s> remove private: std::string msg_; std::string stack_; }; </s> add class Value; </s> remove class Value; class Context; class JSException : public std::exception { public: explicit JSException(const char* msg) : msg_(msg), stack_("") {} JSException(const char* msg, const char* stack) : msg_(msg), stack_(stack) {} const std::string& getStack() const { return stack_; } virtual const char* what() const noexcept override { return msg_.c_str(); } </s> add #ifndef RN_EXPORT #define RN_EXPORT __attribute__((visibility("default"))) #endif
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep keep replace keep keep keep keep keep
<mask> bool isObject() const { <mask> return getType() == kJSTypeObject; <mask> } <mask> <mask> Object asObject(); <mask> <mask> bool isString() const { <mask> return getType() == kJSTypeString; <mask> } <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove String toString() noexcept { return String::adopt(context(), JSC_JSValueToStringCopy(context(), m_value, nullptr)); } </s> add RN_EXPORT String toString() const; </s> remove const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(lastWidth, width); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(lastHeight, height); </s> add const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(effectiveLastWidth, effectiveWidth); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(effectiveLastHeight, effectiveHeight); </s> remove bool JByteBuffer::isDirect() { </s> add bool JByteBuffer::isDirect() const { </s> remove const float marginColumn) { </s> add const float marginColumn, const YGConfigRef config) { </s> remove config->pointScaleFactor = 1.0f / pixelsInPoint; } } static float YGRoundValueToPixelGrid(const float value, const float pointScaleFactor, const bool forceCeil, const bool forceFloor) { float fractial = fmodf(value, pointScaleFactor); if (YGFloatsEqual(fractial, 0)) { // Still remove fractial as fractial could be extremely small. return value - fractial; } if (forceCeil) { return value - fractial + pointScaleFactor; } else if (forceFloor) { return value - fractial; } else { return value - fractial + (fractial >= pointScaleFactor / 2.0f ? pointScaleFactor : 0); </s> add config->pointScaleFactor = pixelsInPoint; </s> add UNIMPLEMENTED_SYSTEM_JSC_FUNCTION(FBJSContextStartGCTimers)
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep keep replace replace replace keep replace keep keep
<mask> bool isString() const { <mask> return getType() == kJSTypeString; <mask> } <mask> <mask> String toString() noexcept { <mask> return String::adopt(context(), JSC_JSValueToStringCopy(context(), m_value, nullptr)); <mask> } <mask> <mask> static Value makeError(JSContextRef ctx, const char *error); <mask> <mask> static Value makeNumber(JSContextRef ctx, double value) { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove Object asObject(); </s> add RN_EXPORT Object asObject() const; </s> remove __attribute__((visibility("default"))) std::string toJSONString(unsigned indent = 0) const; __attribute__((visibility("default"))) static Value fromJSON(JSContextRef ctx, const String& json); __attribute__((visibility("default"))) static JSValueRef fromDynamic(JSContextRef ctx, const folly::dynamic& value); __attribute__((visibility("default"))) JSContextRef context() const; protected: </s> add RN_EXPORT std::string toJSONString(unsigned indent = 0) const; RN_EXPORT static Value fromJSON(const String& json); RN_EXPORT static Value fromDynamic(JSContextRef ctx, const folly::dynamic& value); RN_EXPORT JSContextRef context() const; private: </s> remove void Object::setProperty(const String& propName, const Value& value) const { JSValueRef exn = NULL; </s> add void Object::setProperty(const String& propName, const Value& value) { JSValueRef exn = nullptr; </s> remove Value getPropertyAtIndex(unsigned index) const; void setProperty(const String& propName, const Value& value) const; void setProperty(const char *propName, const Value& value) const; </s> add Value getPropertyAtIndex(unsigned int index) const; void setProperty(const String& propName, const Value& value); void setProperty(const char *propName, const Value& value); void setPropertyAtIndex(unsigned int index, const Value& value); </s> remove bool JByteBuffer::isDirect() { </s> add bool JByteBuffer::isDirect() const {
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
<mask> static Value makeNull(JSContextRef ctx) { <mask> return Value(ctx, JSC_JSValueMakeNull(ctx)); <mask> } <mask> <mask> __attribute__((visibility("default"))) std::string toJSONString(unsigned indent = 0) const; <mask> __attribute__((visibility("default"))) static Value fromJSON(JSContextRef ctx, const String& json); <mask> __attribute__((visibility("default"))) static JSValueRef fromDynamic(JSContextRef ctx, const folly::dynamic& value); <mask> __attribute__((visibility("default"))) JSContextRef context() const; <mask> protected: <mask> JSContextRef m_context; <mask> JSValueRef m_value; <mask> static JSValueRef fromDynamicInner(JSContextRef ctx, const folly::dynamic& obj); <mask> }; <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove __attribute__((visibility("default"))) Value(JSContextRef context, JSValueRef value); __attribute__((visibility("default"))) Value(JSContextRef context, JSStringRef value); __attribute__((visibility("default"))) Value(Value&&); </s> add RN_EXPORT Value(JSContextRef context, JSValueRef value); RN_EXPORT Value(JSContextRef context, JSStringRef value); RN_EXPORT Value(const Value &o) : Value(o.m_context, o.m_value) {} RN_EXPORT Value(const String &o) : Value(o.context(), o) {} </s> remove String toString() noexcept { return String::adopt(context(), JSC_JSValueToStringCopy(context(), m_value, nullptr)); } </s> add RN_EXPORT String toString() const; </s> remove static Value makeError(JSContextRef ctx, const char *error); </s> add RN_EXPORT static Value makeError(JSContextRef ctx, const char *error); </s> remove Value getPropertyAtIndex(unsigned index) const; void setProperty(const String& propName, const Value& value) const; void setProperty(const char *propName, const Value& value) const; </s> add Value getPropertyAtIndex(unsigned int index) const; void setProperty(const String& propName, const Value& value); void setProperty(const char *propName, const Value& value); void setPropertyAtIndex(unsigned int index, const Value& value); </s> remove void Object::setProperty(const String& propName, const Value& value) const { JSValueRef exn = NULL; </s> add void Object::setProperty(const String& propName, const Value& value) { JSValueRef exn = nullptr; </s> remove std::string exceptionText = Value(m_context, exn).toString().str(); throwJSExecutionException("Failed to get property at index %u: %s", index, exceptionText.c_str()); </s> add throw JSException(m_context, exn, folly::to<std::string>( "Failed to get property at index ", index).c_str());
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/Value.h
keep keep add keep keep keep keep keep keep
<mask> <mask> UNIMPLEMENTED_SYSTEM_JSC_FUNCTION(configureJSCForIOS) <mask> <mask> bool JSSamplingProfilerEnabled() { <mask> return false; <mask> } <mask> <mask> const int32_t JSNoBytecodeFileFormatVersion = -1; <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(lastWidth, width); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(lastHeight, height); </s> add const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(effectiveLastWidth, effectiveWidth); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(effectiveLastHeight, effectiveHeight); </s> remove const float marginColumn) { </s> add const float marginColumn, const YGConfigRef config) { </s> remove bool JByteBuffer::isDirect() { </s> add bool JByteBuffer::isDirect() const { </s> add bool useRoundedComparison = config != NULL && config->pointScaleFactor != 0; const float effectiveWidth = useRoundedComparison ? YGRoundValueToPixelGrid(width, config->pointScaleFactor, false, false) : width; const float effectiveHeight = useRoundedComparison ? YGRoundValueToPixelGrid(height, config->pointScaleFactor, false, false) : height; const float effectiveLastWidth = useRoundedComparison ? YGRoundValueToPixelGrid(lastWidth, config->pointScaleFactor, false, false) : lastWidth; const float effectiveLastHeight = useRoundedComparison ? YGRoundValueToPixelGrid(lastHeight, config->pointScaleFactor, false, false) : lastHeight; </s> remove Object asObject(); </s> add RN_EXPORT Object asObject() const; </s> remove return JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8); </s> add return m_string ? JSC_JSStringIsEqualToUTF8CString(m_context, m_string, utf8) : false;
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/systemJSCWrapper.cpp
keep keep keep add keep keep keep keep
<mask> .JSGlobalContextSetName = JSGlobalContextSetName, <mask> <mask> .JSContextGetGlobalContext = JSContextGetGlobalContext, <mask> .JSContextGetGlobalObject = JSContextGetGlobalObject, <mask> <mask> .JSEvaluateScript = JSEvaluateScript, <mask> .JSEvaluateBytecodeBundle = <mask> (decltype(&JSEvaluateBytecodeBundle)) </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add .nodeType = YGNodeTypeDefault, </s> remove sha1 = "63994437f62bc861bc20c605d12962f7246116d1", url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:3.4.1", ) prebuilt_jar( name = "okhttp3-ws", binary_jar = ":okhttp3-ws-binary-jar", visibility = ["//ReactAndroid/..."], ) remote_file( name = "okhttp3-ws-binary-jar", sha1 = "8ace66ef7002d98f633377c9e67daeeb196d8c3b", url = "mvn:com.squareup.okhttp3:okhttp-ws:jar:3.4.1", </s> add sha1 = "3f9b16b774f2c36cfd86dd2053d0b3059531dacc", url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:3.6.0", </s> remove exported_headers = [ "CxxModule.h", "JsArgumentHelpers.h", "JsArgumentHelpers-inl.h", </s> add exported_headers = subdir_glob( [ ("", "CxxModule.h"), ("", "JsArgumentHelpers.h"), ("", "JsArgumentHelpers-inl.h"), ], prefix = "cxxreact", ), force_static = True, header_namespace = "", visibility = [ "PUBLIC", ], xcode_public_headers_symlinks = True, deps = [ "//xplat/folly:molly", ], ) rn_xplat_cxx_library( name = "jsbigstring", srcs = [ "JSBigString.cpp", </s> add .JSObjectSetPropertyAtIndex = JSObjectSetPropertyAtIndex, </s> add INSPECTOR_FLAGS = [] DEBUG_PREPROCESSOR_FLAGS = [] STATIC_LIBRARY_IOS_FLAGS = [] JSC_DEPS = [] JSC_INTERNAL_DEPS = [] THIS_IS_FBOBJC = False THIS_IS_FBANDROID = False </s> remove sha1 = "c7c4f9e35c2fd5900da24f9872e3971801f08ce0", url = "mvn:com.squareup.okhttp3:okhttp:jar:3.4.1", </s> add sha1 = "69edde9fc4b01c9fd51d25b83428837478c27254", url = "mvn:com.squareup.okhttp3:okhttp:jar:3.6.0",
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/systemJSCWrapper.cpp
keep add keep keep keep keep
<mask> .JSObjectSetPrivate = JSObjectSetPrivate, <mask> .JSObjectSetProperty = JSObjectSetProperty, <mask> <mask> .JSObjectCopyPropertyNames = JSObjectCopyPropertyNames, <mask> .JSPropertyNameArrayGetCount = JSPropertyNameArrayGetCount, <mask> .JSPropertyNameArrayGetNameAtIndex = JSPropertyNameArrayGetNameAtIndex, </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add .nodeType = YGNodeTypeDefault, </s> remove sha1 = "63994437f62bc861bc20c605d12962f7246116d1", url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:3.4.1", ) prebuilt_jar( name = "okhttp3-ws", binary_jar = ":okhttp3-ws-binary-jar", visibility = ["//ReactAndroid/..."], ) remote_file( name = "okhttp3-ws-binary-jar", sha1 = "8ace66ef7002d98f633377c9e67daeeb196d8c3b", url = "mvn:com.squareup.okhttp3:okhttp-ws:jar:3.4.1", </s> add sha1 = "3f9b16b774f2c36cfd86dd2053d0b3059531dacc", url = "mvn:com.squareup.okhttp3:okhttp-urlconnection:jar:3.6.0", </s> remove exported_headers = [ "CxxModule.h", "JsArgumentHelpers.h", "JsArgumentHelpers-inl.h", </s> add exported_headers = subdir_glob( [ ("", "CxxModule.h"), ("", "JsArgumentHelpers.h"), ("", "JsArgumentHelpers-inl.h"), ], prefix = "cxxreact", ), force_static = True, header_namespace = "", visibility = [ "PUBLIC", ], xcode_public_headers_symlinks = True, deps = [ "//xplat/folly:molly", ], ) rn_xplat_cxx_library( name = "jsbigstring", srcs = [ "JSBigString.cpp", </s> add INSPECTOR_FLAGS = [] DEBUG_PREPROCESSOR_FLAGS = [] STATIC_LIBRARY_IOS_FLAGS = [] JSC_DEPS = [] JSC_INTERNAL_DEPS = [] THIS_IS_FBOBJC = False THIS_IS_FBANDROID = False </s> add .FBJSContextStartGCTimers = (decltype(&FBJSContextStartGCTimers)) Unimplemented_FBJSContextStartGCTimers, </s> remove sha1 = "c7c4f9e35c2fd5900da24f9872e3971801f08ce0", url = "mvn:com.squareup.okhttp3:okhttp:jar:3.4.1", </s> add sha1 = "69edde9fc4b01c9fd51d25b83428837478c27254", url = "mvn:com.squareup.okhttp3:okhttp:jar:3.6.0",
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/jschelpers/systemJSCWrapper.cpp
keep keep keep keep replace replace keep keep keep keep keep
<mask> */ <mask> <mask> #include "YGEnums.h" <mask> <mask> const char *YGAlignToString(const YGAlign value) { <mask> switch (value) { <mask> case YGAlignAuto: <mask> return "auto"; <mask> case YGAlignFlexStart: <mask> return "flex-start"; <mask> case YGAlignCenter: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){ </s> remove const char *YGWrapToString(const YGWrap value) { switch (value) { </s> add const char *YGWrapToString(const YGWrap value){ switch(value){ </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGMeasureModeToString(const YGMeasureMode value) { switch (value) { </s> add const char *YGMeasureModeToString(const YGMeasureMode value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGDimensionToString(const YGDimension value) { <mask> switch (value) { <mask> case YGDimensionWidth: <mask> return "width"; <mask> case YGDimensionHeight: <mask> return "height"; <mask> } </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGDirectionToString(const YGDirection value) { switch (value) { </s> add const char *YGDirectionToString(const YGDirection value){ switch(value){ </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){ </s> remove const char *YGFlexDirectionToString(const YGFlexDirection value) { switch (value) { </s> add const char *YGFlexDirectionToString(const YGFlexDirection value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGDirectionToString(const YGDirection value) { <mask> switch (value) { <mask> case YGDirectionInherit: <mask> return "inherit"; <mask> case YGDirectionLTR: <mask> return "ltr"; <mask> case YGDirectionRTL: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGWrapToString(const YGWrap value) { switch (value) { </s> add const char *YGWrapToString(const YGWrap value){ switch(value){ </s> remove const char *YGMeasureModeToString(const YGMeasureMode value) { switch (value) { </s> add const char *YGMeasureModeToString(const YGMeasureMode value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGDisplayToString(const YGDisplay value) { <mask> switch (value) { <mask> case YGDisplayFlex: <mask> return "flex"; <mask> case YGDisplayNone: <mask> return "none"; <mask> } </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGDirectionToString(const YGDirection value) { switch (value) { </s> add const char *YGDirectionToString(const YGDirection value){ switch(value){ </s> remove const char *YGFlexDirectionToString(const YGFlexDirection value) { switch (value) { </s> add const char *YGFlexDirectionToString(const YGFlexDirection value){ switch(value){ </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGEdgeToString(const YGEdge value) { <mask> switch (value) { <mask> case YGEdgeLeft: <mask> return "left"; <mask> case YGEdgeTop: <mask> return "top"; <mask> case YGEdgeRight: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGWrapToString(const YGWrap value) { switch (value) { </s> add const char *YGWrapToString(const YGWrap value){ switch(value){ </s> remove const char *YGMeasureModeToString(const YGMeasureMode value) { switch (value) { </s> add const char *YGMeasureModeToString(const YGMeasureMode value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGExperimentalFeatureToString(const YGExperimentalFeature value) { <mask> switch (value) { <mask> case YGExperimentalFeatureWebFlexBasis: <mask> return "web-flex-basis"; <mask> } <mask> return "unknown"; <mask> } </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGDisplayToString(const YGDisplay value) { switch (value) { </s> add const char *YGDisplayToString(const YGDisplay value){ switch(value){ </s> remove const char *YGDimensionToString(const YGDimension value) { switch (value) { </s> add const char *YGDimensionToString(const YGDimension value){ switch(value){ </s> remove const char *YGPositionTypeToString(const YGPositionType value) { switch (value) { </s> add const char *YGPositionTypeToString(const YGPositionType value){ switch(value){ </s> remove const char *YGOverflowToString(const YGOverflow value) { switch (value) { </s> add const char *YGNodeTypeToString(const YGNodeType value){ switch(value){ case YGNodeTypeDefault: return "default"; case YGNodeTypeText: return "text"; } return "unknown"; } const char *YGOverflowToString(const YGOverflow value){ switch(value){ </s> remove const char *YGEdgeToString(const YGEdge value) { switch (value) { </s> add const char *YGEdgeToString(const YGEdge value){ switch(value){ </s> remove const char *YGFlexDirectionToString(const YGFlexDirection value) { switch (value) { </s> add const char *YGFlexDirectionToString(const YGFlexDirection value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGFlexDirectionToString(const YGFlexDirection value) { <mask> switch (value) { <mask> case YGFlexDirectionColumn: <mask> return "column"; <mask> case YGFlexDirectionColumnReverse: <mask> return "column-reverse"; <mask> case YGFlexDirectionRow: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGWrapToString(const YGWrap value) { switch (value) { </s> add const char *YGWrapToString(const YGWrap value){ switch(value){ </s> remove const char *YGMeasureModeToString(const YGMeasureMode value) { switch (value) { </s> add const char *YGMeasureModeToString(const YGMeasureMode value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGJustifyToString(const YGJustify value) { <mask> switch (value) { <mask> case YGJustifyFlexStart: <mask> return "flex-start"; <mask> case YGJustifyCenter: <mask> return "center"; <mask> case YGJustifyFlexEnd: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGWrapToString(const YGWrap value) { switch (value) { </s> add const char *YGWrapToString(const YGWrap value){ switch(value){ </s> remove const char *YGMeasureModeToString(const YGMeasureMode value) { switch (value) { </s> add const char *YGMeasureModeToString(const YGMeasureMode value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGFlexDirectionToString(const YGFlexDirection value) { switch (value) { </s> add const char *YGFlexDirectionToString(const YGFlexDirection value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGLogLevelToString(const YGLogLevel value) { <mask> switch (value) { <mask> case YGLogLevelError: <mask> return "error"; <mask> case YGLogLevelWarn: <mask> return "warn"; <mask> case YGLogLevelInfo: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGWrapToString(const YGWrap value) { switch (value) { </s> add const char *YGWrapToString(const YGWrap value){ switch(value){ </s> remove const char *YGDirectionToString(const YGDirection value) { switch (value) { </s> add const char *YGDirectionToString(const YGDirection value){ switch(value){ </s> remove const char *YGMeasureModeToString(const YGMeasureMode value) { switch (value) { </s> add const char *YGMeasureModeToString(const YGMeasureMode value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){ </s> remove const char *YGFlexDirectionToString(const YGFlexDirection value) { switch (value) { </s> add const char *YGFlexDirectionToString(const YGFlexDirection value){ switch(value){ </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGMeasureModeToString(const YGMeasureMode value) { <mask> switch (value) { <mask> case YGMeasureModeUndefined: <mask> return "undefined"; <mask> case YGMeasureModeExactly: <mask> return "exactly"; <mask> case YGMeasureModeAtMost: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGWrapToString(const YGWrap value) { switch (value) { </s> add const char *YGWrapToString(const YGWrap value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){ </s> remove const char *YGFlexDirectionToString(const YGFlexDirection value) { switch (value) { </s> add const char *YGFlexDirectionToString(const YGFlexDirection value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGOverflowToString(const YGOverflow value) { <mask> switch (value) { <mask> case YGOverflowVisible: <mask> return "visible"; <mask> case YGOverflowHidden: <mask> return "hidden"; <mask> case YGOverflowScroll: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGWrapToString(const YGWrap value) { switch (value) { </s> add const char *YGWrapToString(const YGWrap value){ switch(value){ </s> remove const char *YGMeasureModeToString(const YGMeasureMode value) { switch (value) { </s> add const char *YGMeasureModeToString(const YGMeasureMode value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGPositionTypeToString(const YGPositionType value) { <mask> switch (value) { <mask> case YGPositionTypeRelative: <mask> return "relative"; <mask> case YGPositionTypeAbsolute: <mask> return "absolute"; <mask> } </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGDirectionToString(const YGDirection value) { switch (value) { </s> add const char *YGDirectionToString(const YGDirection value){ switch(value){ </s> remove const char *YGFlexDirectionToString(const YGFlexDirection value) { switch (value) { </s> add const char *YGFlexDirectionToString(const YGFlexDirection value){ switch(value){ </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGPrintOptionsToString(const YGPrintOptions value) { <mask> switch (value) { <mask> case YGPrintOptionsLayout: <mask> return "layout"; <mask> case YGPrintOptionsStyle: <mask> return "style"; <mask> case YGPrintOptionsChildren: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGWrapToString(const YGWrap value) { switch (value) { </s> add const char *YGWrapToString(const YGWrap value){ switch(value){ </s> remove const char *YGMeasureModeToString(const YGMeasureMode value) { switch (value) { </s> add const char *YGMeasureModeToString(const YGMeasureMode value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){ </s> remove const char *YGFlexDirectionToString(const YGFlexDirection value) { switch (value) { </s> add const char *YGFlexDirectionToString(const YGFlexDirection value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGUnitToString(const YGUnit value) { <mask> switch (value) { <mask> case YGUnitUndefined: <mask> return "undefined"; <mask> case YGUnitPoint: <mask> return "point"; <mask> case YGUnitPercent: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGMeasureModeToString(const YGMeasureMode value) { switch (value) { </s> add const char *YGMeasureModeToString(const YGMeasureMode value){ switch(value){ </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGWrapToString(const YGWrap value) { switch (value) { </s> add const char *YGWrapToString(const YGWrap value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){ </s> remove const char *YGFlexDirectionToString(const YGFlexDirection value) { switch (value) { </s> add const char *YGFlexDirectionToString(const YGFlexDirection value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> return "unknown"; <mask> } <mask> <mask> const char *YGWrapToString(const YGWrap value) { <mask> switch (value) { <mask> case YGWrapNoWrap: <mask> return "no-wrap"; <mask> case YGWrapWrap: <mask> return "wrap"; <mask> case YGWrapWrapReverse: </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGPrintOptionsToString(const YGPrintOptions value) { switch (value) { </s> add const char *YGPrintOptionsToString(const YGPrintOptions value){ switch(value){ </s> remove const char *YGUnitToString(const YGUnit value) { switch (value) { </s> add const char *YGUnitToString(const YGUnit value){ switch(value){ </s> remove const char *YGMeasureModeToString(const YGMeasureMode value) { switch (value) { </s> add const char *YGMeasureModeToString(const YGMeasureMode value){ switch(value){ </s> remove const char *YGLogLevelToString(const YGLogLevel value) { switch (value) { </s> add const char *YGLogLevelToString(const YGLogLevel value){ switch(value){ </s> remove const char *YGJustifyToString(const YGJustify value) { switch (value) { </s> add const char *YGJustifyToString(const YGJustify value){ switch(value){ </s> remove const char *YGFlexDirectionToString(const YGFlexDirection value) { switch (value) { </s> add const char *YGFlexDirectionToString(const YGFlexDirection value){ switch(value){
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.c
keep add keep keep keep keep
<mask> WIN_EXPORT const char *YGMeasureModeToString(const YGMeasureMode value); <mask> <mask> #define YGOverflowCount 3 <mask> typedef YG_ENUM_BEGIN(YGOverflow) { <mask> YGOverflowVisible, <mask> YGOverflowHidden, </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const char *YGMeasureModeToString(const YGMeasureMode value) { switch (value) { </s> add const char *YGMeasureModeToString(const YGMeasureMode value){ switch(value){ </s> remove const float marginColumn); </s> add const float marginColumn, YGConfigRef config); </s> remove Value getPropertyAtIndex(unsigned index) const; void setProperty(const String& propName, const Value& value) const; void setProperty(const char *propName, const Value& value) const; </s> add Value getPropertyAtIndex(unsigned int index) const; void setProperty(const String& propName, const Value& value); void setProperty(const char *propName, const Value& value); void setPropertyAtIndex(unsigned int index, const Value& value); </s> remove void Object::setProperty(const char *propName, const Value& value) const { </s> add void Object::setProperty(const char *propName, const Value& value) { </s> remove const char *YGExperimentalFeatureToString(const YGExperimentalFeature value) { switch (value) { </s> add const char *YGExperimentalFeatureToString(const YGExperimentalFeature value){ switch(value){ </s> remove std::string exceptionText = Value(m_context, exn).toString().str(); throwJSExecutionException("Failed to set property: %s", exceptionText.c_str()); </s> add throw JSException(m_context, exn, folly::to<std::string>( "Failed to set property '", propName.str(), "'").c_str()); } } void Object::setPropertyAtIndex(unsigned int index, const Value& value) { JSValueRef exn = nullptr; JSC_JSObjectSetPropertyAtIndex(m_context, m_obj, index, value, &exn); if (exn) { throw JSException(m_context, exn, folly::to<std::string>( "Failed to set property at index ", index).c_str());
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/YGEnums.h
keep keep add keep keep keep keep keep
<mask> <mask> bool isDirty; <mask> bool hasNewLayout; <mask> <mask> YGValue const *resolvedDimensions[2]; <mask> } YGNode; <mask> <mask> #define YG_UNDEFINED_VALUES \ </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove #define DEFINE_PRIMITIVE_CALL(TYPE, METHOD, CLASS) \ </s> add #define DEFINE_PRIMITIVE_CALL(TYPE, METHOD) \ </s> remove #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, edge < YGEdgeEnd, "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> add #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, \ edge < YGEdgeEnd, \ "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> remove bool JByteBuffer::isDirect() { </s> add bool JByteBuffer::isDirect() const { </s> remove Object asObject(); </s> add RN_EXPORT Object asObject() const; </s> remove const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(lastWidth, width); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(lastHeight, height); </s> add const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(effectiveLastWidth, effectiveWidth); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(effectiveLastHeight, effectiveHeight); </s> remove const float marginColumn); </s> add const float marginColumn, YGConfigRef config);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep add keep keep keep keep
<mask> .parent = NULL, <mask> .children = NULL, <mask> .hasNewLayout = true, <mask> .isDirty = false, <mask> .resolvedDimensions = {[YGDimensionWidth] = &YGValueUndefined, <mask> [YGDimensionHeight] = &YGValueUndefined}, <mask> <mask> .style = </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove YGRoundValueToPixelGrid(nodeTop, pointScaleFactor, false, hasMeasure); </s> add YGRoundValueToPixelGrid(nodeTop, pointScaleFactor, false, textRounding); </s> remove YGRoundValueToPixelGrid(nodeLeft, pointScaleFactor, false, hasMeasure); </s> add YGRoundValueToPixelGrid(nodeLeft, pointScaleFactor, false, textRounding); </s> remove YGRoundValueToPixelGrid(absoluteNodeRight, pointScaleFactor, hasMeasure, false) - YGRoundValueToPixelGrid(absoluteNodeLeft, pointScaleFactor, false, hasMeasure); </s> add YGRoundValueToPixelGrid(absoluteNodeRight, pointScaleFactor, textRounding, false) - YGRoundValueToPixelGrid(absoluteNodeLeft, pointScaleFactor, false, textRounding); </s> add bool useRoundedComparison = config != NULL && config->pointScaleFactor != 0; const float effectiveWidth = useRoundedComparison ? YGRoundValueToPixelGrid(width, config->pointScaleFactor, false, false) : width; const float effectiveHeight = useRoundedComparison ? YGRoundValueToPixelGrid(height, config->pointScaleFactor, false, false) : height; const float effectiveLastWidth = useRoundedComparison ? YGRoundValueToPixelGrid(lastWidth, config->pointScaleFactor, false, false) : lastWidth; const float effectiveLastHeight = useRoundedComparison ? YGRoundValueToPixelGrid(lastHeight, config->pointScaleFactor, false, false) : lastHeight; </s> remove YGRoundValueToPixelGrid(absoluteNodeBottom, pointScaleFactor, hasMeasure, false) - YGRoundValueToPixelGrid(absoluteNodeTop, pointScaleFactor, false, hasMeasure); </s> add YGRoundValueToPixelGrid(absoluteNodeBottom, pointScaleFactor, textRounding, false) - YGRoundValueToPixelGrid(absoluteNodeTop, pointScaleFactor, false, textRounding); </s> remove const bool hasMeasure = node->measure != NULL; </s> add const bool textRounding = node->nodeType == YGNodeTypeText;
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> } <mask> <mask> void YGNodeReset(const YGNodeRef node) { <mask> YGAssertWithNode(node, <mask> YGNodeGetChildCount(node) == 0, <mask> "Cannot reset a node which still has children attached"); <mask> YGAssertWithNode(node, node->parent == NULL, "Cannot reset a node still attached to a parent"); <mask> <mask> YGNodeListFree(node->children); <mask> <mask> const YGConfigRef config = node->config; </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> add child->parent == NULL, "Child already has a parent, it must be removed first."); YGAssertWithNode(node, node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> remove YGAssertWithNode(node, child->parent == NULL, "Child already has a parent, it must be removed first."); </s> add </s> remove YGAssertWithNode(node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> add YGAssertWithNode( node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> add // TODO: t18095186 Move nodeType to opt-in function and mark appropriate places in Litho node->nodeType = YGNodeTypeText; </s> remove const bool hasMeasure = node->measure != NULL; </s> add const bool textRounding = node->nodeType == YGNodeTypeText; </s> remove node->measure != NULL, "Only leaf nodes with custom measure functions" "should manually mark themselves as dirty"); </s> add node->measure != NULL, "Only leaf nodes with custom measure functions" "should manually mark themselves as dirty");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep add keep keep keep keep
<mask> <mask> void YGNodeSetMeasureFunc(const YGNodeRef node, YGMeasureFunc measureFunc) { <mask> if (measureFunc == NULL) { <mask> node->measure = NULL; <mask> } else { <mask> YGAssertWithNode( <mask> node, <mask> YGNodeGetChildCount(node) == 0, </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove YGAssertWithNode(node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> add YGAssertWithNode( node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> add // TODO: t18095186 Move nodeType to opt-in function and mark appropriate places in Litho node->nodeType = YGNodeTypeText; </s> remove YGAssertWithNode(node, child->parent == NULL, "Child already has a parent, it must be removed first."); </s> add </s> remove YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached"); </s> add YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached"); </s> remove #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, edge < YGEdgeEnd, "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> add #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, \ edge < YGEdgeEnd, \ "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> remove node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> add child->parent == NULL, "Child already has a parent, it must be removed first."); YGAssertWithNode(node, node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children.");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> void YGNodeSetMeasureFunc(const YGNodeRef node, YGMeasureFunc measureFunc) { <mask> if (measureFunc == NULL) { <mask> node->measure = NULL; <mask> } else { <mask> YGAssertWithNode(node, <mask> YGNodeGetChildCount(node) == 0, <mask> "Cannot set measure function: Nodes with measure functions cannot have children."); <mask> node->measure = measureFunc; <mask> } <mask> } <mask> <mask> YGMeasureFunc YGNodeGetMeasureFunc(const YGNodeRef node) { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add // TODO: t18095186 Move nodeType to opt-in function and mark appropriate places in Litho node->nodeType = YGNodeTypeText; </s> add // TODO: t18095186 Move nodeType to opt-in function and mark appropriate places in Litho node->nodeType = YGNodeTypeDefault; </s> remove node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> add child->parent == NULL, "Child already has a parent, it must be removed first."); YGAssertWithNode(node, node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> remove YGAssertWithNode(node, child->parent == NULL, "Child already has a parent, it must be removed first."); </s> add </s> remove node->measure != NULL, "Only leaf nodes with custom measure functions" "should manually mark themselves as dirty"); </s> add node->measure != NULL, "Only leaf nodes with custom measure functions" "should manually mark themselves as dirty"); </s> remove YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached"); </s> add YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep add keep keep keep keep keep
<mask> node, <mask> YGNodeGetChildCount(node) == 0, <mask> "Cannot set measure function: Nodes with measure functions cannot have children."); <mask> node->measure = measureFunc; <mask> } <mask> } <mask> <mask> YGMeasureFunc YGNodeGetMeasureFunc(const YGNodeRef node) { <mask> return node->measure; </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove YGAssertWithNode(node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> add YGAssertWithNode( node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> remove node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> add child->parent == NULL, "Child already has a parent, it must be removed first."); YGAssertWithNode(node, node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> remove YGAssertWithNode(node, child->parent == NULL, "Child already has a parent, it must be removed first."); </s> add </s> remove node->measure != NULL, "Only leaf nodes with custom measure functions" "should manually mark themselves as dirty"); </s> add node->measure != NULL, "Only leaf nodes with custom measure functions" "should manually mark themselves as dirty"); </s> add // TODO: t18095186 Move nodeType to opt-in function and mark appropriate places in Litho node->nodeType = YGNodeTypeDefault; </s> remove YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached"); </s> add YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace keep keep keep keep keep
<mask> return node->baseline; <mask> } <mask> <mask> void YGNodeInsertChild(const YGNodeRef node, const YGNodeRef child, const uint32_t index) { <mask> YGAssertWithNode(node, child->parent == NULL, "Child already has a parent, it must be removed first."); <mask> YGAssertWithNode(node, <mask> node->measure == NULL, <mask> "Cannot add child: Nodes with measure functions cannot have children."); <mask> <mask> YGNodeListInsert(&node->children, child, index); </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> add child->parent == NULL, "Child already has a parent, it must be removed first."); YGAssertWithNode(node, node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> remove YGAssertWithNode(node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> add YGAssertWithNode( node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> add // TODO: t18095186 Move nodeType to opt-in function and mark appropriate places in Litho node->nodeType = YGNodeTypeText; </s> remove YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached"); </s> add YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached"); </s> remove node->measure != NULL, "Only leaf nodes with custom measure functions" "should manually mark themselves as dirty"); </s> add node->measure != NULL, "Only leaf nodes with custom measure functions" "should manually mark themselves as dirty"); </s> remove YGFloatIsUndefined(availableWidth) ? widthMeasureMode == YGMeasureModeUndefined : true, "availableWidth is indefinite so widthMeasureMode must be " "YGMeasureModeUndefined"); </s> add YGFloatIsUndefined(availableWidth) ? widthMeasureMode == YGMeasureModeUndefined : true, "availableWidth is indefinite so widthMeasureMode must be " "YGMeasureModeUndefined");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> void YGNodeInsertChild(const YGNodeRef node, const YGNodeRef child, const uint32_t index) { <mask> YGAssertWithNode(node, child->parent == NULL, "Child already has a parent, it must be removed first."); <mask> YGAssertWithNode(node, <mask> node->measure == NULL, <mask> "Cannot add child: Nodes with measure functions cannot have children."); <mask> <mask> YGNodeListInsert(&node->children, child, index); <mask> child->parent = node; <mask> YGNodeMarkDirtyInternal(node); <mask> } </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove YGAssertWithNode(node, child->parent == NULL, "Child already has a parent, it must be removed first."); </s> add </s> remove YGAssertWithNode(node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> add YGAssertWithNode( node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> add // TODO: t18095186 Move nodeType to opt-in function and mark appropriate places in Litho node->nodeType = YGNodeTypeText; </s> remove YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached"); </s> add YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached"); </s> remove node->measure != NULL, "Only leaf nodes with custom measure functions" "should manually mark themselves as dirty"); </s> add node->measure != NULL, "Only leaf nodes with custom measure functions" "should manually mark themselves as dirty"); </s> remove YGFloatIsUndefined(availableWidth) ? widthMeasureMode == YGMeasureModeUndefined : true, "availableWidth is indefinite so widthMeasureMode must be " "YGMeasureModeUndefined"); </s> add YGFloatIsUndefined(availableWidth) ? widthMeasureMode == YGMeasureModeUndefined : true, "availableWidth is indefinite so widthMeasureMode must be " "YGMeasureModeUndefined");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> } <mask> <mask> void YGNodeMarkDirty(const YGNodeRef node) { <mask> YGAssertWithNode(node, <mask> node->measure != NULL, <mask> "Only leaf nodes with custom measure functions" <mask> "should manually mark themselves as dirty"); <mask> <mask> YGNodeMarkDirtyInternal(node); <mask> } <mask> <mask> bool YGNodeIsDirty(const YGNodeRef node) { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove YGAssertWithNode(node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> add YGAssertWithNode( node, YGNodeGetChildCount(node) == 0, "Cannot set measure function: Nodes with measure functions cannot have children."); </s> remove node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> add child->parent == NULL, "Child already has a parent, it must be removed first."); YGAssertWithNode(node, node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> add // TODO: t18095186 Move nodeType to opt-in function and mark appropriate places in Litho node->nodeType = YGNodeTypeText; </s> remove YGAssertWithNode(node, child->parent == NULL, "Child already has a parent, it must be removed first."); </s> add </s> add // Root nodes flexGrow should always be 0 if (node->parent == NULL) { return 0.0; } </s> add // Root nodes flexShrink should always be 0 if (node->parent == NULL) { return 0.0; }
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep add keep keep keep keep keep
<mask> } <mask> <mask> static inline float YGResolveFlexGrow(const YGNodeRef node) { <mask> if (!YGFloatIsUndefined(node->style.flexGrow)) { <mask> return node->style.flexGrow; <mask> } <mask> if (!YGFloatIsUndefined(node->style.flex) && node->style.flex > 0.0f) { <mask> return node->style.flex; </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add // Root nodes flexShrink should always be 0 if (node->parent == NULL) { return 0.0; } </s> remove config->pointScaleFactor = 1.0f / pixelsInPoint; } } static float YGRoundValueToPixelGrid(const float value, const float pointScaleFactor, const bool forceCeil, const bool forceFloor) { float fractial = fmodf(value, pointScaleFactor); if (YGFloatsEqual(fractial, 0)) { // Still remove fractial as fractial could be extremely small. return value - fractial; } if (forceCeil) { return value - fractial + pointScaleFactor; } else if (forceFloor) { return value - fractial; } else { return value - fractial + (fractial >= pointScaleFactor / 2.0f ? pointScaleFactor : 0); </s> add config->pointScaleFactor = pixelsInPoint; </s> remove #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, edge < YGEdgeEnd, "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> add #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, \ edge < YGEdgeEnd, \ "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> remove auto env = g_env->get(); if (!env) { FBASSERT(g_vm); g_vm->AttachCurrentThread(&env, nullptr); g_env->reset(env); </s> add auto scope = currentScope(); if (scope && scope->env_) { return scope->env_; </s> remove // jthrowable ////////////////////////////////////////////////////////////////////////////////////// inline local_ref<JThrowable> JThrowable::initCause(alias_ref<JThrowable> cause) { static auto meth = javaClassStatic()->getMethod<javaobject(javaobject)>("initCause"); return meth(self(), cause.get()); } </s> add </s> remove boolean isDrawPathRequired = isBorderColorDifferentAtIntersectionPoints(); if (isDrawPathRequired && mPathForBorder == null) { mPathForBorder = new Path(); } </s> add // Check for fast path to border drawing. int fastBorderColor = fastBorderCompatibleColorOrZero( borderLeft, borderTop, borderRight, borderBottom, leftColor, topColor, rightColor, bottomColor); if (fastBorderColor != 0) { // Fast border color draw. if (Color.alpha(fastBorderColor) != 0) { // Border color is not transparent. // Draw center. if (Color.alpha(mBackgroundColor) != 0) { PAINT.setColor(mBackgroundColor); if (Color.alpha(fastBorderColor) == 255) { // The border will draw over the edges, so only draw the inset background. canvas.drawRect(leftInset, topInset, rightInset, bottomInset, PAINT); } else { // The border is opaque, so we have to draw the entire background color. canvas.drawRect(left, top, right, bottom, PAINT); } } PAINT.setColor(fastBorderColor); if (borderLeft > 0) { canvas.drawRect(left, top, leftInset, bottom - borderBottom, PAINT); } if (borderTop > 0) { canvas.drawRect(left + borderLeft, top, right, topInset, PAINT); } if (borderRight > 0) { canvas.drawRect(rightInset, top + borderTop, right, bottom, PAINT); } if (borderBottom > 0) { canvas.drawRect(left, bottomInset, right - borderRight, bottom, PAINT); } } } else { if (mPathForBorder == null) { mPathForBorder = new Path(); }
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep add keep keep keep keep keep
<mask> : node->style.flexShrink; <mask> } <mask> <mask> static inline float YGNodeResolveFlexShrink(const YGNodeRef node) { <mask> if (!YGFloatIsUndefined(node->style.flexShrink)) { <mask> return node->style.flexShrink; <mask> } <mask> if (!node->config->useWebDefaults && !YGFloatIsUndefined(node->style.flex) && <mask> node->style.flex < 0.0f) { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add // Root nodes flexGrow should always be 0 if (node->parent == NULL) { return 0.0; } </s> remove config->pointScaleFactor = 1.0f / pixelsInPoint; } } static float YGRoundValueToPixelGrid(const float value, const float pointScaleFactor, const bool forceCeil, const bool forceFloor) { float fractial = fmodf(value, pointScaleFactor); if (YGFloatsEqual(fractial, 0)) { // Still remove fractial as fractial could be extremely small. return value - fractial; } if (forceCeil) { return value - fractial + pointScaleFactor; } else if (forceFloor) { return value - fractial; } else { return value - fractial + (fractial >= pointScaleFactor / 2.0f ? pointScaleFactor : 0); </s> add config->pointScaleFactor = pixelsInPoint; </s> remove const float marginColumn) { </s> add const float marginColumn, const YGConfigRef config) { </s> remove #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, edge < YGEdgeEnd, "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> add #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, \ edge < YGEdgeEnd, \ "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> remove auto env = g_env->get(); if (!env) { FBASSERT(g_vm); g_vm->AttachCurrentThread(&env, nullptr); g_env->reset(env); </s> add auto scope = currentScope(); if (scope && scope->env_) { return scope->env_; </s> add bool useRoundedComparison = config != NULL && config->pointScaleFactor != 0; const float effectiveWidth = useRoundedComparison ? YGRoundValueToPixelGrid(width, config->pointScaleFactor, false, false) : width; const float effectiveHeight = useRoundedComparison ? YGRoundValueToPixelGrid(height, config->pointScaleFactor, false, false) : height; const float effectiveLastWidth = useRoundedComparison ? YGRoundValueToPixelGrid(lastWidth, config->pointScaleFactor, false, false) : lastWidth; const float effectiveLastHeight = useRoundedComparison ? YGRoundValueToPixelGrid(lastHeight, config->pointScaleFactor, false, false) : lastHeight;
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
<mask> type YGNodeLayoutGet##name(const YGNodeRef node) { \ <mask> return node->layout.instanceName; \ <mask> } <mask> <mask> #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ <mask> type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ <mask> YGAssertWithNode(node, edge < YGEdgeEnd, "Cannot get layout properties of multi-edge shorthands"); \ <mask> \ <mask> if (edge == YGEdgeLeft) { \ <mask> if (node->layout.direction == YGDirectionRTL) { \ <mask> return node->layout.instanceName[YGEdgeEnd]; \ <mask> } else { \ <mask> return node->layout.instanceName[YGEdgeStart]; \ <mask> } \ <mask> } \ <mask> \ <mask> if (edge == YGEdgeRight) { \ <mask> if (node->layout.direction == YGDirectionRTL) { \ <mask> return node->layout.instanceName[YGEdgeStart]; \ <mask> } else { \ <mask> return node->layout.instanceName[YGEdgeEnd]; \ <mask> } \ <mask> } \ <mask> \ <mask> return node->layout.instanceName[edge]; \ <mask> } <mask> <mask> YG_NODE_PROPERTY_IMPL(void *, Context, context, context); <mask> YG_NODE_PROPERTY_IMPL(YGPrintFunc, PrintFunc, printFunc, print); <mask> YG_NODE_PROPERTY_IMPL(bool, HasNewLayout, hasNewLayout, hasNewLayout); </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove #define DEFINE_PRIMITIVE_CALL(TYPE, METHOD, CLASS) \ </s> add #define DEFINE_PRIMITIVE_CALL(TYPE, METHOD) \ </s> remove Dummy.cpp \ </s> add CatalystInstanceImpl.cpp \ CxxModuleWrapper.cpp \ JavaModuleWrapper.cpp \ JMessageQueueThread.cpp \ JSCPerfLogging.cpp \ JSLoader.cpp \ JSLogging.cpp \ JniJSModulesUnbundle.cpp \ MethodInvoker.cpp \ ModuleRegistryBuilder.cpp \ NativeArray.cpp \ NativeCommon.cpp \ NativeMap.cpp \ OnLoad.cpp \ ProxyExecutor.cpp \ ReadableNativeArray.cpp \ ReadableNativeMap.cpp \ WritableNativeArray.cpp \ WritableNativeMap.cpp \ </s> remove LOCAL_MODULE := libreactnativefb </s> add LOCAL_MODULE := reactnative </s> remove const float marginColumn); </s> add const float marginColumn, YGConfigRef config); </s> remove LOCAL_MODULE := libreactnativejni </s> add LOCAL_MODULE := reactnativejni </s> add YGNodeType nodeType;
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep add keep keep keep keep keep
<mask> <mask> YG_NODE_PROPERTY_IMPL(void *, Context, context, context); <mask> YG_NODE_PROPERTY_IMPL(YGPrintFunc, PrintFunc, printFunc, print); <mask> YG_NODE_PROPERTY_IMPL(bool, HasNewLayout, hasNewLayout, hasNewLayout); <mask> <mask> YG_NODE_STYLE_PROPERTY_IMPL(YGDirection, Direction, direction, direction); <mask> YG_NODE_STYLE_PROPERTY_IMPL(YGFlexDirection, FlexDirection, flexDirection, flexDirection); <mask> YG_NODE_STYLE_PROPERTY_IMPL(YGJustify, JustifyContent, justifyContent, justifyContent); <mask> YG_NODE_STYLE_PROPERTY_IMPL(YGAlign, AlignContent, alignContent, alignContent); </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> add YG_NODE_PROPERTY(YGNodeType, NodeType, nodeType); </s> remove #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, edge < YGEdgeEnd, "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> add #define YG_NODE_LAYOUT_RESOLVED_PROPERTY_IMPL(type, name, instanceName) \ type YGNodeLayoutGet##name(const YGNodeRef node, const YGEdge edge) { \ YGAssertWithNode(node, \ edge < YGEdgeEnd, \ "Cannot get layout properties of multi-edge shorthands"); \ \ if (edge == YGEdgeLeft) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeEnd]; \ } else { \ return node->layout.instanceName[YGEdgeStart]; \ } \ } \ \ if (edge == YGEdgeRight) { \ if (node->layout.direction == YGDirectionRTL) { \ return node->layout.instanceName[YGEdgeStart]; \ } else { \ return node->layout.instanceName[YGEdgeEnd]; \ } \ } \ \ return node->layout.instanceName[edge]; \ </s> remove __attribute__((visibility("default"))) Value(JSContextRef context, JSValueRef value); __attribute__((visibility("default"))) Value(JSContextRef context, JSStringRef value); __attribute__((visibility("default"))) Value(Value&&); </s> add RN_EXPORT Value(JSContextRef context, JSValueRef value); RN_EXPORT Value(JSContextRef context, JSStringRef value); RN_EXPORT Value(const Value &o) : Value(o.m_context, o.m_value) {} RN_EXPORT Value(const String &o) : Value(o.context(), o) {} </s> add // Creates a String wrapper and increases the refcount of the JSStringRef </s> add // C++ object wrapper for JSValueRef. The underlying JSValueRef is not // protected, so this class should always be used as a stack-allocated // variable. </s> remove explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {} </s> add explicit String(): m_context(nullptr), m_string(nullptr) {} // dummy empty constructor explicit String(JSContextRef context, const char* utf8) : m_context(context), m_string(JSC_JSStringCreateWithUTF8CString(context, utf8)) {}
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace keep keep keep keep keep
<mask> static void YGPrintEdgeIfNotUndefined(const YGNodeRef node, <mask> const char *str, <mask> const YGValue *edges, <mask> const YGEdge edge) { <mask> YGPrintNumberIfNotUndefined(node, str, YGComputedEdgeValue(edges, YGEdgeLeft, &YGValueUndefined)); <mask> } <mask> <mask> static void YGPrintNumberIfNotZero(const YGNodeRef node, <mask> const char *str, <mask> const YGValue *const number) { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const YGNodeRef node, YGLogLevel level, const char *format, va_list args) { </s> add const YGNodeRef node, YGLogLevel level, const char *format, va_list args) { </s> remove const float marginColumn); </s> add const float marginColumn, YGConfigRef config); </s> remove const char *YGEdgeToString(const YGEdge value) { switch (value) { </s> add const char *YGEdgeToString(const YGEdge value){ switch(value){ </s> remove YGAssertWithNode(node, child->parent == NULL, "Child already has a parent, it must be removed first."); </s> add </s> remove void Object::setProperty(const char *propName, const Value& value) const { </s> add void Object::setProperty(const char *propName, const Value& value) { </s> remove static Value makeError(JSContextRef ctx, const char *error); </s> add RN_EXPORT static Value makeError(JSContextRef ctx, const char *error);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> const float baseline = node->baseline(node, <mask> node->layout.measuredDimensions[YGDimensionWidth], <mask> node->layout.measuredDimensions[YGDimensionHeight]); <mask> YGAssertWithNode(node, <mask> !YGFloatIsUndefined(baseline), <mask> "Expect custom baseline function to not return NaN"); <mask> return baseline; <mask> } <mask> <mask> YGNodeRef baselineChild = NULL; <mask> const uint32_t childCount = YGNodeGetChildCount(node); </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const bool hasMeasure = node->measure != NULL; </s> add const bool textRounding = node->nodeType == YGNodeTypeText; </s> remove YGAssertWithNode(node, child->parent == NULL, "Child already has a parent, it must be removed first."); </s> add </s> remove config->pointScaleFactor = 1.0f / pixelsInPoint; } } static float YGRoundValueToPixelGrid(const float value, const float pointScaleFactor, const bool forceCeil, const bool forceFloor) { float fractial = fmodf(value, pointScaleFactor); if (YGFloatsEqual(fractial, 0)) { // Still remove fractial as fractial could be extremely small. return value - fractial; } if (forceCeil) { return value - fractial + pointScaleFactor; } else if (forceFloor) { return value - fractial; } else { return value - fractial + (fractial >= pointScaleFactor / 2.0f ? pointScaleFactor : 0); </s> add config->pointScaleFactor = pixelsInPoint; </s> add // TODO: t18095186 Move nodeType to opt-in function and mark appropriate places in Litho node->nodeType = YGNodeTypeDefault; </s> remove node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> add child->parent == NULL, "Child already has a parent, it must be removed first."); YGAssertWithNode(node, node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> remove void Object::setProperty(const String& propName, const Value& value) const { JSValueRef exn = NULL; </s> add void Object::setProperty(const String& propName, const Value& value) { JSValueRef exn = nullptr;
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace keep keep keep keep keep
<mask> if (YGNodeIsTrailingPosDefined(child, mainAxis) && !YGNodeIsLeadingPosDefined(child, mainAxis)) { <mask> child->layout.position[leading[mainAxis]] = node->layout.measuredDimensions[dim[mainAxis]] - <mask> child->layout.measuredDimensions[dim[mainAxis]] - <mask> YGNodeTrailingBorder(node, mainAxis) - <mask> YGNodeTrailingPosition(child, mainAxis, width); <mask> } else if (!YGNodeIsLeadingPosDefined(child, mainAxis) && <mask> node->style.justifyContent == YGJustifyCenter) { <mask> child->layout.position[leading[mainAxis]] = (node->layout.measuredDimensions[dim[mainAxis]] - <mask> child->layout.measuredDimensions[dim[mainAxis]]) / <mask> 2.0f; </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove YGNodeTrailingPosition(child, crossAxis, width); </s> add YGNodeTrailingMargin(child, crossAxis, width) - YGNodeTrailingPosition(child, crossAxis, isMainAxisRow ? height : width); </s> remove YGNodeAlignItem(node, child) == YGAlignFlexEnd) { </s> add ((YGNodeAlignItem(node, child) == YGAlignFlexEnd) ^ (node->style.flexWrap == YGWrapWrapReverse))) { </s> remove config->pointScaleFactor = 1.0f / pixelsInPoint; } } static float YGRoundValueToPixelGrid(const float value, const float pointScaleFactor, const bool forceCeil, const bool forceFloor) { float fractial = fmodf(value, pointScaleFactor); if (YGFloatsEqual(fractial, 0)) { // Still remove fractial as fractial could be extremely small. return value - fractial; } if (forceCeil) { return value - fractial + pointScaleFactor; } else if (forceFloor) { return value - fractial; } else { return value - fractial + (fractial >= pointScaleFactor / 2.0f ? pointScaleFactor : 0); </s> add config->pointScaleFactor = pixelsInPoint; </s> remove mShakeListener.onShake(); </s> add if (currentTimestamp - mLastShakeTimestamp >= VISIBLE_TIME_RANGE_NS) { mNumShakes++; } mLastShakeTimestamp = currentTimestamp; if (mNumShakes >= mMinNumShakes) { mNumShakes = 0; mLastShakeTimestamp = 0; mShakeListener.onShake(); } } if (currentTimestamp - mLastShakeTimestamp > SHAKING_WINDOW_NS) { mNumShakes = 0; mLastShakeTimestamp = 0; </s> remove const float innerWidth = availableWidth - marginAxisRow - paddingAndBorderAxisRow; const float innerHeight = availableHeight - marginAxisColumn - paddingAndBorderAxisColumn; </s> add // We want to make sure we don't call measure with negative size const float innerWidth = YGFloatIsUndefined(availableWidth) ? availableWidth : fmaxf(0, availableWidth - marginAxisRow - paddingAndBorderAxisRow); const float innerHeight = YGFloatIsUndefined(availableHeight) ? availableHeight : fmaxf(0, availableHeight - marginAxisColumn - paddingAndBorderAxisColumn); </s> remove const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(lastWidth, width); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(lastHeight, height); </s> add const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(effectiveLastWidth, effectiveWidth); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(effectiveLastHeight, effectiveHeight);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace keep keep keep keep keep
<mask> !YGNodeIsLeadingPosDefined(child, crossAxis)) { <mask> child->layout.position[leading[crossAxis]] = node->layout.measuredDimensions[dim[crossAxis]] - <mask> child->layout.measuredDimensions[dim[crossAxis]] - <mask> YGNodeTrailingBorder(node, crossAxis) - <mask> YGNodeTrailingPosition(child, crossAxis, width); <mask> } else if (!YGNodeIsLeadingPosDefined(child, crossAxis) && <mask> YGNodeAlignItem(node, child) == YGAlignCenter) { <mask> child->layout.position[leading[crossAxis]] = <mask> (node->layout.measuredDimensions[dim[crossAxis]] - <mask> child->layout.measuredDimensions[dim[crossAxis]]) / </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove YGNodeAlignItem(node, child) == YGAlignFlexEnd) { </s> add ((YGNodeAlignItem(node, child) == YGAlignFlexEnd) ^ (node->style.flexWrap == YGWrapWrapReverse))) { </s> remove YGNodeTrailingPosition(child, mainAxis, width); </s> add YGNodeTrailingMargin(child, mainAxis, width) - YGNodeTrailingPosition(child, mainAxis, isMainAxisRow ? width : height); </s> remove config->pointScaleFactor = 1.0f / pixelsInPoint; } } static float YGRoundValueToPixelGrid(const float value, const float pointScaleFactor, const bool forceCeil, const bool forceFloor) { float fractial = fmodf(value, pointScaleFactor); if (YGFloatsEqual(fractial, 0)) { // Still remove fractial as fractial could be extremely small. return value - fractial; } if (forceCeil) { return value - fractial + pointScaleFactor; } else if (forceFloor) { return value - fractial; } else { return value - fractial + (fractial >= pointScaleFactor / 2.0f ? pointScaleFactor : 0); </s> add config->pointScaleFactor = pixelsInPoint; </s> remove mShakeListener.onShake(); </s> add if (currentTimestamp - mLastShakeTimestamp >= VISIBLE_TIME_RANGE_NS) { mNumShakes++; } mLastShakeTimestamp = currentTimestamp; if (mNumShakes >= mMinNumShakes) { mNumShakes = 0; mLastShakeTimestamp = 0; mShakeListener.onShake(); } } if (currentTimestamp - mLastShakeTimestamp > SHAKING_WINDOW_NS) { mNumShakes = 0; mLastShakeTimestamp = 0; </s> remove const float innerWidth = availableWidth - marginAxisRow - paddingAndBorderAxisRow; const float innerHeight = availableHeight - marginAxisColumn - paddingAndBorderAxisColumn; </s> add // We want to make sure we don't call measure with negative size const float innerWidth = YGFloatIsUndefined(availableWidth) ? availableWidth : fmaxf(0, availableWidth - marginAxisRow - paddingAndBorderAxisRow); const float innerHeight = YGFloatIsUndefined(availableHeight) ? availableHeight : fmaxf(0, availableHeight - marginAxisColumn - paddingAndBorderAxisColumn); </s> remove if (currentTimestamp - mTimestamps[index] < VISIBLE_TIME_RANGE_MS) { </s> add if (currentTimestamp - mTimestamps[index] < VISIBLE_TIME_RANGE_NS) {
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace keep keep keep keep keep
<mask> (node->layout.measuredDimensions[dim[crossAxis]] - <mask> child->layout.measuredDimensions[dim[crossAxis]]) / <mask> 2.0f; <mask> } else if (!YGNodeIsLeadingPosDefined(child, crossAxis) && <mask> YGNodeAlignItem(node, child) == YGAlignFlexEnd) { <mask> child->layout.position[leading[crossAxis]] = (node->layout.measuredDimensions[dim[crossAxis]] - <mask> child->layout.measuredDimensions[dim[crossAxis]]); <mask> } <mask> } <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove YGNodeTrailingPosition(child, crossAxis, width); </s> add YGNodeTrailingMargin(child, crossAxis, width) - YGNodeTrailingPosition(child, crossAxis, isMainAxisRow ? height : width); </s> remove YGNodeTrailingPosition(child, mainAxis, width); </s> add YGNodeTrailingMargin(child, mainAxis, width) - YGNodeTrailingPosition(child, mainAxis, isMainAxisRow ? width : height); </s> remove config->pointScaleFactor = 1.0f / pixelsInPoint; } } static float YGRoundValueToPixelGrid(const float value, const float pointScaleFactor, const bool forceCeil, const bool forceFloor) { float fractial = fmodf(value, pointScaleFactor); if (YGFloatsEqual(fractial, 0)) { // Still remove fractial as fractial could be extremely small. return value - fractial; } if (forceCeil) { return value - fractial + pointScaleFactor; } else if (forceFloor) { return value - fractial; } else { return value - fractial + (fractial >= pointScaleFactor / 2.0f ? pointScaleFactor : 0); </s> add config->pointScaleFactor = pixelsInPoint; </s> remove mShakeListener.onShake(); </s> add if (currentTimestamp - mLastShakeTimestamp >= VISIBLE_TIME_RANGE_NS) { mNumShakes++; } mLastShakeTimestamp = currentTimestamp; if (mNumShakes >= mMinNumShakes) { mNumShakes = 0; mLastShakeTimestamp = 0; mShakeListener.onShake(); } } if (currentTimestamp - mLastShakeTimestamp > SHAKING_WINDOW_NS) { mNumShakes = 0; mLastShakeTimestamp = 0; </s> remove boolean isDrawPathRequired = isBorderColorDifferentAtIntersectionPoints(); if (isDrawPathRequired && mPathForBorder == null) { mPathForBorder = new Path(); } </s> add // Check for fast path to border drawing. int fastBorderColor = fastBorderCompatibleColorOrZero( borderLeft, borderTop, borderRight, borderBottom, leftColor, topColor, rightColor, bottomColor); if (fastBorderColor != 0) { // Fast border color draw. if (Color.alpha(fastBorderColor) != 0) { // Border color is not transparent. // Draw center. if (Color.alpha(mBackgroundColor) != 0) { PAINT.setColor(mBackgroundColor); if (Color.alpha(fastBorderColor) == 255) { // The border will draw over the edges, so only draw the inset background. canvas.drawRect(leftInset, topInset, rightInset, bottomInset, PAINT); } else { // The border is opaque, so we have to draw the entire background color. canvas.drawRect(left, top, right, bottom, PAINT); } } PAINT.setColor(fastBorderColor); if (borderLeft > 0) { canvas.drawRect(left, top, leftInset, bottom - borderBottom, PAINT); } if (borderTop > 0) { canvas.drawRect(left + borderLeft, top, right, topInset, PAINT); } if (borderRight > 0) { canvas.drawRect(rightInset, top + borderTop, right, bottom, PAINT); } if (borderBottom > 0) { canvas.drawRect(left, bottomInset, right - borderRight, bottom, PAINT); } } } else { if (mPathForBorder == null) { mPathForBorder = new Path(); } </s> remove if (borderBottom > 0 && colorBottom != Color.TRANSPARENT) { mPaint.setColor(colorBottom); mPathForBorder.reset(); mPathForBorder.moveTo(left, top + height); mPathForBorder.lineTo(left + width, top + height); mPathForBorder.lineTo(left + width - borderRight, top + height - borderBottom); mPathForBorder.lineTo(left + borderLeft, top + height - borderBottom); mPathForBorder.lineTo(left, top + height); canvas.drawPath(mPathForBorder, mPaint); </s> add // Check for fast path to border drawing. int fastBorderColor = fastBorderCompatibleColorOrZero( borderLeft, borderTop, borderRight, borderBottom, colorLeft, colorTop, colorRight, colorBottom); if (fastBorderColor != 0) { if (Color.alpha(fastBorderColor) != 0) { // Border color is not transparent. int right = bounds.right; int bottom = bounds.bottom; mPaint.setColor(fastBorderColor); if (borderLeft > 0) { int leftInset = left + borderLeft; canvas.drawRect(left, top, leftInset, bottom - borderBottom, mPaint); } if (borderTop > 0) { int topInset = top + borderTop; canvas.drawRect(left + borderLeft, top, right, topInset, mPaint); } if (borderRight > 0) { int rightInset = right - borderRight; canvas.drawRect(rightInset, top + borderTop, right, bottom, mPaint); } if (borderBottom > 0) { int bottomInset = bottom - borderBottom; canvas.drawRect(left, bottomInset, right - borderRight, bottom, mPaint); } } } else { if (mPathForBorder == null) { mPathForBorder = new Path(); } // If the path drawn previously is of the same color, // there would be a slight white space between borders // with anti-alias set to true. // Therefore we need to disable anti-alias, and // after drawing is done, we will re-enable it. mPaint.setAntiAlias(false); int width = bounds.width(); int height = bounds.height(); if (borderLeft > 0 && colorLeft != Color.TRANSPARENT) { mPaint.setColor(colorLeft); mPathForBorder.reset(); mPathForBorder.moveTo(left, top); mPathForBorder.lineTo(left + borderLeft, top + borderTop); mPathForBorder.lineTo(left + borderLeft, top + height - borderBottom); mPathForBorder.lineTo(left, top + height); mPathForBorder.lineTo(left, top); canvas.drawPath(mPathForBorder, mPaint); } if (borderTop > 0 && colorTop != Color.TRANSPARENT) { mPaint.setColor(colorTop); mPathForBorder.reset(); mPathForBorder.moveTo(left, top); mPathForBorder.lineTo(left + borderLeft, top + borderTop); mPathForBorder.lineTo(left + width - borderRight, top + borderTop); mPathForBorder.lineTo(left + width, top); mPathForBorder.lineTo(left, top); canvas.drawPath(mPathForBorder, mPaint); } if (borderRight > 0 && colorRight != Color.TRANSPARENT) { mPaint.setColor(colorRight); mPathForBorder.reset(); mPathForBorder.moveTo(left + width, top); mPathForBorder.lineTo(left + width, top + height); mPathForBorder.lineTo(left + width - borderRight, top + height - borderBottom); mPathForBorder.lineTo(left + width - borderRight, top + borderTop); mPathForBorder.lineTo(left + width, top); canvas.drawPath(mPathForBorder, mPaint); } if (borderBottom > 0 && colorBottom != Color.TRANSPARENT) { mPaint.setColor(colorBottom); mPathForBorder.reset(); mPathForBorder.moveTo(left, top + height); mPathForBorder.lineTo(left + width, top + height); mPathForBorder.lineTo(left + width - borderRight, top + height - borderBottom); mPathForBorder.lineTo(left + borderLeft, top + height - borderBottom); mPathForBorder.lineTo(left, top + height); canvas.drawPath(mPathForBorder, mPaint); } // re-enable anti alias mPaint.setAntiAlias(true);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> YGNodePaddingAndBorderForAxis(node, YGFlexDirectionColumn, availableWidth); <mask> const float marginAxisRow = YGNodeMarginForAxis(node, YGFlexDirectionRow, availableWidth); <mask> const float marginAxisColumn = YGNodeMarginForAxis(node, YGFlexDirectionColumn, availableWidth); <mask> <mask> const float innerWidth = availableWidth - marginAxisRow - paddingAndBorderAxisRow; <mask> const float innerHeight = availableHeight - marginAxisColumn - paddingAndBorderAxisColumn; <mask> <mask> if (widthMeasureMode == YGMeasureModeExactly && heightMeasureMode == YGMeasureModeExactly) { <mask> // Don't bother sizing the text if both dimensions are already defined. <mask> node->layout.measuredDimensions[YGDimensionWidth] = YGNodeBoundAxis( <mask> node, YGFlexDirectionRow, availableWidth - marginAxisRow, parentWidth, parentWidth); </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove config->pointScaleFactor = 1.0f / pixelsInPoint; } } static float YGRoundValueToPixelGrid(const float value, const float pointScaleFactor, const bool forceCeil, const bool forceFloor) { float fractial = fmodf(value, pointScaleFactor); if (YGFloatsEqual(fractial, 0)) { // Still remove fractial as fractial could be extremely small. return value - fractial; } if (forceCeil) { return value - fractial + pointScaleFactor; } else if (forceFloor) { return value - fractial; } else { return value - fractial + (fractial >= pointScaleFactor / 2.0f ? pointScaleFactor : 0); </s> add config->pointScaleFactor = pixelsInPoint; </s> remove float rightWidth = resolveWidth(mBorderRightWidth, defaultWidth); float leftOfTheRight = right - rightWidth; </s> add float borderRight = resolveWidth(mBorderRightWidth, defaultWidth); float rightInset = right - borderRight; </s> remove float leftWidth = resolveWidth(mBorderLeftWidth, defaultWidth); float rightOfTheLeft = left + leftWidth; </s> add float borderLeft = resolveWidth(mBorderLeftWidth, defaultWidth); float leftInset = left + borderLeft; </s> remove float bottomWidth = resolveWidth(mBorderBottomWidth, defaultWidth); float topOfTheBottom = bottom - bottomWidth; </s> add float borderBottom = resolveWidth(mBorderBottomWidth, defaultWidth); float bottomInset = bottom - borderBottom; </s> remove YGNodeTrailingPosition(child, mainAxis, width); </s> add YGNodeTrailingMargin(child, mainAxis, width) - YGNodeTrailingPosition(child, mainAxis, isMainAxisRow ? width : height); </s> remove YGNodeTrailingPosition(child, crossAxis, width); </s> add YGNodeTrailingMargin(child, crossAxis, width) - YGNodeTrailingPosition(child, crossAxis, isMainAxisRow ? height : width);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace replace replace keep replace replace replace keep
<mask> const float parentHeight, <mask> const bool performLayout, <mask> const YGConfigRef config) { <mask> YGAssertWithNode(node, <mask> YGFloatIsUndefined(availableWidth) ? widthMeasureMode == YGMeasureModeUndefined : true, <mask> "availableWidth is indefinite so widthMeasureMode must be " <mask> "YGMeasureModeUndefined"); <mask> YGAssertWithNode(node, <mask> YGFloatIsUndefined(availableHeight) ? heightMeasureMode == YGMeasureModeUndefined : true, <mask> "availableHeight is indefinite so heightMeasureMode must be " <mask> "YGMeasureModeUndefined"); <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const bool flexBasisOverflows = measureModeMainDim == YGMeasureModeUndefined ? false : totalFlexBasis > availableInnerMainDim; </s> add const bool flexBasisOverflows = measureModeMainDim == YGMeasureModeUndefined ? false : totalOuterFlexBasis > availableInnerMainDim; </s> remove node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> add child->parent == NULL, "Child already has a parent, it must be removed first."); YGAssertWithNode(node, node->measure == NULL, "Cannot add child: Nodes with measure functions cannot have children."); </s> remove const float innerWidth = availableWidth - marginAxisRow - paddingAndBorderAxisRow; const float innerHeight = availableHeight - marginAxisColumn - paddingAndBorderAxisColumn; </s> add // We want to make sure we don't call measure with negative size const float innerWidth = YGFloatIsUndefined(availableWidth) ? availableWidth : fmaxf(0, availableWidth - marginAxisRow - paddingAndBorderAxisRow); const float innerHeight = YGFloatIsUndefined(availableHeight) ? availableHeight : fmaxf(0, availableHeight - marginAxisColumn - paddingAndBorderAxisColumn); </s> remove YGAssertWithNode(node, child->parent == NULL, "Child already has a parent, it must be removed first."); </s> add </s> remove totalFlexBasis += child->layout.computedFlexBasis; </s> add totalOuterFlexBasis += child->layout.computedFlexBasis + YGNodeMarginForAxis(child, mainAxis, availableInnerWidth); ;
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> } <mask> } <mask> <mask> float totalFlexBasis = 0; <mask> <mask> // STEP 3: DETERMINE FLEX BASIS FOR EACH ITEM <mask> for (uint32_t i = 0; i < childCount; i++) { <mask> const YGNodeRef child = YGNodeListGet(node->children, i); <mask> if (child->style.display == YGDisplayNone) { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove marginAxisColumn)) { </s> add marginAxisColumn, config)) { </s> remove if (currentTimestamp - mTimestamps[index] < VISIBLE_TIME_RANGE_MS) { </s> add if (currentTimestamp - mTimestamps[index] < VISIBLE_TIME_RANGE_NS) { </s> remove YGRoundValueToPixelGrid(absoluteNodeBottom, pointScaleFactor, hasMeasure, false) - YGRoundValueToPixelGrid(absoluteNodeTop, pointScaleFactor, false, hasMeasure); </s> add YGRoundValueToPixelGrid(absoluteNodeBottom, pointScaleFactor, textRounding, false) - YGRoundValueToPixelGrid(absoluteNodeTop, pointScaleFactor, false, textRounding); </s> remove return getClass().getSimpleName() + " (virtual node)"; </s> add for (int i = 0; i < getChildCount(); i++) { getChildAt(i).toStringWithIndentation(result, level + 1); } </s> remove const bool flexBasisOverflows = measureModeMainDim == YGMeasureModeUndefined ? false : totalFlexBasis > availableInnerMainDim; </s> add const bool flexBasisOverflows = measureModeMainDim == YGMeasureModeUndefined ? false : totalOuterFlexBasis > availableInnerMainDim; </s> remove Matcher matcher = STACK_FRAME_PATTERN.matcher(stackTrace[i]); if (!matcher.find()) { throw new IllegalArgumentException( </s> add if (stackTrace[i].equals("[native code]")) { result[i] = new StackFrameImpl(null, stackTrace[i], -1, -1); } else { Matcher matcher = STACK_FRAME_PATTERN.matcher(stackTrace[i]); if (!matcher.find()) { throw new IllegalArgumentException(
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace keep keep keep keep keep
<mask> config); <mask> } <mask> } <mask> <mask> totalFlexBasis += child->layout.computedFlexBasis; <mask> } <mask> <mask> const bool flexBasisOverflows = <mask> measureModeMainDim == YGMeasureModeUndefined ? false : totalFlexBasis > availableInnerMainDim; <mask> if (isNodeFlexWrap && flexBasisOverflows && measureModeMainDim == YGMeasureModeAtMost) { </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove const bool flexBasisOverflows = measureModeMainDim == YGMeasureModeUndefined ? false : totalFlexBasis > availableInnerMainDim; </s> add const bool flexBasisOverflows = measureModeMainDim == YGMeasureModeUndefined ? false : totalOuterFlexBasis > availableInnerMainDim; </s> add bool useRoundedComparison = config != NULL && config->pointScaleFactor != 0; const float effectiveWidth = useRoundedComparison ? YGRoundValueToPixelGrid(width, config->pointScaleFactor, false, false) : width; const float effectiveHeight = useRoundedComparison ? YGRoundValueToPixelGrid(height, config->pointScaleFactor, false, false) : height; const float effectiveLastWidth = useRoundedComparison ? YGRoundValueToPixelGrid(lastWidth, config->pointScaleFactor, false, false) : lastWidth; const float effectiveLastHeight = useRoundedComparison ? YGRoundValueToPixelGrid(lastHeight, config->pointScaleFactor, false, false) : lastHeight; </s> remove const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(lastWidth, width); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(lastHeight, height); </s> add const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(effectiveLastWidth, effectiveWidth); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(effectiveLastHeight, effectiveHeight); </s> remove float totalFlexBasis = 0; </s> add float totalOuterFlexBasis = 0; </s> remove YGFloatIsUndefined(availableWidth) ? widthMeasureMode == YGMeasureModeUndefined : true, "availableWidth is indefinite so widthMeasureMode must be " "YGMeasureModeUndefined"); </s> add YGFloatIsUndefined(availableWidth) ? widthMeasureMode == YGMeasureModeUndefined : true, "availableWidth is indefinite so widthMeasureMode must be " "YGMeasureModeUndefined"); </s> remove YGNodeTrailingPosition(child, mainAxis, width); </s> add YGNodeTrailingMargin(child, mainAxis, width) - YGNodeTrailingPosition(child, mainAxis, isMainAxisRow ? width : height);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace replace keep keep keep keep keep
<mask> <mask> totalFlexBasis += child->layout.computedFlexBasis; <mask> } <mask> <mask> const bool flexBasisOverflows = <mask> measureModeMainDim == YGMeasureModeUndefined ? false : totalFlexBasis > availableInnerMainDim; <mask> if (isNodeFlexWrap && flexBasisOverflows && measureModeMainDim == YGMeasureModeAtMost) { <mask> measureModeMainDim = YGMeasureModeExactly; <mask> } <mask> <mask> // STEP 4: COLLECT FLEX ITEMS INTO FLEX LINES </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove totalFlexBasis += child->layout.computedFlexBasis; </s> add totalOuterFlexBasis += child->layout.computedFlexBasis + YGNodeMarginForAxis(child, mainAxis, availableInnerWidth); ; </s> remove float totalFlexBasis = 0; </s> add float totalOuterFlexBasis = 0; </s> add bool useRoundedComparison = config != NULL && config->pointScaleFactor != 0; const float effectiveWidth = useRoundedComparison ? YGRoundValueToPixelGrid(width, config->pointScaleFactor, false, false) : width; const float effectiveHeight = useRoundedComparison ? YGRoundValueToPixelGrid(height, config->pointScaleFactor, false, false) : height; const float effectiveLastWidth = useRoundedComparison ? YGRoundValueToPixelGrid(lastWidth, config->pointScaleFactor, false, false) : lastWidth; const float effectiveLastHeight = useRoundedComparison ? YGRoundValueToPixelGrid(lastHeight, config->pointScaleFactor, false, false) : lastHeight; </s> remove const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(lastWidth, width); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(lastHeight, height); </s> add const bool hasSameWidthSpec = lastWidthMode == widthMode && YGFloatsEqual(effectiveLastWidth, effectiveWidth); const bool hasSameHeightSpec = lastHeightMode == heightMode && YGFloatsEqual(effectiveLastHeight, effectiveHeight); </s> remove YGFloatIsUndefined(availableWidth) ? widthMeasureMode == YGMeasureModeUndefined : true, "availableWidth is indefinite so widthMeasureMode must be " "YGMeasureModeUndefined"); </s> add YGFloatIsUndefined(availableWidth) ? widthMeasureMode == YGMeasureModeUndefined : true, "availableWidth is indefinite so widthMeasureMode must be " "YGMeasureModeUndefined"); </s> remove YGFloatIsUndefined(availableHeight) ? heightMeasureMode == YGMeasureModeUndefined : true, "availableHeight is indefinite so heightMeasureMode must be " "YGMeasureModeUndefined"); </s> add YGFloatIsUndefined(availableHeight) ? heightMeasureMode == YGMeasureModeUndefined : true, "availableHeight is indefinite so heightMeasureMode must be " "YGMeasureModeUndefined");
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace replace replace keep keep keep keep keep
<mask> if (child->style.positionType != YGPositionTypeAbsolute) { <mask> const float childMarginMainAxis = YGNodeMarginForAxis(child, mainAxis, availableInnerWidth); <mask> const float flexBasisWithMaxConstraints = <mask> fminf(YGResolveValue(&child->style.maxDimensions[dim[mainAxis]], mainAxisParentSize), <mask> fmaxf(YGResolveValue(&child->style.minDimensions[dim[mainAxis]], <mask> mainAxisParentSize), <mask> child->layout.computedFlexBasis)); <mask> const float flexBasisWithMinAndMaxConstraints = <mask> fmaxf(YGResolveValue(&child->style.minDimensions[dim[mainAxis]], mainAxisParentSize), <mask> flexBasisWithMaxConstraints); <mask> <mask> // If this is a multi-line flow and this item pushes us over the </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove childFlexBasis = currentRelativeChild->layout.computedFlexBasis; </s> add childFlexBasis = fminf(YGResolveValue(&currentRelativeChild->style.maxDimensions[dim[mainAxis]], mainAxisParentSize), fmaxf(YGResolveValue(&currentRelativeChild->style.minDimensions[dim[mainAxis]], mainAxisParentSize), currentRelativeChild->layout.computedFlexBasis)); </s> remove childFlexBasis = currentRelativeChild->layout.computedFlexBasis; </s> add childFlexBasis = fminf(YGResolveValue(&currentRelativeChild->style.maxDimensions[dim[mainAxis]], mainAxisParentSize), fmaxf(YGResolveValue(&currentRelativeChild->style.minDimensions[dim[mainAxis]], mainAxisParentSize), currentRelativeChild->layout.computedFlexBasis)); </s> remove YGNodeMarginForAxis(child, crossAxis, availableInnerWidth)) </s> add YGNodeMarginForAxis(child, mainAxis, availableInnerWidth)) </s> remove const bool hasMeasure = node->measure != NULL; </s> add const bool textRounding = node->nodeType == YGNodeTypeText; </s> remove const float marginColumn) { </s> add const float marginColumn, const YGConfigRef config) { </s> remove const float innerWidth = availableWidth - marginAxisRow - paddingAndBorderAxisRow; const float innerHeight = availableHeight - marginAxisColumn - paddingAndBorderAxisColumn; </s> add // We want to make sure we don't call measure with negative size const float innerWidth = YGFloatIsUndefined(availableWidth) ? availableWidth : fmaxf(0, availableWidth - marginAxisRow - paddingAndBorderAxisRow); const float innerHeight = YGFloatIsUndefined(availableHeight) ? availableHeight : fmaxf(0, availableHeight - marginAxisColumn - paddingAndBorderAxisColumn);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c
keep keep keep keep replace keep keep keep keep keep
<mask> } <mask> <mask> sizeConsumedOnCurrentLineIncludingMinConstraint += <mask> flexBasisWithMinAndMaxConstraints + childMarginMainAxis; <mask> sizeConsumedOnCurrentLine += flexBasisWithMaxConstraints + childMarginMainAxis; <mask> itemsOnLine++; <mask> <mask> if (YGNodeIsFlex(child)) { <mask> totalFlexGrowFactors += YGResolveFlexGrow(child); <mask> </s> Update RN Android with SDK 19 fbshipit-source-id: fcb472a571 </s> remove // Unlike the grow factor, the shrink factor is scaled relative to the // child // dimension. </s> add // Unlike the grow factor, the shrink factor is scaled relative to the child dimension. </s> remove totalFlexBasis += child->layout.computedFlexBasis; </s> add totalOuterFlexBasis += child->layout.computedFlexBasis + YGNodeMarginForAxis(child, mainAxis, availableInnerWidth); ; </s> remove LOCAL_SHARED_LIBRARIES := libreactnativejnifb LOCAL_STATIC_LIBRARIES := </s> add LOCAL_SHARED_LIBRARIES := libfolly_json libfbjni libjsc libglog_init libyoga LOCAL_STATIC_LIBRARIES := libreactnative </s> remove LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../.. $(LOCAL_PATH)/.. </s> add LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../.. </s> remove const bool flexBasisOverflows = measureModeMainDim == YGMeasureModeUndefined ? false : totalFlexBasis > availableInnerMainDim; </s> add const bool flexBasisOverflows = measureModeMainDim == YGMeasureModeUndefined ? false : totalOuterFlexBasis > availableInnerMainDim; </s> remove fmaxf(YGResolveValue(&child->style.minDimensions[dim[mainAxis]], mainAxisParentSize), child->layout.computedFlexBasis)); </s> add child->layout.computedFlexBasis);
https://github.com/expo/expo/commit/7b58f4ab024999b96bc75072438f9d9cdc0bc7d2
android/ReactCommon/yoga/yoga/Yoga.c