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

miscellaneous TypedData changes #2825

Merged
merged 2 commits into from
Mar 8, 2023

Conversation

flavorjones
Copy link
Member

What problem is this PR intended to solve?

See #2808

  • use WB_PROTECTED on all of the classes that don't declare mark functions
  • consistently use a method to unwrap rather than extern the data type struct

Note that being more rigorous about types caught a few places where we were being sloppy about accepting Node arguments where Document was expected; and those places have been deprecated with warning messages (see CHANGELOG).

Have you included adequate test coverage?

Tests updated to reflect deprecated argument types.

Does this change affect the behavior of either the C or the Java implementations?

Deprecation warnings added to both C and Java.

also use consistent style in struct initialization
also deprecate using Node where we expect a Document
@flavorjones flavorjones added the topic/memory Segfaults, memory leaks, valgrind testing, etc. label Mar 7, 2023
@flavorjones flavorjones merged commit e03a3dc into main Mar 8, 2023
@flavorjones flavorjones deleted the flavorjones-miscelleneous-typeddata-changes branch March 8, 2023 14:27
flavorjones added a commit that referenced this pull request Jul 5, 2023
…ument (#2920)

**What problem is this PR intended to solve?**

Hackerone user [nmb-se](https://hackerone.com/nmb-se?type=user) (Mikael
Borg) reported an issue with typechecking arguments to `XML::Text.new`
that could lead to a segfault.

This PR fixes the typechecking for `Text.new` as well as similar
problems in `CDATA.new` and `Schema.from_document` in both the C and the
Java implementations.

Related to #2825.

**Have you included adequate test coverage?**

Yes!

**Does this change affect the behavior of either the C or the Java
implementations?**

Both implementations have been updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/memory Segfaults, memory leaks, valgrind testing, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant