react-native/React/Base
Ashok Menon 1635c02e92 Simplifying Struct definition.
Summary:
Since we are reading from a file, we should make sure this struct is packed, just in case we change it down the line and the compiler decides it might want to introduce padding, we're now protected against that.

There was also a discussion about the fact that people might use `ptr += sizeof(BundleHeader)` as an idiom in their code, which would currently be incorrect, if padding was introduced at the end of the file. Actually, it remains incorrect to do that now, because a RAM bundle header is a different size to a BC Bundle header. If people are properly testing their code, they should spot this pretty quickly, because it will always be an incorrect thing to do with a RAM bundle, so this isn't as bad as previously thought: where the code only succeeds when the compiler deigns to not pad the struct at the end.

This diff also cleans up how headers are initialised. `BundleHeader` has a constructor that explicitly zero-initialises it so we can rely on the default initializer to do the right thing now.

Reviewed By: mhorowitz

Differential Revision: D4572032

fbshipit-source-id: 7dc50cfa9438dfdfb9f842dc39d8f15334813c63
2017-02-20 04:30:19 -08:00
..
RCTAssert.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTAssert.m Display JS exceptions and stacks in a red box. 2016-06-30 19:43:28 -07:00
RCTBatchedBridge.m Show redbox when no bundle is present 2017-01-13 03:43:35 -08:00
RCTBridge+Private.h Support QuickPerformanceLogger.js in CxxBridge 2017-02-17 06:00:54 -08:00
RCTBridge.h Adding support in the new RN bridge on iOS 2017-01-10 11:28:44 -08:00
RCTBridge.m Support QuickPerformanceLogger.js in CxxBridge 2017-02-17 06:00:54 -08:00
RCTBridgeDelegate.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTBridgeMethod.h Support sync method calls in the objc bridge 2016-09-05 07:44:00 -07:00
RCTBridgeModule.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTBundleURLProvider.h allow fetching any resource under js folder via packager 2016-10-20 11:43:44 -07:00
RCTBundleURLProvider.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTConvert.h Added support of `direction` style property 2017-02-06 21:00:16 -08:00
RCTConvert.m Rename YGUnitPixel to YGPoint... 2017-02-14 14:31:31 -08:00
RCTDefines.h Add RCT_PROFILE define 2016-06-13 04:28:38 -07:00
RCTDisplayLink.h Pull CADisplayLink into a separate file 2016-03-29 19:53:20 -07:00
RCTDisplayLink.m Remove last arg from RCTProfileEnd, make macro's function-like 2016-09-05 11:13:33 -07:00
RCTErrorCustomizer.h Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTErrorInfo.h Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTErrorInfo.m Add ability to customize error messages and stacks within the iOS redbox 2016-07-18 11:28:36 -07:00
RCTEventDispatcher.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTEventDispatcher.m Dispatch native handled events to JS 2016-11-23 05:43:35 -08:00
RCTFrameUpdate.h Pause JS DisplayLink if nothing to process. 2015-09-29 09:22:10 -07:00
RCTFrameUpdate.m Ran Convert > To Modern Objective C Syntax 2015-08-25 01:08:49 -08:00
RCTImageSource.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTImageSource.m Support bundle argument for image loading 2016-08-31 17:43:49 -07:00
RCTInvalidating.h Remove isValid from RCTInvalidating 2015-08-14 01:57:18 -08:00
RCTJSStackFrame.h Class for JS stack frames instead of dictionaries 2016-07-11 06:13:32 -07:00
RCTJSStackFrame.m Fix crash in RCTJSStackFrame 2016-08-26 09:58:47 -07:00
RCTJavaScriptExecutor.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTJavaScriptLoader.h JavaScriptLoader BCBundle version check 2017-01-11 22:28:43 -08:00
RCTJavaScriptLoader.mm Simplifying Struct definition. 2017-02-20 04:30:19 -08:00
RCTKeyCommands.h Add Shortcut "Double R" to Reload JS in iOS 2016-06-01 03:43:27 -07:00
RCTKeyCommands.m Cleanup warnings 2016-07-12 05:59:12 -07:00
RCTLog.h The warning 'cannot calculate shadow efficiently' is not a warning anymore 2017-01-25 12:28:50 -08:00
RCTLog.mm Show redbox when no bundle is present 2017-01-13 03:43:35 -08:00
RCTModuleData.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTModuleData.mm Remove deprecated method 'RCTExecuteOnMainThread' 2017-01-16 15:13:36 -08:00
RCTModuleMethod.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTModuleMethod.m Add scrollToEnd to ScrollView and ListView 2017-01-27 10:13:29 -08:00
RCTMultipartDataTask.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTMultipartDataTask.m Fix some warnings in React.xcodeproj 2016-10-27 04:29:01 -07:00
RCTMultipartStreamReader.h Add multipart response stream reader 2016-10-03 18:13:36 -07:00
RCTMultipartStreamReader.m Add multipart response download task (2nd edition) 2016-10-11 12:28:42 -07:00
RCTNullability.h Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTParserUtils.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTParserUtils.m Replaced RegExp method parser with recursive descent 2015-12-10 10:12:29 -08:00
RCTPerformanceLogger.h Refactor measuring native requires 2016-09-09 15:28:44 -07:00
RCTPerformanceLogger.m Refactor measuring native requires 2016-09-09 15:28:44 -07:00
RCTPlatform.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTPlatform.m Switch out DISABLE_YELLOW_BOX for IS_TESTING 2017-01-18 12:28:42 -08:00
RCTReloadCommand.h Refactor reload command in React Native 2016-12-07 20:13:22 -08:00
RCTReloadCommand.m Refactor reload command in React Native 2016-12-07 20:13:22 -08:00
RCTRootContentView.h Splitting `RCTRootView.m`, decoupling RCTRootContentView 2017-02-19 23:19:47 -08:00
RCTRootContentView.m Splitting `RCTRootView.m`, decoupling RCTRootContentView 2017-02-19 23:19:47 -08:00
RCTRootView.h Simplifying mess with RCTRootViewSizeFlexibility 2017-02-19 23:19:47 -08:00
RCTRootView.m Splitting `RCTRootView.m`, decoupling RCTRootContentView 2017-02-19 23:19:47 -08:00
RCTRootViewDelegate.h Prevent RCTRootView delegate call 2015-11-13 08:28:28 -08:00
RCTRootViewInternal.h Splitting `RCTRootView.m`, decoupling RCTRootContentView 2017-02-19 23:19:47 -08:00
RCTTVRemoteHandler.h Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTVRemoteHandler.m Apple TV support 4: support for input (tvOS focus engine) 2016-12-19 06:28:40 -08:00
RCTTouchEvent.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTTouchEvent.m New way to handle simultaneously active gesture recognizers in RCTTouchHandler 2017-01-12 12:13:28 -08:00
RCTTouchHandler.h Nobody outside RCTTouchHandler should treat it as UIGestureRecognizer subclass 2017-01-09 00:13:33 -08:00
RCTTouchHandler.m RCTTouchHandler doesn't delay any touches anymore 2017-01-13 17:43:35 -08:00
RCTURLRequestDelegate.h Refactored networking logic out into RCTDownloadTask 2015-07-23 04:00:31 -08:00
RCTURLRequestHandler.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTUtils.h Remove deprecated method 'RCTExecuteOnMainThread' 2017-01-16 15:13:36 -08:00
RCTUtils.m Remove deprecated method 'RCTExecuteOnMainThread' 2017-01-16 15:13:36 -08:00
RCTWebSocketObserverProtocol.h Expose more of RCTWebSocketObserver 2016-12-08 07:44:38 -08:00