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 polymorphism APIs #33

Merged
merged 1 commit into from
Nov 10, 2023
Merged

Add polymorphism APIs #33

merged 1 commit into from
Nov 10, 2023

Conversation

saghul
Copy link
Contributor

@saghul saghul commented Nov 10, 2023

Borrowed from the Frida fork.

See them in action here: saghul/txiki.js#424

To be able to check if the class ID is one of multiple known ones, where
the data has a common structure.
@saghul saghul requested a review from bnoordhuis November 10, 2023 08:07
quickjs.h Outdated
@@ -598,6 +598,7 @@ void JS_ResetUncatchableError(JSContext *ctx);
JSValue JS_NewError(JSContext *ctx);
JSValue __js_printf_like(2, 3) JS_ThrowSyntaxError(JSContext *ctx, const char *fmt, ...);
JSValue __js_printf_like(2, 3) JS_ThrowTypeError(JSContext *ctx, const char *fmt, ...);
JSValue JS_ThrowTypeErrorInvalidClass(JSContext *ctx, JSClassID class_id);
Copy link
Contributor

Choose a reason for hiding this comment

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

There's no need to expose this, I believe?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I can drop it

@saghul
Copy link
Contributor Author

saghul commented Nov 10, 2023

Updated!

@saghul saghul merged commit 3c144fd into master Nov 10, 2023
13 checks passed
@saghul saghul deleted the polymorphism branch November 10, 2023 10:01
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.

3 participants