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

Improve error message for exposure_set test #10337

Merged
merged 1 commit into from Apr 6, 2018

Conversation

lukebjerring
Copy link
Contributor

@lukebjerring lukebjerring commented Apr 5, 2018

memberName is undefined; error message is (was) ReferenceError: memberName is not defined.
Clearly supposed to be a check for duplication - array.length < 0 was a really weird thing to see, though. Spec says it's always non-negative, so deleted that.

Error I see now is

"Multiple 'Exposed' extended attributes on Navigator"

This change is Reviewable

`memberName` is undefined; error message is (was) `ReferenceError: memberName is not defined`.
Clearly supposed to be a check for duplication - `array.length < 0` was a really weird thing to see, though. Spec says it's always non-negative, so deleted that.

Error I see now is 

    "Multiple 'Exposed' extended attributes on Navigator"
@@ -554,8 +554,9 @@ IdlArray.prototype.is_json_type = function(type)

function exposure_set(object, default_set) {
var exposed = object.extAttrs.filter(function(a) { return a.name == "Exposed" });
if (exposed.length > 1 || exposed.length < 0) {
throw new IdlHarnessError("Unexpected Exposed extended attributes on " + memberName + ": " + exposed);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note also: 'exposed' prints as [Object object], [Object object], so is useless anyway.

@foolip foolip merged commit 6dd3135 into master Apr 6, 2018
@foolip foolip deleted the lukebjerring-idlharness-patch-2 branch April 6, 2018 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants