Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(lwc-engine): Add Safari polyfill for Proxy #197

Merged
merged 1 commit into from
Apr 4, 2018

Conversation

pmdartus
Copy link
Member

@pmdartus pmdartus commented Apr 4, 2018

Details

Add temporary mitigation to get around Safari Array.prototype.concat bug: https://bugs.webkit.org/show_bug.cgi?id=184267

Does this PR introduce a breaking change?

  • Yes
  • No

@davidturissini
Copy link
Contributor

It's not clear to my why we want this in lwc and not es5-proxy-compat?

@pmdartus
Copy link
Member Author

pmdartus commented Apr 4, 2018

Because we don't ship compat on Safari 10.

@salesforce-best-lwc-internal
Copy link

Benchmark comparison

Base commit: 13cd8c4 | Target commit: aecdd94

benchmark base(13cd8c4) target(aecdd94) trend
table-append-1k.benchmark:benchmark-table/append/1k 282.33 (± 5.15 ms) 249.79 (± 5.77 ms) 👍
table-clear-1k.benchmark:benchmark-table/clear/1k 15.48 (± 1.46 ms) 12.76 (± 0.34 ms) 👍
table-create-10k.benchmark:benchmark-table/create/10k 1575.65 (± 40.19 ms) 1397.16 (± 16.97 ms) 👍
table-create-1k.benchmark:benchmark-table/create/1k 171.20 (± 4.82 ms) 155.47 (± 3.02 ms) 👍
table-update-10th-1k.benchmark:benchmark-table/update-10th/1k 139.74 (± 3.30 ms) 130.29 (± 2.62 ms) 👍
tablecmp-append-1k.benchmark:benchmark-table-component/append/1k 348.69 (± 6.56 ms) 316.72 (± 5.05 ms) 👍
tablecmp-clear-1k.benchmark:benchmark-table/clear/1k 35.24 (± 0.90 ms) 31.98 (± 0.93 ms) 👍
tablecmp-create-10k.benchmark:benchmark-table-component/create/10k 2668.06 (± 41.49 ms) 2455.85 (± 10.90 ms) 👍
tablecmp-create-1k.benchmark:benchmark-table-component/create/1k 289.73 (± 8.75 ms) 262.17 (± 2.73 ms) 👍
tablecmp-update-10th-1k.benchmark:benchmark-table-component/update-10th/1k 127.75 (± 3.62 ms) 113.75 (± 3.70 ms) 👍

}

const proxy = new Proxy([3, 4], {});
const res = [1, 2].concat(proxy);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can probably can simplify this by concating into an empty array.

@diervo
Copy link
Contributor

diervo commented Apr 4, 2018

@pmdartus merging this fix is shipped, lets do backport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants