mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Make file backed strings dup the provided file descriptor.
Reviewed By: mhorowitz Differential Revision: D4326645 fbshipit-source-id: 2741f1fead4f42ae76787f8a70c1e787445b827d
This commit is contained in:
committed by
Facebook Github Bot
parent
349bbb54f7
commit
fa082796a5
@@ -9,6 +9,7 @@
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <folly/Memory.h>
|
||||
#include <folly/ScopeGuard.h>
|
||||
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
@@ -51,7 +52,7 @@ std::unique_ptr<const JSBigOptimizedBundleString> JSBigOptimizedBundleString::fr
|
||||
uint8_t encoding;
|
||||
struct stat fileInfo;
|
||||
int fd = -1;
|
||||
SCOPE_FAIL { CHECK(fd == -1 || ::close(fd) == 0); };
|
||||
SCOPE_EXIT { CHECK(fd == -1 || ::close(fd) == 0); };
|
||||
|
||||
{
|
||||
auto metaPath = bundlePath + UNPACKED_META_PATH_SUFFIX;
|
||||
|
||||
Reference in New Issue
Block a user