mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add HERMES_BYTECODE_VERSION to JS bundle requestUrl
Summary: Changelog: [General][Added] - Adds the Hermes runtime bytecode version number to the JS bundle requestURL. This allows Metro with Bytecode to work with prebuilt binaries. Reviewed By: cpojer Differential Revision: D24327852 fbshipit-source-id: e8ee8db4f9b01f0500ab9dd851b5818c4adf3303
This commit is contained in:
committed by
Facebook GitHub Bot
parent
213b02b378
commit
34c405462f
@@ -10,11 +10,6 @@
|
||||
#import "RCTConvert.h"
|
||||
#import "RCTDefines.h"
|
||||
|
||||
#if __has_include("hermes.h") || __has_include(<hermes/hermes.h>)
|
||||
#import <hermes/hermes.h>
|
||||
#define HAS_BYTECODE_VERSION
|
||||
#endif
|
||||
|
||||
NSString *const RCTBundleURLProviderUpdatedNotification = @"RCTBundleURLProviderUpdatedNotification";
|
||||
|
||||
const NSUInteger kRCTBundleURLProviderDefaultPort = RCT_METRO_PORT;
|
||||
@@ -236,9 +231,8 @@ static NSURL *serverRootWithHostPort(NSString *hostPort)
|
||||
runModule:(BOOL)runModule
|
||||
{
|
||||
NSString *path = [NSString stringWithFormat:@"/%@.bundle", bundleRoot];
|
||||
#ifdef HAS_BYTECODE_VERSION
|
||||
NSString *runtimeBytecodeVersion =
|
||||
[NSString stringWithFormat:@"&runtimeBytecodeVersion=%u", facebook::hermes::HermesRuntime::getBytecodeVersion()];
|
||||
#ifdef HERMES_BYTECODE_VERSION
|
||||
NSString *runtimeBytecodeVersion = [NSString stringWithFormat:@"&runtimeBytecodeVersion=%u", HERMES_BYTECODE_VERSION];
|
||||
#else
|
||||
NSString *runtimeBytecodeVersion = @"";
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user