[Webkit-unassigned] [Bug 246787] New: JavaScript execution result different when disable/enable breakpoints

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 19 20:54:57 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=246787

            Bug ID: 246787
           Summary: JavaScript execution result different when
                    disable/enable breakpoints
           Product: WebKit
           Version: Safari 15
          Hardware: Mac (Apple Silicon)
                OS: macOS 12
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jinhao.zhang at icloud.com

for this code snippet below:

(function (){
    var car2 = { color: 0 }
    var temp2 = car2;
    car2 = (car2.color += 1);
    console.log("car2's color:" + temp2.color);
})();

the print result is different whether breakpoints are enabled or not.

Expected result:
    console prints "car2's color:1" whether breakpoints are enabled or not.

Actual result:
    console prints "car2's color:1" whether breakpoints are enabled
    console prints "car2's color:0" whether breakpoints are disable

Steps to reproduce:
1. open https://google.com in safari
2. opt + cmd + I to show Web Inspector
3. In Console tab, input the code above.
4. In Sources tab, toggle "Enable app breakpoints" button
5. try the code again

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20221020/67dcbcae/attachment.htm>


More information about the webkit-unassigned mailing list