[Webkit-unassigned] [Bug 151365] New: Problem with ES6 class definition inside of function definition

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 17 15:25:31 PST 2015


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

            Bug ID: 151365
           Summary: Problem with ES6 class definition inside of function
                    definition
    Classification: Unclassified
           Product: WebKit
           Version: Safari 9
          Hardware: Macintosh
                OS: Mac OS X 10.10
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: danfuzz at milk.com

When using the ES6 class definition syntax in the scope of a function, it looks like static definitions might not quite work. I am not 100% sure what the exact trigger is, but I do have a case right now that consistently fails.

Steps to Reproduce:
1. Open Safari.
2. Visit <http://milk.com/mimu/awkward-js-music/>.

Expected Results:
Embedded canvases should be rendered, and "play / pause" button should work.

Actual Results:
Message to console: "ReferenceError: Can't find variable: StyleUtil -- cloneComputedStyle -- StyleUtil.js:39"

Notably, the line that is being complained about is within the definition of the class StyleUtil. Given that cloneComputedStyle does exist in that class, the lookup should not ever fail.

I'm continuing development of the code. Here's a snapshot of the source as of this report: <https://github.com/danfuzz/mimu/tree/6042dc4014211eed2ba75354e5ed5361b998f07a>

Three items of note:

* This bug showed up after I wrapped the definition of the class in a function definition (as part of a conversion to RequireJS).
* The code as currently written works in Chrome. It doesn't work in FireFox in that FireFox doesn't do the ES6 class syntax at all yet (at least not in the release build).
* If you clone the source locally and view the index.html file in Safari, then *sometimes* the bug will show up, and sometimes the page will operate properly.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151117/140e3184/attachment.html>


More information about the webkit-unassigned mailing list