[Webkit-unassigned] [Bug 212449] New: Javascript engine gets confused, calls method on wrong object.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 27 17:47:52 PDT 2020


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

            Bug ID: 212449
           Summary: Javascript engine gets confused, calls method on wrong
                    object.
           Product: WebKit
           Version: Safari Technology Preview
          Hardware: Macintosh
                OS: macOS 10.15
            Status: NEW
          Severity: Critical
          Priority: P2
         Component: WebCore JavaScript
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: mike.benoit at gmail.com

It appears that Safari is getting confused on the proper object method to call when ES6 classes are being used with inheritance. It works fine in Chrome and Firefox, but I wasn't able to put together a minimal test case for you, so instead I direct to you our app where you can reproduce it in 30 seconds, and the exact line where things go wrong.

URL: https://demo.timetrex.com/
Username: demoadmin1
Password: demo

Once logged in, click "Payroll" in the blue menu along the top of the screen, then click "Tax Wizard". Notice how the screen is blank. Click the red "X" icon at the bottom right to exit out and start over again.

I have traced the issue down to PayrollRemittanceAgencyEventWizardStepHome.js on line 50 where $this.render() is called inside a callback. If you place a break point on that line and inspect $this, its a "PayrollRemittanceAgencyEventWizardStepHome" object, which is correct and with the debugger you can even call methods that only exist in this class like $this.getNextStepName(). The PayrollRemittanceAgencyEventWizardStepHome class extends WizardStep class, and WizardStep has the render method that should be called on that line, and is on both Chrome and Firefox. 

However when you step into that line on Safari v13 or Technology Preview downloaded today, its calling the completely wrong PayrollRemittanceAgencyEventWizard.render() instead which in this case intentionally does nothing and of course nothing is rendered.

-- 
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/20200528/f56d9c79/attachment.htm>


More information about the webkit-unassigned mailing list