Update button and add comments to Perf Monitor
Summary: public Rename the dev menu button and add comments to the private method used. Reviewed By: ndfred Differential Revision: D2576599 fb-gh-sync-id: cd5cde7562dcbc243663ac68d2b9cac5c0a984ab
This commit is contained in:
parent
032c3641d0
commit
a044ade333
|
@ -34,8 +34,16 @@ static BOOL RCTJSCSetOption(const char *option)
|
||||||
static dispatch_once_t onceToken;
|
static dispatch_once_t onceToken;
|
||||||
|
|
||||||
dispatch_once(&onceToken, ^{
|
dispatch_once(&onceToken, ^{
|
||||||
|
/**
|
||||||
|
* JSC private C++ static method to toggle options at runtime
|
||||||
|
*
|
||||||
|
* JSC::Options::setOptions - JavaScriptCore/runtime/Options.h
|
||||||
|
*/
|
||||||
setOption = dlsym(RTLD_DEFAULT, "_ZN3JSC7Options9setOptionEPKc");
|
setOption = dlsym(RTLD_DEFAULT, "_ZN3JSC7Options9setOptionEPKc");
|
||||||
setOption("logGC=1");
|
|
||||||
|
if (RCT_DEBUG && setOption == NULL) {
|
||||||
|
RCTLogWarn(@"The symbol used to enable JSC runtime options is not available in this iOS version");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
if (setOption) {
|
if (setOption) {
|
||||||
|
@ -117,8 +125,8 @@ RCT_EXPORT_MODULE()
|
||||||
__weak __typeof__(self) weakSelf = self;
|
__weak __typeof__(self) weakSelf = self;
|
||||||
_devMenuItem =
|
_devMenuItem =
|
||||||
[RCTDevMenuItem toggleItemWithKey:RCTPerfMonitorKey
|
[RCTDevMenuItem toggleItemWithKey:RCTPerfMonitorKey
|
||||||
title:@"Show Monitor"
|
title:@"Show Perf Monitor"
|
||||||
selectedTitle:@"Hide Monitor"
|
selectedTitle:@"Hide Perf Monitor"
|
||||||
handler:
|
handler:
|
||||||
^(BOOL selected) {
|
^(BOOL selected) {
|
||||||
if (selected) {
|
if (selected) {
|
||||||
|
|
Loading…
Reference in New Issue