Remove additional JSON encoding for native->JS communication

Reviewed By: mhorowitz

Differential Revision: D3857323

fbshipit-source-id: 4386cc107b8a1425ecb7297b0f659f6c47f01a78
This commit is contained in:
Pieter De Baets
2016-09-19 04:43:09 -07:00
committed by Facebook Github Bot 2
parent bd4cd6ea5d
commit 145109fc6d
16 changed files with 224 additions and 100 deletions

View File

@@ -2,11 +2,13 @@
#include <string>
#include <gtest/gtest.h>
#include <folly/json.h>
#include <cxxreact/Value.h>
#ifdef WITH_FBJSCEXTENSION
#undef ASSERT
#include <JavaScriptCore/config.h>
#include <cxxreact/Value.h>
#include "OpaqueJSString.h"
#endif
#include <stdexcept>
@@ -58,6 +60,7 @@ TEST(Value, ToJSONString) {
JSGlobalContextRelease(ctx);
}
#ifdef WITH_FBJSCEXTENSION
// Just test that handling invalid data doesn't crash.
TEST(Value, FromBadUtf8) {
prepare();
@@ -101,3 +104,5 @@ TEST(Value, BadUtf16) {
v.toJSONString(0);
JSGlobalContextRelease(ctx);
}
#endif