mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-22 11:16:06 +08:00
Add JSContextRef param to String constructor
Reviewed By: bnham Differential Revision: D4197300 fbshipit-source-id: 306ffc85e3ced24047b68499f7cdf5e2d31fc052
This commit is contained in:
committed by
Facebook Github Bot
parent
b1c91606ff
commit
20514e3482
@@ -5,11 +5,11 @@
|
||||
namespace facebook {
|
||||
namespace react {
|
||||
|
||||
String jsStringFromBigString(const JSBigString& bigstr) {
|
||||
String jsStringFromBigString(JSContextRef ctx, const JSBigString& bigstr) {
|
||||
if (bigstr.isAscii()) {
|
||||
return String::createExpectingAscii(bigstr.c_str(), bigstr.size());
|
||||
return String::createExpectingAscii(ctx, bigstr.c_str(), bigstr.size());
|
||||
} else {
|
||||
return String(bigstr.c_str());
|
||||
return String(ctx, bigstr.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user