| 130 | } |
| 131 | |
| 132 | inline void setObjectPropertyHelper(v8::Local<v8::Context>& context, |
| 133 | v8::Local<v8::Object> obj, |
| 134 | v8::Local<v8::Name> key, |
| 135 | v8::Local<v8::Value> value, |
| 136 | bool enumerable, |
| 137 | JSExceptionTracker& exceptionTracker) { |
| 138 | v8::PropertyAttribute attr = enumerable ? v8::PropertyAttribute::None : v8::PropertyAttribute::DontEnum; |
| 139 | auto result = obj->DefineOwnProperty(context, key, value, attr); |
| 140 | if (result.IsNothing()) { |
| 141 | exceptionTracker.onError("Failed to set property for object"); |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | inline void setObjectPropertyIndexHelper(v8::Local<v8::Context>& context, |
| 146 | v8::Local<v8::Object> obj, |
no test coverage detected