openharmony 鸿蒙 changelogs-arkcompiler

2025-06-12 浏览 (1)

ArkCompiler Subsystem Changelog

cl.arkcompiler.1 Repair of the Sendable Class Assignment Check in Hotspot Functions

Reason for Change

This change is made to fix the Sendable class assignment check issues in hotspot functions.

Change Impact

This change is non-compatible.

  • Sendable data is used to address performance issues with cross-thread data transfer. For an introduction to its use, see Sendable Development.

  • Some constraints were not checked in hotspot functions. As a result, these constraints may be bypassed.

  • The following are the constraints bypassed in this change.

    @Sendable Class DecoratorDescription
    Property type restrictions for decorated objects1. The following types are supported: string, number, boolean, bigint, null, undefined, Sendable class, collections.Array, collections.Map, and collections.Set.
    2. Closure variables are not allowed.
    3. Private properties must be defined using private, rather than the number sign (#).
    4. Computed properties are not supported.
  • For violations of the property type restrictions:

    • Before change: The program runs normally without errors.
    • After change: The program throws an exception at the point of constraint violation, indicating that the assignment type does not match. You need to adapt according to the requirements of property type restrictions in Sendable Development.

API Level

11

Change Since

OpenHarmony_4.1.6.5

Key API/Component Changes

@Sendable decorator

Adaptation Guide

After this change, if a type mismatch exception occurs at runtime, it may violate the usage constraints, and it is necessary to check the assignment types. For detailed instructions, see Sendable Development.

你可能感兴趣的鸿蒙文章

harmony 鸿蒙Ability Subsystem Changelog

harmony 鸿蒙ArkUI Subsystem Changelog

harmony 鸿蒙ArkWeb Subsystem Changelog

harmony 鸿蒙Distributed Data Management Subsystem Changelog

harmony 鸿蒙Multimedia Subsystem Changelog

harmony 鸿蒙Window Subsystem Changelog

  • 所属分类: 后端技术
  • 本文标签: 软件 鸿蒙
  • 版权声明: 本文链接 https://seaxiang.com/blog/3AktBj