mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
style: 自动格式化
This commit is contained in:
@@ -124,9 +124,7 @@ impl Vm {
|
|||||||
/// 沿实例→proto 链查找私有方法/访问器槽(存于类的 home=proto)。字段槽不跨原型
|
/// 沿实例→proto 链查找私有方法/访问器槽(存于类的 home=proto)。字段槽不跨原型
|
||||||
/// (PrivateFieldFind 只查 own)——链上遇到字段槽(无 hole meta)即拒绝,防
|
/// (PrivateFieldFind 只查 own)——链上遇到字段槽(无 hole meta)即拒绝,防
|
||||||
/// `Object.create(instance)` 穿透读取实例字段。
|
/// `Object.create(instance)` 穿透读取实例字段。
|
||||||
fn find_private_method_slot(
|
fn find_private_method_slot(&mut self, obj: &JsObject, private_key: u32) -> Result<Option<*mut JsObject>, String> {
|
||||||
&mut self, obj: &JsObject, private_key: u32,
|
|
||||||
) -> Result<Option<*mut JsObject>, String> {
|
|
||||||
let mut proto = self.get_prototype_of(obj)?;
|
let mut proto = self.get_prototype_of(obj)?;
|
||||||
let mut depth = 0usize;
|
let mut depth = 0usize;
|
||||||
while proto.is_object() && depth < MAX_PROTO_CHAIN_DEPTH {
|
while proto.is_object() && depth < MAX_PROTO_CHAIN_DEPTH {
|
||||||
|
|||||||
@@ -314,9 +314,7 @@ impl Vm {
|
|||||||
Ok(true)
|
Ok(true)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn inherited_property_meta(
|
fn inherited_property_meta(&mut self, obj: &JsObject, prop_name_si: u32) -> Result<Option<PropMetaEntry>, String> {
|
||||||
&mut self, obj: &JsObject, prop_name_si: u32,
|
|
||||||
) -> Result<Option<PropMetaEntry>, String> {
|
|
||||||
vm_trace!("inherited_property_meta: shape={} prop_si={}", obj.shape_id(), prop_name_si);
|
vm_trace!("inherited_property_meta: shape={} prop_si={}", obj.shape_id(), prop_name_si);
|
||||||
let mut proto = self.get_prototype_of(obj)?;
|
let mut proto = self.get_prototype_of(obj)?;
|
||||||
let mut depth = 0usize;
|
let mut depth = 0usize;
|
||||||
|
|||||||
Reference in New Issue
Block a user