feat: add ability to close connections for a session (#24945)

These methods are needed for closing all idle and in-flight connections after
switching to another proxy from same origin for a session, otherwise
these connections may be reused for future requests which is
unexpected for most of users.
This commit is contained in:
LuoJinghua 2020-10-09 00:45:36 +08:00 committed by GitHub
parent fb11a12d5b
commit e4213e326b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 24 additions and 0 deletions

View file

@ -122,6 +122,7 @@ class Session : public gin::Wrappable<Session>,
v8::Local<v8::Value> WebRequest(v8::Isolate* isolate);
v8::Local<v8::Value> NetLog(v8::Isolate* isolate);
void Preconnect(const gin_helper::Dictionary& options, gin::Arguments* args);
v8::Local<v8::Promise> CloseAllConnections();
#if BUILDFLAG(ENABLE_BUILTIN_SPELLCHECKER)
base::Value GetSpellCheckerLanguages();
void SetSpellCheckerLanguages(gin_helper::ErrorThrower thrower,