mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Remove references to legacy JSC SamplingProfiler
Summary: This module is no longer functional, the global method `pokeSamplingProfiler` does not exist. There are no implementations in the core of `JSCSamplingProfiler` (removed back in 2019! - https://www.internalfb.com/diff/D10473627) Changelog: [Internal] Reviewed By: fabriziocucci Differential Revision: D67140119 fbshipit-source-id: 9dfe80d63e935004ef4a1956e8a7a544a2f9a8c1
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e06fa5d102
commit
49a594a513
@@ -16,9 +16,6 @@ registerModule('Systrace', () => require('../Performance/Systrace'));
|
||||
if (!(global.RN$Bridgeless === true)) {
|
||||
registerModule('JSTimers', () => require('./Timers/JSTimers'));
|
||||
}
|
||||
registerModule('SamplingProfiler', () =>
|
||||
require('../Performance/SamplingProfiler'),
|
||||
);
|
||||
registerModule('RCTLog', () => require('../Utilities/RCTLog'));
|
||||
registerModule(
|
||||
'RCTDeviceEventEmitter',
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict
|
||||
* @format
|
||||
*/
|
||||
|
||||
export * from '../../src/private/specs/modules/NativeJSCSamplingProfiler';
|
||||
import NativeJSCSamplingProfiler from '../../src/private/specs/modules/NativeJSCSamplingProfiler';
|
||||
export default NativeJSCSamplingProfiler;
|
||||
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
* @flow strict
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const SamplingProfiler = {
|
||||
poke: function (token: number): void {
|
||||
let error = null;
|
||||
let result = null;
|
||||
try {
|
||||
result = global.pokeSamplingProfiler();
|
||||
if (result === null) {
|
||||
console.log('The JSC Sampling Profiler has started');
|
||||
} else {
|
||||
console.log('The JSC Sampling Profiler has stopped');
|
||||
}
|
||||
} catch (e) {
|
||||
console.log(
|
||||
'Error occurred when restarting Sampling Profiler: ' + e.toString(),
|
||||
);
|
||||
error = e.toString();
|
||||
}
|
||||
|
||||
const NativeJSCSamplingProfiler =
|
||||
require('./NativeJSCSamplingProfiler').default;
|
||||
if (NativeJSCSamplingProfiler) {
|
||||
NativeJSCSamplingProfiler.operationComplete(token, result, error);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = SamplingProfiler;
|
||||
@@ -6953,18 +6953,6 @@ exports[`public API should not change unintentionally Libraries/NewAppScreen/ind
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Performance/NativeJSCSamplingProfiler.js 1`] = `
|
||||
"export * from \\"../../src/private/specs/modules/NativeJSCSamplingProfiler\\";
|
||||
declare export default typeof NativeJSCSamplingProfiler;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Performance/SamplingProfiler.js 1`] = `
|
||||
"declare const SamplingProfiler: { poke: (token: number) => void };
|
||||
declare module.exports: SamplingProfiler;
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`public API should not change unintentionally Libraries/Performance/Systrace.js 1`] = `
|
||||
"type EventName = string | (() => string);
|
||||
type EventArgs = ?{ [string]: string };
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
@property (nonatomic, readonly) BOOL isHotLoadingAvailable;
|
||||
@property (nonatomic, readonly) BOOL isRemoteDebuggingAvailable;
|
||||
@property (nonatomic, readonly) BOOL isDeviceDebuggingAvailable;
|
||||
@property (nonatomic, readonly) BOOL isJSCSamplingProfilerAvailable;
|
||||
|
||||
/**
|
||||
* Whether the bridge is connected to a remote JS executor.
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
/**
|
||||
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
*
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @flow strict
|
||||
* @format
|
||||
*/
|
||||
|
||||
import type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';
|
||||
|
||||
import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';
|
||||
|
||||
export interface Spec extends TurboModule {
|
||||
+operationComplete: (token: number, result: ?string, error: ?string) => void;
|
||||
}
|
||||
|
||||
export default (TurboModuleRegistry.get<Spec>('JSCSamplingProfiler'): ?Spec);
|
||||
Reference in New Issue
Block a user