-
Notifications
You must be signed in to change notification settings - Fork 107
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
Incorrect Signature for JS_DeletePropertyById1
#320
Comments
I can confirm that the problem still exist, but I think that's not our/bindgen bug. Mozilla-esr115 has these two functions declared in https://searchfox.org/mozilla-esr115/source/js/public/PropertyAndElement.h#381: // maped to JS_DeletePropertyById by bindgen
extern JS_PUBLIC_API bool JS_DeletePropertyById(JSContext* cx,
JS::Handle<JSObject*> obj,
JS::Handle<jsid> id,
JS::ObjectOpResult& result);
// maped to JS_DeletePropertyById1 by bindgen
extern JS_PUBLIC_API bool JS_DeletePropertyById(JSContext* cx,
JS::Handle<JSObject*> obj,
jsid id); While their definition is in https://searchfox.org/mozilla-esr115/source/js/src/vm/PropertyAndElement.cpp#739: JS_PUBLIC_API bool JS_DeletePropertyById(JSContext* cx,
JS::Handle<JSObject*> obj,
JS::Handle<jsid> id,
JS::ObjectOpResult& result) {
AssertHeapIsIdle();
CHECK_THREAD(cx);
cx->check(obj, id);
return js::DeleteProperty(cx, obj, id, result);
}
JS_PUBLIC_API bool JS_DeletePropertyById(JSContext* cx,
JS::Handle<JSObject*> obj,
JS::Handle<jsid> id) {
JS::ObjectOpResult ignored;
return JS_DeletePropertyById(cx, obj, id, ignored);
} As you notice second function (the one that is mapped to Why hasn't been caught? Because they do not use Rust 😄 also they do not actually use second function from at least esr91 (two years). This bug is still present in mozilla-central. |
Thanks for reporting this on Matrix. I posted a patch here: https://bugzilla.mozilla.org/show_bug.cgi?id=1854643 |
Actual Signature:
Expected Signature:
Expected Signature (Rust):
The last parameter should be a
Handle
to thePropertyKey
, but for some reason, the rawPropertyKey
is in the signature instead. This leads to a linking error when trying to compile.This issue does not apply to
JS_DeletePropertyById
.The text was updated successfully, but these errors were encountered: