MCPcopy Create free account
hub / github.com/nodejs/node / assert_readonly

Function assert_readonly

deps/v8/test/wasm-js/third_party/testharness.js:1499–1513  ·  view source on GitHub ↗
(object, property_name, description)

Source from the content-addressed store, hash-verified

1497 expose(_assert_inherits("assert_idl_attribute"), "assert_idl_attribute");
1498
1499 function assert_readonly(object, property_name, description)
1500 {
1501 var initial_value = object[property_name];
1502 try {
1503 //Note that this can have side effects in the case where
1504 //the property has PutForwards
1505 object[property_name] = initial_value + "a"; //XXX use some other value here?
1506 assert(same_value(object[property_name], initial_value),
1507 "assert_readonly", description,
1508 "changing property ${p} succeeded",
1509 {p:property_name});
1510 } finally {
1511 object[property_name] = initial_value;
1512 }
1513 }
1514 expose(assert_readonly, "assert_readonly");
1515
1516 /**

Callers

nothing calls this directly

Calls 2

assertFunction · 0.70
same_valueFunction · 0.70

Tested by

no test coverage detected