Add SamplingProfilerMethod to CSDevelopmentGlobalStateManager

Reviewed By: cwdick

Differential Revision: D5010523

fbshipit-source-id: ad602dfae039e0cbb7c62d42d75a93d1aa2d3aa4
This commit is contained in:
Lukas Piatkowski 2017-05-10 03:46:49 -07:00 committed by Facebook Github Bot
parent 621148d724
commit 5dcfb2c6ad
2 changed files with 4 additions and 3 deletions

View File

@ -129,7 +129,8 @@ public class DevServerHelper {
mRestartOnChangePollingHandler = new Handler();
}
public void openPackagerConnection(final PackagerCommandListener commandListener) {
public void openPackagerConnection(
final String clientId, final PackagerCommandListener commandListener) {
if (mPackagerClient != null) {
FLog.w(ReactConstants.TAG, "Packager connection already open, nooping.");
return;
@ -159,7 +160,7 @@ public class DevServerHelper {
handlers.putAll(new FileIoHandler().handlers());
mPackagerClient = new JSPackagerClient(
"devserverhelper",
clientId,
mSettings.getPackagerConnectionSettings(),
handlers);
mPackagerClient.init();

View File

@ -882,7 +882,7 @@ public class DevSupportManagerImpl implements
mDevLoadingViewController.show();
}
mDevServerHelper.openPackagerConnection(this);
mDevServerHelper.openPackagerConnection(this.getClass().getSimpleName(), this);
mDevServerHelper.openInspectorConnection();
if (mDevSettings.isReloadOnJSChangeEnabled()) {
mDevServerHelper.startPollingOnChangeEndpoint(