MCPcopy Create free account
hub / github.com/dynjs/dynjs / getOwnProperty

Method getOwnProperty

src/main/java/org/dynjs/runtime/Arguments.java:37–53  ·  view source on GitHub ↗
(ExecutionContext context, String name, boolean dupe)

Source from the content-addressed store, hash-verified

35 }
36
37 @Override
38 public Object getOwnProperty(ExecutionContext context, String name, boolean dupe) {
39 // Always dupe here since we call .setValue on the returned property
40 // 10.6 [[GetOwnProperty]]
41 Object d = super.getOwnProperty(context, name, true);
42 if (d == Types.UNDEFINED) {
43 return d;
44 }
45
46 Object isMapped = this.map.getOwnProperty(context, name, true);
47 if (isMapped != Types.UNDEFINED) {
48 PropertyDescriptor desc = (PropertyDescriptor) d;
49 desc.setValue(this.map.get(context, name));
50 }
51
52 return d;
53 }
54
55 @Override
56 public boolean defineOwnProperty(ExecutionContext context, String name, PropertyDescriptor desc, boolean shouldThrow) {

Callers

nothing calls this directly

Calls 3

setValueMethod · 0.95
getOwnPropertyMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected