Skip to content

Commit

Permalink
Merge pull request #1424 from jridgewell/safari-template
Browse files Browse the repository at this point in the history
Add test for TemplateStrings caching
  • Loading branch information
zloirock authored Feb 26, 2019
2 parents 1e7b377 + 1472f20 commit 6d012ba
Show file tree
Hide file tree
Showing 2 changed files with 902 additions and 738 deletions.
42 changes: 42 additions & 0 deletions data-es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -5458,6 +5458,48 @@ exports.tests = [
graalvm: true,
},
},
{
name: 'TemplateStrings call site caching',
exec: function () {/*
// Safari 12 sometimes garbage collects the cached TemplateStrings,
// even when the call site is still alive.
// This is almost impossible to write a test case for, but we can test
// the general semantics.
// https://bugs.webkit.org/show_bug.cgi?id=190756
function strings(array) {
return array;
}
function getStrings() {
return strings`foo`;
}
var original = getStrings();
var other = strings`foo`;
return original === getStrings() && original !== other;
*/},
res: {
tr: true,
babel6corejs2: true,
es6tr: true,
jsx: true,
ejs: true,
closure: true,
typescript1corejs2: true,
edge12: true,
firefox2: false,
firefox34: true,
opera10_50: false,
chrome41: true,
safari9: true,
safari12: false,
node4: true,
xs6: true,
jxa: true,
duktape2_0: false,
nashorn9: true,
nashorn10: true,
graalvm: true,
},
},
],
},
{
Expand Down
Loading

0 comments on commit 6d012ba

Please sign in to comment.