Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp

Issue 2147413002: WebRTCCertificateGenerator should not use std::string. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
diff --git a/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp b/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
index 95f763449cf0f299ab428f9c2a32b093984512a5..3784968d26cf74e993c6afc4b46118cacfe73634 100644
--- a/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
+++ b/third_party/WebKit/Source/bindings/modules/v8/ScriptValueSerializerForModules.cpp
@@ -159,8 +159,8 @@ void SerializedScriptValueWriterForModules::writeRTCCertificate(const RTCCertifi
append(RTCCertificateTag);
WebRTCCertificatePEM pem = certificate.certificateShallowCopy()->toPEM();
- doWriteWebCoreString(String(pem.privateKey().c_str()));
- doWriteWebCoreString(String(pem.certificate().c_str()));
+ doWriteWebCoreString(pem.privateKey());
+ doWriteWebCoreString(pem.certificate());
}
void SerializedScriptValueWriterForModules::doWriteHmacKey(const WebCryptoKey& key)
@@ -450,8 +450,8 @@ bool SerializedScriptValueReaderForModules::readRTCCertificate(v8::Local<v8::Val
std::unique_ptr<WebRTCCertificate> certificate(
certificateGenerator->fromPEM(
- pemPrivateKey.utf8().data(),
- pemCertificate.utf8().data()));
+ pemPrivateKey,
+ pemCertificate));
RTCCertificate* jsCertificate = new RTCCertificate(std::move(certificate));
*value = toV8(jsCertificate, getScriptState()->context()->Global(), isolate());
« no previous file with comments | « content/renderer/media/rtc_certificate_generator.cc ('k') | third_party/WebKit/public/platform/WebRTCCertificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698