refactor: enable weak ptr unwrap sequence dcheck (#14816)

* refactor: enable weak ptr unwrap sequence dcheck

* spec: remove WeakPtrDeathTest.* from disabled list
This commit is contained in:
Robo 2018-10-06 01:59:57 +05:30 committed by Charles Kerr
parent 643781578e
commit 6e5dd735f6
17 changed files with 431 additions and 258 deletions

View file

@ -13,16 +13,17 @@
namespace atom {
class URLRequestStringJob : public JsAsker<net::URLRequestSimpleJob> {
class URLRequestStringJob : public JsAsker, public net::URLRequestSimpleJob {
public:
URLRequestStringJob(net::URLRequest*, net::NetworkDelegate*);
~URLRequestStringJob() override;
// JsAsker:
void StartAsync(std::unique_ptr<base::Value> options) override;
void StartAsync(std::unique_ptr<base::Value> options, int error);
// URLRequestJob:
void Start() override;
void GetResponseInfo(net::HttpResponseInfo* info) override;
void Kill() override;
// URLRequestSimpleJob:
int GetData(std::string* mime_type,
@ -35,6 +36,8 @@ class URLRequestStringJob : public JsAsker<net::URLRequestSimpleJob> {
std::string charset_;
std::string data_;
base::WeakPtrFactory<URLRequestStringJob> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(URLRequestStringJob);
};