void V8ArrayBufferOrArrayBufferViewOrDictionary::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8Value, ArrayBufferOrArrayBufferViewOrDictionary& impl, UnionTypeConversionMode conversionMode, ExceptionState& exceptionState) { if (v8Value.IsEmpty()) return; if (conversionMode == UnionTypeConversionMode::Nullable && isUndefinedOrNull(v8Value)) return; if (v8Value->IsArrayBuffer()) { TestArrayBuffer* cppValue = V8ArrayBuffer::toImpl(v8::Local<v8::Object>::Cast(v8Value)); impl.setArrayBuffer(cppValue); return; } if (v8Value->IsArrayBufferView()) { TestArrayBufferView* cppValue = V8ArrayBufferView::toImpl(v8::Local<v8::Object>::Cast(v8Value)); impl.setArrayBufferView(cppValue); return; } if (isUndefinedOrNull(v8Value) || v8Value->IsObject()) { Dictionary cppValue = Dictionary(v8Value, isolate, exceptionState); if (exceptionState.hadException()) return; impl.setDictionary(cppValue); return; } exceptionState.throwTypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView or Dictionary)'"); }
ArrayBufferOrArrayBufferViewOrDictionary ArrayBufferOrArrayBufferViewOrDictionary::fromDictionary(Dictionary value) { ArrayBufferOrArrayBufferViewOrDictionary container; container.setDictionary(value); return container; }