| 898 | } else if (!val->IsObject()) { |
| 899 | exceptionTracker.onError("Provided js value is not object"); |
| 900 | return Ref<RefCountable>(); |
| 901 | } else if (objectInfo.second != kWrappedObjectID) { |
| 902 | exceptionTracker.onError("Provided js value is not a wrapped object"); |
| 903 | return Ref<RefCountable>(); |
| 904 | } |
| 905 | |
| 906 | SC_ASSERT(val->InternalFieldCount() == static_cast<int>(InternalFieldSlot::Count)); |
| 907 | auto external = v8::Local<v8::External>::Cast(val->GetInternalField(static_cast<int>(InternalFieldSlot::DataSlot))); |
| 908 | if (!external->IsExternal()) { |
| 909 | exceptionTracker.onError("Internal field value is not of type external"); |
| 910 | } |
| 911 | |
| 912 | return unsafeBridge<RefCountable>(external->Value()); |
| 913 | } |
| 914 | |
| 915 | JSTypedArray V8JavaScriptContext::valueToTypedArray(const JSValue& value, JSExceptionTracker& exceptionTracker) { |
| 916 | v8::HandleScope handleScope(_isolate); |
no test coverage detected