New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only attempt to clear measures if we created the measure #9451

Merged
merged 1 commit into from Apr 18, 2017

Conversation

Projects
None yet
3 participants
@chrisui
Contributor

chrisui commented Apr 18, 2017

This fixes an issue where if we decided not to create a measurement we would clear ALL measurements from the performance entry buffer due to passing undefined as the entry name.

The original bug here means any performance entries the user might have in their application will be inadvertently nuked.

For reference see the performance.clearMeasures spec.

Todo

  • Test/s incoming (would love some help in finding where to add such a test!)
Only attempt to clear measures if we created the measure
This fixes an issue where if we decided not to create a measurement we would clear ALL measurements from the performance entry buffer due to passing `undefined` as the entry name.
@facebook-github-bot

This comment has been minimized.

Show comment
Hide comment
@facebook-github-bot

facebook-github-bot Apr 18, 2017

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

facebook-github-bot commented Apr 18, 2017

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

@chrisui

This comment has been minimized.

Show comment
Hide comment
@chrisui

chrisui Apr 18, 2017

Contributor

Would love some assistance in targeting where to add a test for this. Can't seem to find any existing tests to add a new case to.

Contributor

chrisui commented Apr 18, 2017

Would love some assistance in targeting where to add a test for this. Can't seem to find any existing tests to add a new case to.

@facebook-github-bot

This comment has been minimized.

Show comment
Hide comment
@facebook-github-bot

facebook-github-bot Apr 18, 2017

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

facebook-github-bot commented Apr 18, 2017

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@gaearon

This comment has been minimized.

Show comment
Hide comment
@gaearon

gaearon Apr 18, 2017

Member

This seems fine as is, thanks! We don’t need a test because this code will be deleted in the next release (the perf integration is in a different place in Fiber). I think the new code doesn’t have this issue, but you can check ReactDebugFiberPerf to make sure.

I’ll make a note to cherry-pick this commit in 15.6.

Member

gaearon commented Apr 18, 2017

This seems fine as is, thanks! We don’t need a test because this code will be deleted in the next release (the perf integration is in a different place in Fiber). I think the new code doesn’t have this issue, but you can check ReactDebugFiberPerf to make sure.

I’ll make a note to cherry-pick this commit in 15.6.

@gaearon gaearon merged commit f6c4fe6 into facebook:master Apr 18, 2017

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@gaearon gaearon added this to the 15-hipri milestone Apr 18, 2017

@flarnie flarnie referenced this pull request Apr 18, 2017

Closed

React 15.6 Umbrella #9398

41 of 49 tasks complete
@chrisui

This comment has been minimized.

Show comment
Hide comment
@chrisui

chrisui Apr 18, 2017

Contributor

@gaearon Thanks for the quick turnaround Dan!

Contributor

chrisui commented Apr 18, 2017

@gaearon Thanks for the quick turnaround Dan!

flarnie added a commit that referenced this pull request Apr 20, 2017

Only attempt to clear measures if we created the measure (#9451)
This fixes an issue where if we decided not to create a measurement we would clear ALL measurements from the performance entry buffer due to passing `undefined` as the entry name.

flarnie added a commit to flarnie/react that referenced this pull request Jun 7, 2017

Only attempt to clear measures if we created the measure (#9451)
This fixes an issue where if we decided not to create a measurement we would clear ALL measurements from the performance entry buffer due to passing `undefined` as the entry name.

@renovate renovate bot referenced this pull request Feb 2, 2018

Open

Update dependency react to v16 #29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment