mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
codegen: use FromJSValConvertible
trait for Promise
(#36966)
Before it was only used when converting to a `Record`, using it all the times allow us to remove two methods. Plus added a helper method in CodegenRust.py to avoid repeated code. Testing: a successful build and existing tests should cover the changes. Fixes: #36410 --------- Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
This commit is contained in:
parent
d780fb7695
commit
c37d5572fd
6 changed files with 27 additions and 118 deletions
|
@ -11,12 +11,12 @@ pub(crate) mod base {
|
|||
};
|
||||
pub(crate) use js::error::throw_type_error;
|
||||
pub(crate) use js::jsapi::{
|
||||
CurrentGlobalOrNull, HandleValue as RawHandleValue, HandleValueArray, Heap, IsCallable,
|
||||
JS_NewObject, JSContext, JSObject,
|
||||
HandleValue as RawHandleValue, HandleValueArray, Heap, IsCallable, JS_NewObject, JSContext,
|
||||
JSObject,
|
||||
};
|
||||
pub(crate) use js::jsval::{JSVal, NullValue, ObjectOrNullValue, ObjectValue, UndefinedValue};
|
||||
pub(crate) use js::panic::maybe_resume_unwind;
|
||||
pub(crate) use js::rust::wrappers::{Call, JS_WrapValue};
|
||||
pub(crate) use js::rust::wrappers::Call;
|
||||
pub(crate) use js::rust::{HandleObject, HandleValue, MutableHandleObject, MutableHandleValue};
|
||||
|
||||
pub(crate) use crate::callback::{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue