| 609 | return false; |
| 610 | } |
| 611 | |
| 612 | if (!obj->IsObject()) { |
| 613 | return false; |
| 614 | } |
| 615 | |
| 616 | auto key = fromValdiJSPropertyName(_isolate, propertyName, tracker); |
| 617 | if (!tracker) { |
| 618 | tracker.clearError(); |
| 619 | return false; |
| 620 | } |
| 621 | |
| 622 | v8::Local<v8::Context> context = v8::Local<v8::Context>::New(_isolate, _context); |
| 623 | return obj->Has(context, key).FromMaybe(false); |
| 624 | } |
| 625 | |
| 626 | void V8JavaScriptContext::setObjectProperty(const JSValue& object, |
| 627 | const std::string_view& propertyName, |
| 628 | const JSValue& propertyValue, |
| 629 | bool enumerable, |
| 630 | JSExceptionTracker& exceptionTracker) { |
| 631 | v8::HandleScope handleScope(_isolate); |
| 632 | auto obj = v8::Local<v8::Object>::Cast(fromValdiJSValue(_isolate, object, exceptionTracker)); |
| 633 | if (!exceptionTracker) { |
| 634 | return; |
| 635 | } |
| 636 | auto val = fromValdiJSValue(_isolate, propertyValue, exceptionTracker); |
| 637 | if (!exceptionTracker) { |
no test coverage detected