/ Check-in [4aa79ad664]
DEMO | DOWNLOAD | DEPLOY | SEARCH
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Support "[].constructor === Array"
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:4aa79ad66468392a94756ef149a8792b39ab17d8
User & Date: pmacdona 2019-06-25 14:44:52
Context
2019-06-25
15:01
Add RegExp constructor as well. check-in: 323ea31810 user: pmacdona tags: trunk
14:44
Support "[].constructor === Array" check-in: 4aa79ad664 user: pmacdona tags: trunk
2019-06-22
16:31
Fix link check-in: 751f1ba760 user: pmacdona tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/jsiValue.c.

1090
1091
1092
1093
1094
1095
1096





1097
1098
1099

1100
1101
1102
1103
1104
1105
1106
                    break;
                case JSI_OT_BOOL:
                    cp = "Boolean";
                    break;
                case JSI_OT_STRING:
                    cp = "String";
                    break;





                default:
                    Jsi_ValueMakeUndef(interp, ret);
                    return *ret;

            }
            v = Jsi_ValueObjLookup(interp, interp->csc, cp, 0);
            if (v==NULL || v->vt != JSI_VT_OBJECT)
                return NULL;
            o = target->d.obj->constructor = v->d.obj;
        }
        Jsi_ValueMakeObject(interp, ret, o);







>
>
>
>
>

<
<
>







1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102


1103
1104
1105
1106
1107
1108
1109
1110
                    break;
                case JSI_OT_BOOL:
                    cp = "Boolean";
                    break;
                case JSI_OT_STRING:
                    cp = "String";
                    break;
                case JSI_OT_OBJECT:
                    if (target->d.obj->isarrlist) {
                        cp = "Array";
                        break;
                    }
                default:


                    cp = "Object";
            }
            v = Jsi_ValueObjLookup(interp, interp->csc, cp, 0);
            if (v==NULL || v->vt != JSI_VT_OBJECT)
                return NULL;
            o = target->d.obj->constructor = v->d.obj;
        }
        Jsi_ValueMakeObject(interp, ret, o);