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

Add tests for known violations of invariants #653

Closed
wants to merge 1 commit into from

Conversation

jugglinmike
Copy link
Contributor

JavaScriptCore and V8 have both been shown to violate an invariant of
the [[GetOwnProperty]] internal method in a number of cases. Add tests
asserting that the invariants are honored consistently.

Resolves gh-649. @claudepache I've listed your name in the tests' "author"
field. Please let me know if you're happy with that level of attribution!

JavaScriptCore and V8 have both been shown to violate an invariant of
the [[GetOwnProperty]] internal method in a number of cases. Add tests
asserting that the invariants are honored consistently.
@claudepache
Copy link
Contributor

For the case of RegExp.$1, I leave to your judgment if including the test is relevant, knowing that

The tests about Function#arguments and Function#caller seem ok to me, and definitely worth including.

Resolves gh-649. @claudepache I've listed your name in the tests' "author"
field. Please let me know if you're happy with that level of attribution!

No opposition to the attribution.

In case that copyright or authors' right is applicable to the snippet of code I've written in #649, I license it under CC0. Now, you might want to consult your lawyer to see whether it is correct to cite me as the sole author and at the same time attribute the copyright to the V8 project authors I’m not part of. (Not that I care, really.)

@leobalter
Copy link
Member

In case that copyright or authors' right is applicable to the snippet of code I've written in #649, I license it under CC0. Now, you might want to consult your lawyer to see whether it is correct to cite me as the sole author and at the same time attribute the copyright to the V8 project authors I’m not part of. (Not that I care, really.)

I need to review this, but AFAIK, the content of test262 - as the ecma262 specs - becomes public domain or at least royalty free. So we might have a conflict here with the CC0 licensing.

@claudepache
Copy link
Contributor

claudepache commented May 31, 2016

I need to review this, but AFAIK, the content of test262 - as the ecma262 specs - becomes public domain or at least royalty free. So we might have a conflict here with the CC0 licensing.

Note by CC0, I meant in practice as near as possible to public domain (but all juridictions do not allow to put into public domain).

@leobalter
Copy link
Member

For conformance with the test262 project, the test must be offered in the same BSD license found here: https://github.com/tc39/test262/blob/master/LICENSE

We also need an agreement to the ECMA International RF Patent Policy and Ecma International Software Copyright Policy, see more at this link: https://github.com/tc39/ecma262/blob/master/CONTRIBUTING.md

Plus, we need that every contributor register to the TC39's CLA, http://www.ecma-international.org/memento/register_TC39_Royalty_Free_Task_Group.php

If you prefer, you can bring an own PR with this file content setting your own Copyrights (still BSD licensed).

Otherwise, we'll be stuck without being able to merge this, unless the same specific test is provided by someone that does not read this PR.

@rwaldron
Copy link
Contributor

@claudepache ping

@leobalter
Copy link
Member

@claudepache @bterlson if you're both attending this meeting, please take a look on this one. There'll be a cake.

@claudepache
Copy link
Contributor

Sorry for the delay.

I'll definitely rewrite tests for function(){}.arguments and .caller with proper copyright and licence, as those properties are still buggy today in Chrome, Safari and Edge.

For RegExp.$1, I've precisely noted two distinct violations of invariants, each one in only one major browser:

  • In Safari, the value of RegExp.$1 will incorrectly change under successful regexp matching, although it is reported as non-writable, non-configurable;
  • In Edge, making RegExp.$1 non-configurable and non-writable will pretend to succeed, but the property is still reported as writable.

Should I write the tests for those two cases—knowing that they'll become obsolete if/when https://github.com/tc39/proposal-regexp-legacy-features is implemented (RegExp.$1 would become an accessor property)?

@erights
Copy link
Contributor

erights commented Jan 24, 2017 via email

@leobalter
Copy link
Member

@jugglinmike with #841 now merged do you think there's anything else from here to ship? Please reopen if necessary.

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

Successfully merging this pull request may close these issues.

5 participants