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

Many bindings are probably very much broken #229

Open
nox opened this issue Jan 15, 2020 · 1 comment
Open

Many bindings are probably very much broken #229

nox opened this issue Jan 15, 2020 · 1 comment

Comments

@nox
Copy link
Contributor

nox commented Jan 15, 2020

So we define Rooted<T> ourselves to be a simple T wrapper, but for some kinds of values on C++, it is a bit more complex than that, going through MaybeWrapped<T> and ultimately storing a DispatchWrapper<T> which has more fields than a simple T.

So what happens with types such as AutoSaveExceptionState which include a RootedObject, which should actually be using the DispatchWrapper<T> wrapper? Doesn't that mean the layout of that struct is wrong?

        pub struct AutoSaveExceptionState {
            pub context: *mut root::JSContext,
            pub wasPropagatingForcedReturn: bool,
            pub wasOverRecursed: bool,
            pub wasThrowing: bool,
            pub exceptionValue: root::JS::RootedValue,
            pub exceptionStack: root::JS::RootedObject,
        }
@nox
Copy link
Contributor Author

nox commented Jan 15, 2020

We should probably not bind anything that involves the C++ Rooted<T> type.

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

No branches or pull requests

1 participant