[Webkit-unassigned] [Bug 169040] Class Proxy can't be extended

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Apr 16 12:03:10 PDT 2017


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

--- Comment #2 from GSkachkov <gskachkov at gmail.com> ---
I upload the patch, but I think it can be fixed in better way.
```
    class SuperClass {
        constructor() {  }
    }

    let ProxiedSuperClass = new Proxy(SuperClass, {});

    class A extends ProxiedSuperClass {
        constructor() {
            super();
        }
    }
    const a = new A;
```
Issue happens because during initializing A class var ProxiedSuperClass stored to __proto__ variable of the A class, but during invoking super it takes __proto__ from the prototype the class A and it is the same as ProxiedSuperClass.__proto__ but it is not allowed to execute 'new ProxiedSuperClass.__proto__'
To fix issue I stored ProxiedSuperClass to private variable and load it before execute 'super'. 
Could you please suggest if there any better to fix this issue?

-- 
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/20170416/607e14fd/attachment.html>


More information about the webkit-unassigned mailing list