Commit Graph

22 Commits

Author SHA1 Message Date
Milen Dzhumerov 638fd11c5c Revert 3770f061c832 for further investigation
Reviewed By: idevelop

Differential Revision: D2695659

fb-gh-sync-id: b1ba529c648681faef5d4f07273722764722fbe1
2015-11-25 05:24:28 -08:00
Milen Dzhumerov fc5a8678d3 Implement efficient DiskCache.clear()
Summary: public

Ability to efficiently remove all keys with a particular prefix

Reviewed By: tadeuzagallo

Differential Revision: D2658741

fb-gh-sync-id: 3770f061c83288efe645162ae84a9fd9194d2fd6
2015-11-25 03:23:36 -08:00
Nick Lockwood 397791fcea Added in-memory cache for AsyncLocalStorage
Reviewed By: tadeuzagallo

Differential Revision: D2641705

fb-gh-sync-id: 40b96b3084b82779e16f8845f9faeb0e3638d189
2015-11-14 09:20:30 -08:00
Nick Lockwood 5931089677 Improved AsyncStorage merge function
Reviewed By: tadeuzagallo

Differential Revision: D2641817

fb-gh-sync-id: 0ba526ce21039ccdb979ac75c44d41c522c910ca
2015-11-11 09:03:05 -08:00
Bhuwan Khattar a4cc0c3ffd No `NSError *` over the bridge
Summary: I was getting the following error when running `testAsyncStorageTest`
```
uncaught exception 'NSInvalidArgumentException', reason: 'Invalid type in JSON write (NSError)'
```

nicklockwood pointed out that it might be because we're attempting to send a `NSError *` over the bridge at some point. So I went looking for cases where that might happen and found this instance.

public

Reviewed By: jingc

Differential Revision: D2619240

fb-gh-sync-id: dc26ec268f976fec44f2804831398d3b01ab6115
2015-11-04 20:07:31 -08:00
Nick Lockwood c5b990f65f Added lightweight generic annotations
Summary: public

Added lightweight genarics annotations to make the code more readable and help the compiler catch bugs.

Fixed some type bugs and improved bridge validation in a few places.

Reviewed By: javache

Differential Revision: D2600189

fb-gh-sync-id: f81e22f2cdc107bf8d0b15deec6d5b83aacc5b56
2015-11-03 14:49:30 -08:00
Nick Lockwood b59f250214 Backed out D2540626
Reviewed By: jingc

Differential Revision: D2590392

fb-gh-sync-id: 2893a4ee6ddd0de12803560b355cee6f1b9d43e6
2015-10-28 11:46:26 -07:00
Nick Lockwood c76c22249d Clear cache entry when calling multiRemove
Reviewed By: javache

Differential Revision: D2560487

fb-gh-sync-id: 4d2c192cc659f118fd5667da2a029457328eae9f
2015-10-20 11:50:30 -07:00
Nick Lockwood dbe37e7898 Improved AsyncLocalStorage performance
Reviewed By: javache

Differential Revision: D2540626

fb-gh-sync-id: f94def7463075d40c2dcfea1cb4c01502aefa117
2015-10-20 09:42:23 -07:00
Nick Lockwood 88e0bbc469 Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
Nick Lockwood 8d1e02b8bd Convert alloc/init to new to please linter 2015-08-17 08:46:00 -07:00
Pieter De Baets fa07736ee1 Remove isValid from RCTInvalidating
Summary:
We only actually use it on RCTBridge and RCTJavaScriptExecutor, so add it to these interfaces explicitly
2015-08-14 01:57:18 -08:00
Nick Lockwood 0624a0fe52 Fixed async local storage 2015-06-23 14:24:42 -08:00
Nick Lockwood 86639450ee Fixed AsyncLocalStorage bug 2015-06-22 14:40:33 -08:00
Spencer Ahrens dc393162c3 [RN Events] clear disk cache on logout 2015-06-18 09:32:05 -08:00
Tadeu Zagallo 2a7adfb815 [ReactNative] Use RCTNullIfNill and (id)kCFNull
Summary:
@public

Use consistent `null` handling:

`value || null`                ->  `RCTNullIfNil(value)`
`value == null ? nil : value`  ->  `RCTNilIfNull(value)`
`[NSNull null]`                ->  `(id)kCFNull`

Test Plan: The tests should be enough.
2015-06-12 11:03:10 -08:00
Spencer Ahrens 7ffa7bd1f1 [ReactNative] Implement merge functionality for AsyncStorage 2015-06-03 16:53:29 -08:00
Nick Lockwood ead0f2e020 Implemented thread control for exported methods 2015-04-18 11:13:39 -08:00
Alex Akers 8a57c4e980 [React Native] RCT_EXPORT lvl.2 2015-04-08 08:34:10 -08:00
Nick Lockwood bf4868edda Added non-class-scanning-based approach fror registering js methods 2015-04-08 05:45:20 -08:00
Janic Duplessis 8d7b6d9a99 Fix a crash in RCTAsyncLocalStorage when the value is not a string.
Summary:
When you forget to pass the value parameter to AsyncStorage.setItem the entire app would crash instead of showing a useful error message. The problem was that the error function used in the file expected a dictionary but was passed the value of the key which caused the crash.
Closes https://github.com/facebook/react-native/pull/535
Github Author: Janic Duplessis <janicduplessis@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.
2015-03-31 15:09:05 -08:00
Tadeu Zagallo 20291a02df [ReactNative] s/ReactKit/React/g 2015-03-26 02:42:24 -08:00