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,17 +13,21 @@
namespace atom {
// Like URLRequestAsarJob, but asks the JavaScript handler for file path.
class URLRequestAsyncAsarJob : public JsAsker<asar::URLRequestAsarJob> {
class URLRequestAsyncAsarJob : public asar::URLRequestAsarJob, public JsAsker {
public:
URLRequestAsyncAsarJob(net::URLRequest*, net::NetworkDelegate*);
~URLRequestAsyncAsarJob() 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;
private:
base::WeakPtrFactory<URLRequestAsyncAsarJob> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(URLRequestAsyncAsarJob);
};