Skip to content
This repository was archived by the owner on Jan 11, 2023. It is now read-only.

[Breakpoints] fix breakpoint context menu logic#7271

Merged
jasonLaster merged 2 commits intofirefox-devtools:masterfrom
kenjiO:fix-7268-breakpoint-context-menu
Nov 15, 2018
Merged

[Breakpoints] fix breakpoint context menu logic#7271
jasonLaster merged 2 commits intofirefox-devtools:masterfrom
kenjiO:fix-7268-breakpoint-context-menu

Conversation

@kenjiO
Copy link
Copy Markdown
Contributor

@kenjiO kenjiO commented Nov 14, 2018

Fixes #7268

Summary of Changes

  • update BreakpointContextMenu.js logic that finds other breakpoints. A formatted breakpoint object was being compared to a breakpoint object using object equality which was always returning that they were not the same breakpoint. I changed it to compare using breakpoint id.
  • added the breakpoint id property to FormattedBreakpoint objects

selectMenuItem(dbg, 3);
await waitForState(dbg, state =>
dbg.selectors.getBreakpointsList(state)
.every(bp => (bp.location.line === 1) === bp.disabled)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay, this is the craziest thing I've seen in awhile, but it's a test so lets go crazy

@jasonLaster jasonLaster merged commit d16c23e into firefox-devtools:master Nov 15, 2018
@jasonLaster
Copy link
Copy Markdown
Contributor

This is beautiful. I love that you opened two PRs by the way, that really helps keep things moving

loganfsmyth pushed a commit that referenced this pull request Nov 16, 2018
* fix breakpoint context menu logic for finding other breakpoints
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants