| 730 | JSExceptionTracker& exceptionTracker) { |
| 731 | v8::HandleScope handleScope(_isolate); |
| 732 | auto obj = v8::Local<v8::Object>::Cast(fromValdiJSValue(_isolate, object, exceptionTracker)); |
| 733 | if (!exceptionTracker) { |
| 734 | return; |
| 735 | } |
| 736 | |
| 737 | if (!obj->IsObject()) { |
| 738 | exceptionTracker.onError("Cannot set property on non object"); |
| 739 | return; |
| 740 | } |
| 741 | auto key = fromValdiJSPropertyName(_isolate, propertyName, exceptionTracker); |
| 742 | if (!exceptionTracker) { |
| 743 | return; |
| 744 | } |
| 745 | auto val = fromValdiJSValue(_isolate, propertyValue, exceptionTracker); |
| 746 | if (!exceptionTracker) { |
| 747 | return; |
| 748 | } |
| 749 | v8::Local<v8::Context> context = v8::Local<v8::Context>::New(_isolate, _context); |
| 750 | setObjectPropertyHelper(context, obj, key, val, enumerable, exceptionTracker); |
| 751 | } |
| 752 | |
| 753 | void V8JavaScriptContext::setObjectProperty(const JSValue& object, |
| 754 | const JSValue& propertyName, |
| 755 | const JSValue& propertyValue, |
| 756 | bool enumerable, |
| 757 | JSExceptionTracker& exceptionTracker) { |
| 758 | v8::HandleScope handleScope(_isolate); |
| 759 | auto obj = v8::Local<v8::Object>::Cast(fromValdiJSValue(_isolate, object, exceptionTracker)); |
| 760 | if (!exceptionTracker) { |
| 761 | return; |
| 762 | } |
| 763 | if (!obj->IsObject()) { |
| 764 | exceptionTracker.onError("Cannot set property on non object"); |
| 765 | return; |
no test coverage detected