Skip to content
Permalink
Branch: master
Commits on Mar 22, 2019
  1. iOS: undefined prop in an object shouldn't become [NSNull null] in th…

    fkgozali authored and facebook-github-bot committed Mar 21, 2019
    …e dictionary
    
    Summary: [iOS] [Fixed] - The existing logic defaults `undefined` & `null` in JS to be `[NSNull null]` when converting JS object to `NSDictionary`. Let's not insert the prop to the dictionary if it's `undefined`.
    
    Reviewed By: blairvanderhoof
    
    Differential Revision: D14571128
    
    fbshipit-source-id: e03c713b055672b0a001d3305d694912ee36ab36
Commits on Mar 1, 2019
  1. TM iOS: disable remote debugging toggle when TurboModule is active

    fkgozali authored and facebook-github-bot committed Mar 1, 2019
    Summary: TurboModule needs sync calls from JS to native, and that's not supported with the current Chrome debugger. Until we have proper solution, disable it to avoid confusion.
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D14286383
    
    fbshipit-source-id: e93903bf8fdfc714960d0d58e3f3eb0442c811bd
  2. TM iOS: convert method invocation result in JS thread instead of in t…

    fkgozali authored and facebook-github-bot committed Mar 1, 2019
    …he method queue
    
    Summary: [IOS] [FIXED] - This may cause weird race condition if JSI is accessed via multiple threads within the same method invocation. Since only the objc class methods need to be executed on the right queue, we can keep the conversion to jsi::Value in the originating JS thread.
    
    Reviewed By: RSNara
    
    Differential Revision: D14277167
    
    fbshipit-source-id: c506aebb71e190e2afcbf19dce05088ce2b97833
Commits on Feb 22, 2019
  1. NativeModules iOS: downgrade duplicated module message to warning ins…

    fkgozali authored and facebook-github-bot committed Feb 22, 2019
    …tead of error
    
    Summary: [iOS] [Changed] - There seems to be a potential race condition during reloading that could cause "double registration" of modules. This should be mostly harmless, so downgrade to warning for the message instead of redboxing.
    
    Reviewed By: cpojer
    
    Differential Revision: D14179922
    
    fbshipit-source-id: 5c16ac674f633a548353277d9f875544ed10ba9b
  2. Created spec for SegmentFetcher native module

    fkgozali authored and facebook-github-bot committed Feb 22, 2019
    Summary: [General] [Added] - Simply adding spec for better enforcement of types.
    
    Reviewed By: cpojer
    
    Differential Revision: D14177690
    
    fbshipit-source-id: ab4c112d1bd65fef7e37b4c1d6c44055f5576936
Commits on Feb 20, 2019
  1. TM iOS C++: don't throw if a method is not found

    fkgozali authored and facebook-github-bot committed Feb 20, 2019
    Summary: Let JS decide if a missing method should be treated as an error, or whether it allows optional methods (e.g. methods that are only for android or for ios).
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D14155799
    
    fbshipit-source-id: 1e298b46a59761cf09e98147da885b1e9a9a675a
Commits on Feb 16, 2019
  1. FBiOS TM: make sure to lazily load view managers

    fkgozali authored and facebook-github-bot committed Feb 16, 2019
    Summary: The hacks we added for lazy viewmanagers don't really apply to TurboModule lookup system, so let's enable lazy lookup as needed only if TurboModule is enabled.
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D14116548
    
    fbshipit-source-id: 701e963ef0593cd890198725f8cb6d0d29434cd9
  2. TM iOS: allow fallback __turbo__* methods to proxy NSDictionary types…

    fkgozali authored and facebook-github-bot committed Feb 16, 2019
    … to stricter types
    
    Summary:
    Some modules may have args with types stricter than just `NSDictionary`. For now, allow these modules to manually define a __turbo__* variant of the same method that receives basic NSDictionary/NSArray typed args. That helper method can do the conversion to the stricter type as necessary. This is only needed during migration phase of TurboModule.
    
    Without this workaround, existing methods may get unrecognized selector errors.
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D14115981
    
    fbshipit-source-id: ca7fcf497490ef9cce14c3d3444991c50d3cb550
Commits on Feb 15, 2019
  1. Don't attempt to load RCTDevLoadingView lazily

    fkgozali authored and facebook-github-bot committed Feb 15, 2019
    Summary:
    There's a very old issue with reload logic: invalidation and resetting up of the bridge could be racing. In this case, we hit a redbox when:
    * Chrome debugger is enabled in previous app run, then we launch the app again
    * The bridge starts, then immediately reloads itself to connect to Chrome
    * On the 2nd setup, the logic to update the green loading bar, with the % indicator for loading off metro, failed to find the DevLoadingView module instance because the bridge is in the middle of invalidating
    
    See #23235
    
    To test:
    Using react-native init from github, do the steps in #23235, no more redbox. Note that the loading indicator % won't be proper still, but at least it doesn't crash/redbox.
    
    Reviewed By: JoshuaGross
    
    Differential Revision: D14110814
    
    fbshipit-source-id: 835061e50acc6968bffbcc2ddfbe8da79a100df9
Commits on Feb 12, 2019
  1. TM iOS: avoid bad memory access when passing prop name to a lambda

    fkgozali authored and facebook-github-bot committed Feb 12, 2019
    Summary: Depending on the timing of the method call from JS to a CxxModule, we may be accessing memory that has been deallocated, causing exception to RN runtime. This fixes it.
    
    Reviewed By: JoshuaGross, mdvacca
    
    Differential Revision: D14033831
    
    fbshipit-source-id: 5a77aa41223b1fc3146dcf78b7f8e93375605d6d
Commits on Feb 9, 2019
  1. TM iOS: added helper to check whether a class is TurboModule compatible

    fkgozali authored and facebook-github-bot committed Feb 9, 2019
    Summary: Similar macro as the existing one, but this one checks for the class directly.
    
    Reviewed By: RSNara
    
    Differential Revision: D14016664
    
    fbshipit-source-id: aae9a9c1cc95f56d2eff6c9021a714ed4a843db3
Commits on Feb 7, 2019
  1. TM iOS: Verify that module class conforms to RCTTurboModule before in…

    fkgozali authored and facebook-github-bot committed Feb 6, 2019
    …stantiating
    
    Summary: At times, the lookup logic may find a class that's not compliant with RCTTurboModule. If so, it shouldn't be instantiated, and we assume the module doesn't exist.
    
    Reviewed By: JoshuaGross, RSNara
    
    Differential Revision: D13979004
    
    fbshipit-source-id: ac1fa9cc456715cddd101fff13f5a41f9528a74e
  2. TM iOS: Util to check if an id is TurboModule instance

    fkgozali authored and facebook-github-bot committed Feb 6, 2019
    Summary: Simple macro to do check if TurboModule is enabled and the particular object is RCTTurboModule compliant.
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D13978368
    
    fbshipit-source-id: 660c7cab7bb074d80d57abead951dad19306ae73
Commits on Feb 4, 2019
  1. TM iOS: guard against nullptr in module lookup

    fkgozali authored and facebook-github-bot committed Feb 4, 2019
    Summary: Just tightened up the lookup logic to guard against nullptr.
    
    Reviewed By: RSNara
    
    Differential Revision: D13948001
    
    fbshipit-source-id: 55bf46619712e60e195ea12f2b8eb799f80a3bbe
Commits on Feb 2, 2019
  1. TM: trimming down module dependencies when getting NativeModules

    fkgozali authored and facebook-github-bot committed Feb 2, 2019
    Summary: For now, do `require('NativeModules')` instead of `import {NativeModules} from 'react-native'`.
    
    Reviewed By: mdvacca
    
    Differential Revision: D13934066
    
    fbshipit-source-id: 5188b11428a4dca8cecd1934e593d89a6e3fde2e
Commits on Feb 1, 2019
  1. avoid double lookup of a nativemodule when resolving turbomodule

    fkgozali authored and facebook-github-bot committed Feb 1, 2019
    Summary: A simple optimization to not access `NativeModules` property twice.
    
    Reviewed By: RSNara
    
    Differential Revision: D13908128
    
    fbshipit-source-id: d41cd5f855fb0176170d6bdc3ac93df5593eeca5
Commits on Jan 31, 2019
  1. iOS: Make each module implement getTurboModuleWithJsInvoker: instead …

    fkgozali authored and facebook-github-bot committed Jan 31, 2019
    …of having centralized provider
    
    Summary:
    For better modularity, each module conforming to RCTTurboModule should provide a getter for the specific TurboModule instance for itself. This is a bit more extra work for devs, but simplify tooling and allow better modularity vs having a central function that provides the correct instance based on name.
    
    Note: Android may or may not follow this new pattern -- TBD.
    
    Reviewed By: RSNara
    
    Differential Revision: D13882073
    
    fbshipit-source-id: 6d5f82af67278c39c43c4f7970995690d4a82a98
Commits on Jan 30, 2019
  1. Revert D13860038: [react-native][PR] Add ability to control scroll an…

    fkgozali authored and facebook-github-bot committed Jan 30, 2019
    …imation duration for Android
    
    Differential Revision:
    D13860038
    
    Original commit changeset: f06751d063a3
    
    fbshipit-source-id: 5d89137aed0d549004e790068c1e4998ebccdaf1
Commits on Jan 8, 2019
  1. Re-land D13583442: [RN] Moved TurboModule iOS core to github

    fkgozali authored and facebook-github-bot committed Jan 8, 2019
    Summary:
    The original commit was backed out due to a build failure, which seems to be due to compiler flag misconfiguration. That has been fixed.
    
    Original commit: f2fccbb
    
    Reviewed By: mdvacca
    
    Differential Revision: D13593075
    
    fbshipit-source-id: f3a65e8bd9830f6ac2ea829020500b4632ee2149
Commits on Jan 7, 2019
  1. Revert D13583442: [RN] Moved TurboModule iOS core to github

    fkgozali authored and facebook-github-bot committed Jan 7, 2019
    Differential Revision:
    D13583442
    
    Original commit changeset: bb1cabd973e8
    
    fbshipit-source-id: 0279e68c7001ec91cf7bbd835bf83232943bb708
Commits on Jan 5, 2019
  1. Move TurboModuleRegistry (JS) to github

    fkgozali authored and facebook-github-bot committed Jan 5, 2019
    Summary:
    Moved the JS wrapper function to github. To access a TurboModule from JS:
    
    ```
    export interface Spec extends TurboModule {
      +func1: () => number,
    }
    
    const module = TurboModuleRegistry.get<Spec>('SampleTurboModule');
    ```
    
    This assumes:
    * the binding on the native side has been installed properly, i.e. `global.__turboModuleProxy` needs to be installed properly.
    * the module `SampleTurboModule` is registered properly in native.
    
    More instructions will be provided later.
    
    Reviewed By: yungsters
    
    Differential Revision: D13584561
    
    fbshipit-source-id: 50d29d88787f8d9caa7a3ee0d54d378db866515c
Commits on Jan 4, 2019
  1. Moved TurboModule iOS core to github

    fkgozali authored and facebook-github-bot committed Jan 4, 2019
    Summary:
    This is the iOS binding for TurboModule.
    
    To install the TurboModule binding:
    * Provide `RCTCxxBridgeDelegate`
    * Provide `RCTTurboModuleManagerDelegate`
    
    Somewhere in `RCTCxxBridgeDelegate` impl:
    
    ```
    RCTTurboModuleManager *manager = [[RCTTurboModuleManager alloc] initWithRuntime:&runtime bridge:bridge delegate:self];
    [manager installJSBinding];
    ```
    
    Doing so will install `global.__turboModuleProxy()` in JS space.
    
    Note:
    * The full instructions will be provided once all pieces are moved to OSS.
    * Sample modules and binding setup will be provided later.
    
    Reviewed By: RSNara
    
    Differential Revision: D13583442
    
    fbshipit-source-id: bb1cabd973e8a9ec59da6b145826e9ea234a96b3
Commits on Dec 27, 2018
  1. Moved TurboModule C++ core to github

    fkgozali authored and facebook-github-bot committed Dec 27, 2018
    Summary:
    This is only the core C++ part of TurboModule - moving to github to make integration with existing NativeModules system slightly easier. Other bindings for iOS/Android are not yet ready to move.
    
    Notes:
    * TurboModules is not ready to use at the moment.
    * Build configuration is not yet provided (cocoapods/.xcodeproj/gradle), just like Fabric.
    * No effort was done to make this lib C++17 strictly compliant yet (there will be in the future).
    
    Reviewed By: RSNara
    
    Differential Revision: D13551211
    
    fbshipit-source-id: cd3b458e6746ee9218451962ca65b1ad641a32db
Commits on Dec 26, 2018
  1. android: worked around onTouchEvent exception

    fkgozali authored and facebook-github-bot committed Dec 26, 2018
    Summary: Catch `IllegalArgumentException: ReactViewPager.onTouchEvent` and ignore it (but log something) to work around this known bug in the Android SDK per chrisbanes/PhotoView#31 (comment). Note that `onInterceptTouchEvent()` is already doing the same thing.
    
    Reviewed By: yungsters
    
    Differential Revision: D13550425
    
    fbshipit-source-id: 9fa3a7a0ca0cd95aafa3bcae6a59e0d1e690b564
  2. iOS: guard against bad RCTModuleData instance

    fkgozali authored and facebook-github-bot committed Dec 26, 2018
    Summary: In some rare race condition (usually involving network request handling vs bridge shutting down), there may be bad access to an RCTModuleData that may have been de-allocated. To prevent crashes, let's guard the access and return nil appropriately.
    
    Reviewed By: yungsters
    
    Differential Revision: D13548755
    
    fbshipit-source-id: b97326524cd9ca70a13d15098a1eaadfc7f1a6a8
Commits on Dec 14, 2018
  1. Surface: fixed up surface stage value check

    fkgozali authored and facebook-github-bot committed Dec 14, 2018
    Summary: Some logic to check for surface stage should've done bitwise `&` operation instead of equality check, because we do bitwise `|` whenever we "set stage".
    
    Reviewed By: shergin
    
    Differential Revision: D13459156
    
    fbshipit-source-id: 94e2f5279fb1a31060beb7d6195953b25ce603c9
Commits on Dec 11, 2018
  1. iOS: ignore extra modules during bridge start up if it's marked for T…

    fkgozali authored and facebook-github-bot committed Dec 11, 2018
    …urboModule
    
    Summary: Currently, bridge delegate can provide extra modules during bridge start up path. For TurboModules, we don't need this mechanism (if we need eager init, it will be done in a different way). So, let's ignore modules marked as RCTTurboModule if they are supplied as "extra native modules".
    
    Reviewed By: axe-fb
    
    Differential Revision: D13383710
    
    fbshipit-source-id: c88d32739be9f66e0daf07ef5465ea6457f8d1c6
Commits on Dec 5, 2018
  1. Guard calls to debug features in fabric test

    fkgozali authored and facebook-github-bot committed Dec 5, 2018
    Summary:
    In some setup, buck cxx test for android runs with `NDEBUG` set, hence we can't call debug symbols in the test cases. So guard those callsites with `#ifndef NDEBUG`.
    
    Also, some dependencies for this test target depend on Android specific symbols, so we have to mark it as instrumentation test for now (FB-specific).
    
    Reviewed By: sahrens
    
    Differential Revision: D13337637
    
    fbshipit-source-id: 02ff152df9937f2b0b8596f53789cdee8ee8a539
  2. xplat: pass through config object to fabric UIManager layer

    fkgozali authored and facebook-github-bot committed Dec 5, 2018
    Summary: For configuration purpose, pass down config object from the hosting app and use it in UITemplateProcessor.
    
    Reviewed By: sahrens
    
    Differential Revision: D13290322
    
    fbshipit-source-id: 8bb6d7f5a3f977b873e548e15603259876b46dc8
  3. xplat: added ReactNativeConfig to access runtime specific config values

    fkgozali authored and facebook-github-bot committed Dec 5, 2018
    Summary: Each app may provide different impl for its runtime specific behaviors, then Fabric and other new infra can share the same config instance to configure stuffs.
    
    Reviewed By: sahrens
    
    Differential Revision: D13290319
    
    fbshipit-source-id: 30e3eeedc6ff6ef250ed233b27e38cb7c1062b55
Commits on Nov 20, 2018
  1. iOS TM: RCTEnableJSINativeModule => RCTEnableTurboModule

    fkgozali authored and facebook-github-bot committed Nov 20, 2018
    Summary: Leftover name change from previous codemod.
    
    Reviewed By: shergin
    
    Differential Revision: D13117615
    
    fbshipit-source-id: 2584a2a90d3db6ed9a9e9cb8727c51da34f0927c
Commits on Nov 14, 2018
  1. iOS TM: Rename RCTJSINativeModule => RCTTurboModule

    fkgozali authored and facebook-github-bot committed Nov 14, 2018
    Summary: Simple codemod to rename RCTJSINativeModule => RCTTurboModule (the protocol) for less confusion.
    
    Reviewed By: PeteTheHeat
    
    Differential Revision: D13054206
    
    fbshipit-source-id: 4829dc69838c623336475ea8ee11be815d79711c
  2. Guard Platform.isTesting under __DEV__

    fkgozali authored and facebook-github-bot committed Nov 14, 2018
    Summary: Testing is a __DEV__ time only, so let's optimize for prod bundles.
    
    Reviewed By: ejanzer
    
    Differential Revision: D13050583
    
    fbshipit-source-id: a96e35e4d5f3bd09c235c11d4ece3e4d07882de7
  3. iOS: add moduleForNameForcedLoad: to lookup modules by name and force…

    fkgozali authored and facebook-github-bot committed Nov 14, 2018
    … load them
    
    Summary:
    Some module classes may not be loaded yet, so looking up via classes may not always give the correct instance. This diff added a new lookup method that delegate to the bridge delegate to force load the modules as needed.
    
    The existing moduleForName: method was left untouched because it's solely used by RCTUIManager at the moment.
    
    Reviewed By: dshahidehpour
    
    Differential Revision: D13033876
    
    fbshipit-source-id: 4082fcd68498004f678b4b95adc82b5b134fefdf
Commits on Nov 9, 2018
  1. iOS: ignore double registration of lazy modules with chrome attached

    fkgozali authored and facebook-github-bot committed Nov 9, 2018
    Summary: Depending on when Chrome debugger is attached, modules may get double registered. Simply ignore it for this case. The redbox was not a fatal error, which can be dismissed.
    
    Reviewed By: shergin
    
    Differential Revision: D12996107
    
    fbshipit-source-id: 292f63102337077848842ca46b3daed08b1cae12
Older
You can’t perform that action at this time.