MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

add configurable property check to object defineProperty

+4 -12
+1 -1
meson.build
··· 74 74 build_date = run_command('date', '+%Y-%m-%d', check: true).stdout().strip() 75 75 76 76 version_conf = configuration_data() 77 - version_conf.set('ANT_VERSION', '0.2.1.2') 77 + version_conf.set('ANT_VERSION', '0.2.1.3') 78 78 version_conf.set('ANT_GIT_HASH', git_hash) 79 79 version_conf.set('ANT_BUILD_DATE', build_date) 80 80
+3 -11
src/ant.c
··· 2967 2967 return mkval(T_PROP, existing); 2968 2968 } 2969 2969 } 2970 - 2971 - jsoff_t configurable_off = lkp(js, desc_obj, "configurable", 12); 2972 - if (configurable_off != 0) { 2973 - jsval_t configurable_val = resolveprop(js, mkval(T_PROP, configurable_off)); 2974 - if (!js_truthy(js, configurable_val)) { 2975 - if (js->flags & F_STRICT) return js_mkerr(js, "assignment to non-configurable property"); 2976 - return mkval(T_PROP, existing); 2977 - } 2978 - } 2979 2970 2980 2971 do_update: 2981 2972 saveval(js, existing + sizeof(jsoff_t) * 2, v); ··· 13451 13442 } 13452 13443 13453 13444 jsval_t prop_key = js_mkstr(js, prop_str, prop_len); 13454 - bool mark_const = (!writable || !configurable); 13445 + bool mark_const = !writable; 13455 13446 mkprop(js, as_obj, prop_key, value, mark_const); 13456 13447 } 13457 13448 } ··· 13566 13557 if (t != T_OBJ && t != T_ARR && t != T_FUNC) return obj; 13567 13558 jsval_t as_obj = (t == T_OBJ) ? obj : mkval(T_OBJ, vdata(obj)); 13568 13559 13569 - setprop(js, as_obj, js_mkstr(js, "__frozen__", 10), js_mktrue()); 13560 + js->has_descriptors = true; 13570 13561 jsoff_t next = loadoff(js, (jsoff_t) vdata(as_obj)) & ~(3U | CONSTMASK | ARRMASK); 13571 13562 13572 13563 while (next < js->brk && next != 0) { ··· 13616 13607 } 13617 13608 } 13618 13609 13610 + setprop(js, as_obj, js_mkstr(js, "__frozen__", 10), js_mktrue()); 13619 13611 return obj; 13620 13612 } 13621 13613