mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +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
|
@ -3562,10 +3562,6 @@ impl GlobalScopeHelpers<crate::DomTypeHolder> for GlobalScope {
|
|||
GlobalScope::from_reflector(reflector, realm)
|
||||
}
|
||||
|
||||
unsafe fn from_object_maybe_wrapped(obj: *mut JSObject, cx: *mut JSContext) -> DomRoot<Self> {
|
||||
GlobalScope::from_object_maybe_wrapped(obj, cx)
|
||||
}
|
||||
|
||||
fn origin(&self) -> &MutableOrigin {
|
||||
GlobalScope::origin(self)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue