aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2015-12-15 21:00:45 -0800
committerVitaly Buka <vitalybuka@google.com>2015-12-16 18:16:48 +0000
commit3264eca548566ffc0bddf43204537351bde6ede7 (patch)
tree9de3662efe65fdccd32252bf8f9a31e834c7aead /examples
parent5fddf87b36b0528e8251b25ae2eba3336fd028dd (diff)
downloadlibweave-3264eca548566ffc0bddf43204537351bde6ede7.tar.gz
Include build rules for clang with address sanitizer
Usage: GYP_DEFINES='clang=1' BUILD_CONFIG=Debug examples/build.sh The expectations on the mocked call using itself were wrong and depend on the order of evaluation and leads to weird bugs, specifically clang evaluates the parts of EXPECT_CALL in different order leading to wrong behavior. Change-Id: I0b2cf1e986268cd4dfecbd37d1ab3b4b1b725a5c Reviewed-on: https://weave-review.googlesource.com/1990 Reviewed-by: Vitaly Buka <vitalybuka@google.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/provider/event_http_server.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/examples/provider/event_http_server.cc b/examples/provider/event_http_server.cc
index ae8bbec..ae9833e 100644
--- a/examples/provider/event_http_server.cc
+++ b/examples/provider/event_http_server.cc
@@ -34,8 +34,7 @@ bufferevent* BuffetEventCallback(event_base* base, void* arg) {
class HttpServerImpl::RequestImpl : public Request {
public:
- RequestImpl(evhttp_request* req, provider::TaskRunner* task_runner)
- : task_runner_{task_runner} {
+ RequestImpl(evhttp_request* req) {
req_.reset(req);
uri_ = evhttp_request_get_evhttp_uri(req_.get());
@@ -70,7 +69,6 @@ class HttpServerImpl::RequestImpl : public Request {
private:
std::unique_ptr<evhttp_request, decltype(&evhttp_cancel_request)> req_{
nullptr, &evhttp_cancel_request};
- provider::TaskRunner* task_runner_{nullptr};
std::string data_;
const evhttp_uri* uri_{nullptr};
};
@@ -147,7 +145,7 @@ void HttpServerImpl::NotFound(evhttp_request* req) {
}
void HttpServerImpl::ProcessRequest(evhttp_request* req) {
- std::unique_ptr<RequestImpl> request{new RequestImpl{req, task_runner_}};
+ std::unique_ptr<RequestImpl> request{new RequestImpl{req}};
std::string path = request->GetPath();
auto it = handlers_.find(path);
if (it != handlers_.end()) {