mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-23 03:44:13 +08:00
Remove additional JSON encoding for native->JS communication
Reviewed By: mhorowitz Differential Revision: D3857323 fbshipit-source-id: 4386cc107b8a1425ecb7297b0f659f6c47f01a78
This commit is contained in:
committed by
Facebook Github Bot 2
parent
bd4cd6ea5d
commit
145109fc6d
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user