small fixes to ReactCommon

Summary: unneeded or overly generic header files, stuff like that.

Reviewed By: javache

Differential Revision: D4434029

fbshipit-source-id: f25c702e7fc8d8debbd865cf3822696bf9b61c81
This commit is contained in:
Marc Horowitz 2017-02-01 14:10:34 -08:00 committed by Facebook Github Bot
parent f33f84e75f
commit ad549c067a
5 changed files with 5 additions and 7 deletions

View File

@ -11,7 +11,6 @@
#include <folly/json.h>
#include <folly/Exception.h>
#include <folly/Memory.h>
#include <folly/String.h>
#include <folly/Conv.h>
#include <fcntl.h>
#include <sys/time.h>

View File

@ -45,7 +45,7 @@ JSIndexedRAMBundle::Module JSIndexedRAMBundle::getModule(uint32_t moduleId) cons
return ret;
}
std::unique_ptr<const facebook::react::JSBigString> JSIndexedRAMBundle::getStartupCode() {
std::unique_ptr<const JSBigString> JSIndexedRAMBundle::getStartupCode() {
CHECK(m_startupCode) << "startup code for a RAM Bundle can only be retrieved once";
return std::move(m_startupCode);
}

View File

@ -21,7 +21,7 @@ public:
JSIndexedRAMBundle(const char *sourceURL);
// Throws std::runtime_error on failure.
std::unique_ptr<const facebook::react::JSBigString> getStartupCode();
std::unique_ptr<const JSBigString> getStartupCode();
// Throws std::runtime_error on failure.
Module getModule(uint32_t moduleId) const override;
@ -56,7 +56,7 @@ private:
mutable std::ifstream m_bundle;
ModuleTable m_table;
size_t m_baseOffset;
std::unique_ptr<facebook::react::JSBigBufferString> m_startupCode;
std::unique_ptr<JSBigBufferString> m_startupCode;
};
} // namespace react

View File

@ -9,7 +9,7 @@
#define USE_FOLLY_FOR_TO_STRING 1
#elif defined(__has_include)
#define USE_FOLLY_FOR_ENDIAN_SWAP __has_include(<folly/Bits.h>)
#define USE_FOLLY_FOR_TO_STRING __has_include(<folly/String.h>)
#define USE_FOLLY_FOR_TO_STRING __has_include(<folly/Conv.h>)
#else
#define USE_FOLLY_FOR_ENDIAN_SWAP 0
#define USE_FOLLY_FOR_TO_STRING 0
@ -23,7 +23,7 @@
#endif // USE_FOLLY_FOR_ENDIAN_SWAP
#if USE_FOLLY_FOR_TO_STRING
#include <folly/String.h>
#include <folly/Conv.h>
#else
#include <sstream>
#include <string>

View File

@ -6,7 +6,6 @@
#include <fbsystrace.h>
#endif
#include <folly/String.h>
#include <glog/logging.h>
#include "JavaScriptCore.h"