Closed Bug 1601311 Opened 5 years ago Closed 5 years ago

Removing a watchpoint changes the value of the corresponding property

Categories

(DevTools :: Debugger, defect)

72 Branch
defect
Not set
normal

Tracking

(firefox73 fixed)

RESOLVED FIXED
Firefox 73
Tracking Status
firefox73 --- fixed

People

(Reporter: hbenl, Assigned: bmiriam1230)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

  • load the following file in Firefox:

<html><body><script>
let obj = {a:1};
function inc(obj) {
console.log(obj.a);
obj.a++;
}
</script></body></html>

  • open the debugger
  • set a breakpoint at line 4 ( console.log(obj.a); )
  • write "inc(obj)" in the debugger console -> the debugger breaks at line 4
  • add a setter watchpoint to obj.a
  • remove the breakpoint and resume -> the debugger breaks at line 5
  • resume again
  • write "inc(obj)" in the debugger console -> the debugger breaks at line 5
  • write "obj.a" in the debugger console -> the output is "2"
  • remove the watchpoint
  • write "obj.a" in the debugger console -> the output is "1"

Actual results:

obj.a is 1

Expected results:

obj.a is 2

Component: Untriaged → Debugger
Product: Firefox → DevTools

Jason, is this something could address before release?

Flags: needinfo?(jlaster)

Hmm, perhaps. I think we might have fixed this yesterday.

Flags: needinfo?(jlaster)
Assignee: nobody → bmiriam1230
Pushed by jlaster@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ca57bc90a3f8 Ensure removing watchpoint does not change value of corresponding property. r=jlast.
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 73
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: