Cleanup and document Value wrapper

Reviewed By: mhorowitz

Differential Revision: D5087565

fbshipit-source-id: 21b15dc4c476d6ecd7c42f9334c6995fa43810c2
This commit is contained in:
Pieter De Baets
2017-05-24 06:20:44 -07:00
committed by Facebook Github Bot
parent 48156b7967
commit 374d08b8e4
7 changed files with 150 additions and 146 deletions

View File

@@ -348,7 +348,7 @@ void JSCExecutor::loadApplicationScript(std::unique_ptr<const JSBigString> scrip
JSValueRef jsError;
JSValueRef result = JSC_JSEvaluateBytecodeBundle(m_context, NULL, sourceFD, jsSourceURL, &jsError);
if (result == nullptr) {
formatAndThrowJSException(m_context, jsError, jsSourceURL);
throw JSException(m_context, jsError, nullptr, jsSourceURL);
}
} else
#endif
@@ -392,7 +392,7 @@ void JSCExecutor::bindBridge() throw(JSException) {
batchedBridgeValue = requireBatchedBridge.asObject().callAsFunction({});
}
if (batchedBridgeValue.isUndefined()) {
throwJSExecutionException("Could not get BatchedBridge, make sure your bundle is packaged correctly");
throw JSException("Could not get BatchedBridge, make sure your bundle is packaged correctly");
}
}

View File

@@ -15,6 +15,10 @@
#include <jschelpers/JavaScriptCore.h>
#include <jschelpers/Value.h>
#ifndef RN_EXPORT
#define RN_EXPORT __attribute__((visibility("default")))
#endif
namespace facebook {
namespace react {