bool SerializedScriptValueReaderForModules::readDOMFileSystem(v8::Local<v8::Value>* value) { uint32_t type; String name; String url; if (!doReadUint32(&type)) return false; if (!readWebCoreString(&name)) return false; if (!readWebCoreString(&url)) return false; DOMFileSystem* fs = DOMFileSystem::create(scriptState()->executionContext(), name, static_cast<FileSystemType>(type), KURL(ParsedURLString, url)); *value = toV8(fs, scriptState()->context()->Global(), isolate()); return true; }
bool SerializedScriptValueReaderForModules::readRTCCertificate( v8::Local<v8::Value>* value) { String pemPrivateKey; if (!readWebCoreString(&pemPrivateKey)) return false; String pemCertificate; if (!readWebCoreString(&pemCertificate)) return false; std::unique_ptr<WebRTCCertificateGenerator> certificateGenerator = wrapUnique(Platform::current()->createRTCCertificateGenerator()); std::unique_ptr<WebRTCCertificate> certificate( certificateGenerator->fromPEM(pemPrivateKey, pemCertificate)); RTCCertificate* jsCertificate = new RTCCertificate(std::move(certificate)); *value = toV8(jsCertificate, getScriptState()->context()->Global(), isolate()); return !value->IsEmpty(); }