mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 18:51:13 +08:00
feat: TA toStringTag 访问器收窄并补 ArrayBuffer tag
This commit is contained in:
@@ -250,7 +250,7 @@ pub fn bind_typed_array(core: &Arc<KernelCore>, session: &KernelSession, global:
|
||||
session,
|
||||
shared_proto,
|
||||
oxide_types::private_key::make_well_known_symbol_key(oxide_types::private_key::WELL_KNOWN_SYMBOL_TO_STRING_TAG),
|
||||
"get @@toStringTag",
|
||||
"get [Symbol.toStringTag]",
|
||||
oxide_builtins::typed_array::typed_array_to_string_tag_getter::<crate::vm::Vm> as *const (),
|
||||
);
|
||||
|
||||
|
||||
@@ -628,8 +628,9 @@ fn install_to_string_tags(core: &Arc<KernelCore>, session: &KernelSession) {
|
||||
let sh = core.shape_forge().as_ref();
|
||||
let tag_id = oxide_types::private_key::WELL_KNOWN_SYMBOL_TO_STRING_TAG;
|
||||
let tag_key = oxide_types::private_key::make_well_known_symbol_key(tag_id);
|
||||
let cases: [(*mut JsObject, &str); 11] = [
|
||||
let cases: [(*mut JsObject, &str); 12] = [
|
||||
(world.map_proto.as_ptr() as *mut JsObject, "Map"),
|
||||
(world.array_buffer_proto.as_ptr() as *mut JsObject, "ArrayBuffer"),
|
||||
(world.set_proto.as_ptr() as *mut JsObject, "Set"),
|
||||
(world.data_view_proto.as_ptr() as *mut JsObject, "DataView"),
|
||||
(world.array_iterator_proto.as_ptr() as *mut JsObject, "Array Iterator"),
|
||||
|
||||
Reference in New Issue
Block a user