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

Unified Diff: sdk/lib/io/secure_socket.dart

Issue 1852783003: Implements remaining SecurityContext calls for iOS (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address comments Created 4 years, 8 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
« no previous file with comments | « runtime/bin/secure_socket_macos.cc ('k') | sdk/lib/io/security_context.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/secure_socket.dart
diff --git a/sdk/lib/io/secure_socket.dart b/sdk/lib/io/secure_socket.dart
index 07ef23ea1482b1a0ce80bda09b8fe706001193b4..679aa71f0deb28c9f88fcbb4746171cff78aa65f 100644
--- a/sdk/lib/io/secure_socket.dart
+++ b/sdk/lib/io/secure_socket.dart
@@ -412,7 +412,6 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
bool _filterActive = false;
_SecureFilter _secureFilter = new _SecureFilter();
- int _filterPointer;
String _selectedProtocol;
static Future<_RawSecureSocket> connect(
@@ -472,7 +471,6 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
// Throw an ArgumentError if any field is invalid. After this, all
// errors will be reported through the future or the stream.
_secureFilter.init();
- _filterPointer = _secureFilter._pointer();
_secureFilter.registerHandshakeCompleteCallback(
_secureHandshakeCompleteHandler);
if (onBadCertificate != null) {
@@ -976,7 +974,7 @@ class _RawSecureSocket extends Stream<RawSocketEvent>
Future<_FilterStatus> _pushAllFilterStages() {
bool wasInHandshake = _status != CONNECTED;
List args = new List(2 + NUM_BUFFERS * 2);
- args[0] = _filterPointer;
+ args[0] = _secureFilter._pointer();
args[1] = wasInHandshake;
var bufs = _secureFilter.buffers;
for (var i = 0; i < NUM_BUFFERS; ++i) {
@@ -1201,6 +1199,10 @@ abstract class _SecureFilter {
int processBuffer(int bufferIndex);
void registerBadCertificateCallback(Function callback);
void registerHandshakeCompleteCallback(Function handshakeCompleteHandler);
+
+ // This call may cause a reference counted pointer in the native
+ // implementation to be retained. It should only be called when the resulting
+ // value is passed to the IO service through a call to dispatch().
int _pointer();
List<_ExternalBuffer> get buffers;
« no previous file with comments | « runtime/bin/secure_socket_macos.cc ('k') | sdk/lib/io/security_context.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698