| 170 | } |
| 171 | |
| 172 | Value JavaScriptValueMarshaller::tryUnwrap(const JSValue& jsValue, JSExceptionTracker& exceptionTracker) { |
| 173 | auto& jsObjectStore = _valueDelegate->getJsObjectStore(); |
| 174 | if (VALDI_LIKELY(!jsObjectStore.hasValueForObjectKey(jsValue))) { |
| 175 | return Value::undefined(); |
| 176 | } |
| 177 | |
| 178 | auto attachedValue = jsObjectStore.getValueForObjectKey(jsValue, exceptionTracker); |
| 179 | if (attachedValue == nullptr) { |
| 180 | return Value::undefined(); |
| 181 | } |
| 182 | |
| 183 | auto objectAttachments = castOrNull<PlatformObjectAttachments>(attachedValue); |
| 184 | if (objectAttachments == nullptr) { |
| 185 | return Value::undefined(); |
| 186 | } |
| 187 | |
| 188 | return unwrapSingleProxy(*objectAttachments, exceptionTracker); |
| 189 | } |
| 190 | |
| 191 | } // namespace Valdi |
no test coverage detected