MCPcopy Create free account
hub / github.com/dop251/goja / addStackProp

Method addStackProp

builtin_error.go:29–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27}
28
29func (e *errorObject) addStackProp() Value {
30 if !e.stackPropAdded {
31 res := e._putProp(propNameStack, e.formatStack(), true, false, true)
32 if len(e.propNames) > 1 {
33 // reorder property names to ensure 'stack' is the first one
34 copy(e.propNames[1:], e.propNames)
35 e.propNames[0] = propNameStack
36 }
37 e.stackPropAdded = true
38 return res
39 }
40 return nil
41}
42
43func (e *errorObject) getStr(p unistring.String, receiver Value) Value {
44 return e.getStrWithOwnProp(e.getOwnPropStr(p), p, receiver)

Callers 5

getOwnPropStrMethod · 0.95
setOwnStrMethod · 0.95
deleteStrMethod · 0.95
defineOwnPropertyStrMethod · 0.95
iterateStringKeysMethod · 0.95

Calls 2

formatStackMethod · 0.95
_putPropMethod · 0.65

Tested by

no test coverage detected