Chromium Code Reviews| Index: third_party/WebKit/Source/modules/peerconnection/RTCCertificate.h |
| diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.h b/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.h |
| index 837ff114825262c9a5435341d13c46490ccb5816..2a00b62161bd86af5810f05afb0cdba4bc6a00ca 100644 |
| --- a/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.h |
| +++ b/third_party/WebKit/Source/modules/peerconnection/RTCCertificate.h |
| @@ -34,12 +34,19 @@ |
| #include "bindings/core/v8/ScriptWrappable.h" |
| #include "core/dom/DOMTimeStamp.h" |
| #include "modules/ModulesExport.h" |
| +#include "modules/peerconnection/RTCDtlsFingerprint.h" |
| #include "platform/heap/GarbageCollected.h" |
| +#include "platform/wtf/Vector.h" |
| +#include "platform/wtf/text/WTFString.h" |
| #include "public/platform/WebRTCCertificate.h" |
| +#include "v8/include/v8.h" |
| + |
| #include <memory> |
| namespace blink { |
| +class ScriptState; |
| + |
| class MODULES_EXPORT RTCCertificate final |
| : public GarbageCollectedFinalized<RTCCertificate>, |
| public ScriptWrappable { |
| @@ -57,9 +64,17 @@ class MODULES_EXPORT RTCCertificate final |
| // Returns the expiration time in ms relative to epoch, 1970-01-01T00:00:00Z. |
| DOMTimeStamp expires() const; |
| + // Returns "FrozenArray<RTCDtlsFingerprint>" as per IDL. Because |
| + // |RTCDtlsFingerprint| is a dictionary type, vectors of |
| + // |RTCDtlsFingerprint| are not allowed (due to |
| + // |DISALLOW_NEW_EXCEPT_PLACEMENT_NEW|). |toV8| is used to convert the |
|
foolip
2017/04/21 16:51:53
This sound rather annoying and something that will
haraken
2017/04/21 19:59:16
Won't HeapVector<RTCDtlsFingerprint> work?
hbos_chromium
2017/04/24 10:35:31
It's annoying for anyone wanting to return any dat
|
| + // |RTCDtlsFingerprint| objects to |v8::Value|s which can populate vectors. |
| + Vector<v8::Local<v8::Value>> fingerprints(ScriptState*); |
| private: |
| std::unique_ptr<WebRTCCertificate> certificate_; |
| + // Cache for the result of |fingerprints|. |
| + Vector<v8::Global<v8::Value>> fingerprints_; |
|
haraken
2017/04/20 13:21:54
This strong persistent handle will leak many thing
foolip
2017/04/21 16:51:53
Does this actually achieve the intended effect tho
haraken
2017/04/21 19:59:16
Yes, but the problem is that v8::Global<v8::Value>
hbos_chromium
2017/04/24 10:35:31
How could this create a cycle? It's a list of java
hbos_chromium
2017/04/24 10:41:09
What is this wrapper tracing thing you speak of?
I
|
| }; |
| } // namespace blink |