mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 10:09:54 +00:00
Bugfix:dataAccessor judge propertybox first.
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I7KABT?from=project-issue Signed-off-by: yaochaonan <yaochaonan@huawei.com> Change-Id: Ibdd72fe2448201336615b497bab7df37a1b1b1e5
This commit is contained in:
parent
0e846f3aa1
commit
a919fdcab2
@ -973,9 +973,12 @@ bool JSObject::OrdinaryGetOwnProperty(JSThread *thread, const JSHandle<JSObject>
|
||||
op.ToPropertyDescriptor(desc);
|
||||
|
||||
if (desc.HasValue() && obj->IsJSGlobalObject()) {
|
||||
PropertyBox *cell = PropertyBox::Cast(desc.GetValue().GetTaggedValue().GetTaggedObject());
|
||||
JSHandle<JSTaggedValue> valueHandle(thread, cell->GetValue());
|
||||
desc.SetValue(valueHandle);
|
||||
JSTaggedValue val = desc.GetValue().GetTaggedValue();
|
||||
if (val.IsPropertyBox()) {
|
||||
PropertyBox *cell = PropertyBox::Cast(val.GetTaggedObject());
|
||||
JSHandle<JSTaggedValue> valueHandle(thread, cell->GetValue());
|
||||
desc.SetValue(valueHandle);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -21,6 +21,12 @@
|
||||
*/
|
||||
|
||||
// CopyDataProperties
|
||||
this[1024] = 4;
|
||||
const o = {
|
||||
...this,
|
||||
};
|
||||
|
||||
print(JSON.stringify(o));
|
||||
var s = "abc";
|
||||
var t = {...s};
|
||||
print(t[1]);
|
||||
|
@ -11,4 +11,5 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
{"1024":4}
|
||||
b
|
||||
|
Loading…
Reference in New Issue
Block a user