Skip to content

Commit

Permalink
fix[react-devtools]: removed redundant startProfiling call (#31131)
Browse files Browse the repository at this point in the history
Stacked on #31118. See last
commit.

We don't need to call `startProfiling()` here, because we delegate this
to the Renderer itself:

https://github.com/facebook/react/blob/830e823cd2c6ee675636d31320b10350e8ade9ae/packages/react-devtools-shared/src/backend/fiber/renderer.js#L5227-L5232

Since this is de-facto the constructor of Renderer, this will be called
earlier.

Validated via testing the reload-to-profile for Chrome browser
extension.
  • Loading branch information
hoxyq authored Oct 9, 2024
1 parent 389a2de commit 4a86ec5
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions packages/react-devtools-shared/src/backend/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -714,10 +714,6 @@ export default class Agent extends EventEmitter<{
) {
this._rendererInterfaces[rendererID] = rendererInterface;

if (this._isProfiling) {
rendererInterface.startProfiling(this._recordChangeDescriptions);
}

rendererInterface.setTraceUpdatesEnabled(this._traceUpdatesEnabled);

// When the renderer is attached, we need to tell it whether
Expand Down

0 comments on commit 4a86ec5

Please sign in to comment.