MCPcopy Create free account
hub / github.com/Constellation/iv / GetOwnNonIndexedPropertySlotMethod

Method GetOwnNonIndexedPropertySlotMethod

iv/lv5/jsstringobject.h:14–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12 IV_LV5_DEFINE_JSCLASS(JSStringObject, String)
13
14 IV_LV5_INTERNAL_METHOD bool GetOwnNonIndexedPropertySlotMethod(const JSObject* obj,
15 Context* ctx,
16 Symbol name, Slot* slot) {
17 JSString* value = static_cast<const JSStringObject*>(obj)->value();
18 if (name == symbol::length()) {
19 slot->set(
20 JSVal::Int32(static_cast<int32_t>(value->size())),
21 Attributes::String::Length(), obj);
22 return true;
23 }
24 return JSObject::GetOwnNonIndexedPropertySlotMethod(obj, ctx, name, slot);
25 }
26
27 IV_LV5_INTERNAL_METHOD bool GetOwnIndexedPropertySlotMethod(const JSObject* obj,
28 Context* ctx,

Callers

nothing calls this directly

Calls 5

Int32Class · 0.85
lengthFunction · 0.50
valueMethod · 0.45
setMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected