| 559 | return JSValueRef(); |
| 560 | } |
| 561 | |
| 562 | auto key = fromValdiJSPropertyName(_isolate, propertyName, exceptionTracker); |
| 563 | if (!exceptionTracker) { |
| 564 | return JSValueRef(); |
| 565 | } |
| 566 | v8::Local<v8::Context> context = v8::Local<v8::Context>::New(_isolate, _context); |
| 567 | |
| 568 | auto maybeVal = obj->Get(context, key); |
| 569 | v8::Local<v8::Value> retval; |
| 570 | if (!maybeVal.ToLocal(&retval)) { |
| 571 | return newUndefined(); |
| 572 | } |
| 573 | return toRetainedJSValueRef(IndirectV8Persistent::make(_isolate, retval)); |
| 574 | } |
| 575 | |
| 576 | JSValueRef V8JavaScriptContext::getObjectPropertyForIndex(const JSValue& object, |
| 577 | size_t index, |
| 578 | JSExceptionTracker& exceptionTracker) { |
| 579 | v8::HandleScope handleScope(_isolate); |
| 580 | auto local = fromValdiJSValue(_isolate, object, exceptionTracker); |
| 581 | if (!exceptionTracker) { |
| 582 | return JSValueRef(); |
| 583 | } |
| 584 | |
| 585 | if (!local->IsObject()) { |
| 586 | exceptionTracker.onError("Cannot getObject property on non object value"); |
| 587 | return JSValueRef(); |
| 588 | } |
no test coverage detected