mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-11 11:29:03 +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
@@ -28,10 +28,9 @@ static JSValueRef nativeCaptureHeap(
|
||||
return Value::makeUndefined(ctx);
|
||||
}
|
||||
|
||||
JSStringRef outputFilename = JSValueToStringCopy(ctx, arguments[0], exception);
|
||||
std::string finalFilename = facebook::react::String::ref(outputFilename).str();
|
||||
JSCaptureHeap(ctx, finalFilename.c_str(), exception);
|
||||
JSStringRelease(outputFilename);
|
||||
auto outputFilename = String::adopt(
|
||||
ctx, JSValueToStringCopy(ctx, arguments[0], exception));
|
||||
JSCaptureHeap(ctx, outputFilename.str().c_str(), exception);
|
||||
return Value::makeUndefined(ctx);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user