Summary: | Getter on prototype is called even though property is also defined on instance | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Sebastian Noack <sebastian> | ||||
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | NEW --- | ||||||
Severity: | Normal | CC: | barraclough, fpizlo, kildyt, mhahnenberg, oliver, trev, zan | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac (Intel) | ||||||
OS: | OS X 10.9 | ||||||
Attachments: |
|
Description
Sebastian Noack
2014-05-13 10:30:03 PDT
Created attachment 231392 [details]
test case
Note that the issue only happens if there are at least 9 objects created (the testcase creates 1000 of them, just in case). It seems that the issue here is a wrong optimization when the JIT compiler processes method Class.bar() - it will call the getter on the prototype directly, without checking whether the same property exists on the object instance. The issue is only reproducible in Safari, neither Firefox nor Chrome show this behavior. getter cache misoptimization? |