Update handler tracking arguments.

Now passes the execution context on handler creation and for operations. The
tracked handler base class is now passed by reference to help reduce the
temptation to stash a point to a soon-to-be-destroyed object.
diff --git a/asio/include/asio/detail/completion_handler.hpp b/asio/include/asio/detail/completion_handler.hpp
index a607505..bb61cb5 100644
--- a/asio/include/asio/detail/completion_handler.hpp
+++ b/asio/include/asio/detail/completion_handler.hpp
@@ -49,7 +49,7 @@
     ptr p = { asio::detail::addressof(h->handler_), h, h };
     handler_work<Handler> w(h->handler_);
 
-    ASIO_HANDLER_COMPLETION((h));
+    ASIO_HANDLER_COMPLETION((*h));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/deadline_timer_service.hpp b/asio/include/asio/detail/deadline_timer_service.hpp
index 0e4a2ec..3c54f67 100644
--- a/asio/include/asio/detail/deadline_timer_service.hpp
+++ b/asio/include/asio/detail/deadline_timer_service.hpp
@@ -134,7 +134,8 @@
       return 0;
     }
 
-    ASIO_HANDLER_OPERATION(("deadline_timer", &impl, "cancel"));
+    ASIO_HANDLER_OPERATION((scheduler_.context(),
+          "deadline_timer", &impl, "cancel"));
 
     std::size_t count = scheduler_.cancel_timer(timer_queue_, impl.timer_data);
     impl.might_have_pending_waits = false;
@@ -152,7 +153,8 @@
       return 0;
     }
 
-    ASIO_HANDLER_OPERATION(("deadline_timer", &impl, "cancel_one"));
+    ASIO_HANDLER_OPERATION((scheduler_.context(),
+          "deadline_timer", &impl, "cancel_one"));
 
     std::size_t count = scheduler_.cancel_timer(
         timer_queue_, impl.timer_data, 1);
@@ -211,7 +213,8 @@
 
     impl.might_have_pending_waits = true;
 
-    ASIO_HANDLER_CREATION((p.p, "deadline_timer", &impl, "async_wait"));
+    ASIO_HANDLER_CREATION((scheduler_.context(),
+          *p.p, "deadline_timer", &impl, "async_wait"));
 
     scheduler_.schedule_timer(timer_queue_, impl.expiry, impl.timer_data, p.p);
     p.v = p.p = 0;
diff --git a/asio/include/asio/detail/descriptor_read_op.hpp b/asio/include/asio/detail/descriptor_read_op.hpp
index 80178c4..caf9b63 100644
--- a/asio/include/asio/detail/descriptor_read_op.hpp
+++ b/asio/include/asio/detail/descriptor_read_op.hpp
@@ -85,7 +85,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/descriptor_write_op.hpp b/asio/include/asio/detail/descriptor_write_op.hpp
index c49064a..3157a08 100644
--- a/asio/include/asio/detail/descriptor_write_op.hpp
+++ b/asio/include/asio/detail/descriptor_write_op.hpp
@@ -85,7 +85,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/executor_op.hpp b/asio/include/asio/detail/executor_op.hpp
index eb7c094..0386043 100644
--- a/asio/include/asio/detail/executor_op.hpp
+++ b/asio/include/asio/detail/executor_op.hpp
@@ -48,7 +48,7 @@
     executor_op* o(static_cast<executor_op*>(base));
     ptr p = { o->allocator_, o, o };
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/handler_tracking.hpp b/asio/include/asio/detail/handler_tracking.hpp
index 4c3bdd7..dbb51a9 100644
--- a/asio/include/asio/detail/handler_tracking.hpp
+++ b/asio/include/asio/detail/handler_tracking.hpp
@@ -17,6 +17,8 @@
 
 #include "asio/detail/config.hpp"
 
+namespace asio { class execution_context; }
+
 #if defined(ASIO_CUSTOM_HANDLER_TRACKING)
 # include ASIO_CUSTOM_HANDLER_TRACKING
 #elif defined(ASIO_ENABLE_HANDLER_TRACKING)
@@ -71,14 +73,15 @@
   ASIO_DECL static void init();
 
   // Record the creation of a tracked handler.
-  ASIO_DECL static void creation(tracked_handler* h,
+  ASIO_DECL static void creation(
+      execution_context& context, tracked_handler& h,
       const char* object_type, void* object, const char* op_name);
 
   class completion
   {
   public:
     // Constructor records that handler is to be invoked with no arguments.
-    ASIO_DECL explicit completion(tracked_handler* h);
+    ASIO_DECL explicit completion(const tracked_handler& h);
 
     // Destructor records only when an exception is thrown from the handler, or
     // if the memory is being freed without the handler having been invoked.
@@ -113,8 +116,8 @@
   };
 
   // Record an operation that affects pending handlers.
-  ASIO_DECL static void operation(const char* object_type,
-      void* object, const char* op_name);
+  ASIO_DECL static void operation(execution_context& context,
+      const char* object_type, void* object, const char* op_name);
 
   // Write a line of output.
   ASIO_DECL static void write_line(const char* format, ...);
diff --git a/asio/include/asio/detail/impl/handler_tracking.ipp b/asio/include/asio/detail/impl/handler_tracking.ipp
index a06040e..4786139 100644
--- a/asio/include/asio/detail/impl/handler_tracking.ipp
+++ b/asio/include/asio/detail/impl/handler_tracking.ipp
@@ -99,13 +99,14 @@
     state->current_completion_ = new tss_ptr<completion>;
 }
 
-void handler_tracking::creation(handler_tracking::tracked_handler* h,
+void handler_tracking::creation(execution_context&,
+    handler_tracking::tracked_handler& h,
     const char* object_type, void* object, const char* op_name)
 {
   static tracking_state* state = get_state();
 
   static_mutex::scoped_lock lock(state->mutex_);
-  h->id_ = state->next_id_++;
+  h.id_ = state->next_id_++;
   lock.unlock();
 
   handler_tracking_timestamp timestamp;
@@ -121,11 +122,12 @@
       "@asio|%llu.%06llu|%llu*%llu|%.20s@%p.%.50s\n",
 #endif // defined(ASIO_WINDOWS)
       timestamp.seconds, timestamp.microseconds,
-      current_id, h->id_, object_type, object, op_name);
+      current_id, h.id_, object_type, object, op_name);
 }
 
-handler_tracking::completion::completion(handler_tracking::tracked_handler* h)
-  : id_(h->id_),
+handler_tracking::completion::completion(
+    const handler_tracking::tracked_handler& h)
+  : id_(h.id_),
     invoked_(false),
     next_(*get_state()->current_completion_)
 {
@@ -253,8 +255,8 @@
   }
 }
 
-void handler_tracking::operation(const char* object_type,
-    void* object, const char* op_name)
+void handler_tracking::operation(execution_context&,
+    const char* object_type, void* object, const char* op_name)
 {
   static tracking_state* state = get_state();
 
diff --git a/asio/include/asio/detail/impl/reactive_descriptor_service.ipp b/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
index 21138b0..1f84928 100644
--- a/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
+++ b/asio/include/asio/detail/impl/reactive_descriptor_service.ipp
@@ -83,7 +83,8 @@
 {
   if (is_open(impl))
   {
-    ASIO_HANDLER_OPERATION(("descriptor", &impl, "close"));
+    ASIO_HANDLER_OPERATION((reactor_.context(),
+          "descriptor", &impl, "close"));
 
     reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_,
         (impl.state_ & descriptor_ops::possible_dup) == 0);
@@ -123,7 +124,8 @@
 {
   if (is_open(impl))
   {
-    ASIO_HANDLER_OPERATION(("descriptor", &impl, "close"));
+    ASIO_HANDLER_OPERATION((reactor_.context(),
+          "descriptor", &impl, "close"));
 
     reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_,
         (impl.state_ & descriptor_ops::possible_dup) == 0);
@@ -150,7 +152,8 @@
 
   if (is_open(impl))
   {
-    ASIO_HANDLER_OPERATION(("descriptor", &impl, "release"));
+    ASIO_HANDLER_OPERATION((reactor_.context(),
+          "descriptor", &impl, "release"));
 
     reactor_.deregister_descriptor(impl.descriptor_, impl.reactor_data_, false);
     construct(impl);
@@ -169,7 +172,8 @@
     return ec;
   }
 
-  ASIO_HANDLER_OPERATION(("descriptor", &impl, "cancel"));
+  ASIO_HANDLER_OPERATION((reactor_.context(),
+        "descriptor", &impl, "cancel"));
 
   reactor_.cancel_ops(impl.descriptor_, impl.reactor_data_);
   ec = asio::error_code();
diff --git a/asio/include/asio/detail/impl/reactive_socket_service_base.ipp b/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
index 7c262c2..f6fa6c3 100644
--- a/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
+++ b/asio/include/asio/detail/impl/reactive_socket_service_base.ipp
@@ -82,7 +82,8 @@
 {
   if (impl.socket_ != invalid_socket)
   {
-    ASIO_HANDLER_OPERATION(("socket", &impl, "close"));
+    ASIO_HANDLER_OPERATION((reactor_.context(),
+          "socket", &impl, "close"));
 
     reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_,
         (impl.state_ & socket_ops::possible_dup) == 0);
@@ -98,7 +99,8 @@
 {
   if (is_open(impl))
   {
-    ASIO_HANDLER_OPERATION(("socket", &impl, "close"));
+    ASIO_HANDLER_OPERATION((reactor_.context(),
+          "socket", &impl, "close"));
 
     reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_,
         (impl.state_ & socket_ops::possible_dup) == 0);
@@ -129,7 +131,8 @@
     return ec;
   }
 
-  ASIO_HANDLER_OPERATION(("socket", &impl, "cancel"));
+  ASIO_HANDLER_OPERATION((reactor_.context(),
+        "socket", &impl, "cancel"));
 
   reactor_.cancel_ops(impl.socket_, impl.reactor_data_);
   ec = asio::error_code();
diff --git a/asio/include/asio/detail/impl/resolver_service_base.ipp b/asio/include/asio/detail/impl/resolver_service_base.ipp
index 0e8e847..f03a949 100644
--- a/asio/include/asio/detail/impl/resolver_service_base.ipp
+++ b/asio/include/asio/detail/impl/resolver_service_base.ipp
@@ -92,7 +92,8 @@
 void resolver_service_base::destroy(
     resolver_service_base::implementation_type& impl)
 {
-  ASIO_HANDLER_OPERATION(("resolver", &impl, "cancel"));
+  ASIO_HANDLER_OPERATION((io_service_impl_.context(),
+        "resolver", &impl, "cancel"));
 
   impl.reset();
 }
@@ -100,7 +101,8 @@
 void resolver_service_base::cancel(
     resolver_service_base::implementation_type& impl)
 {
-  ASIO_HANDLER_OPERATION(("resolver", &impl, "cancel"));
+  ASIO_HANDLER_OPERATION((io_service_impl_.context(),
+        "resolver", &impl, "cancel"));
 
   impl.reset(static_cast<void*>(0), socket_ops::noop_deleter());
 }
diff --git a/asio/include/asio/detail/impl/signal_set_service.ipp b/asio/include/asio/detail/impl/signal_set_service.ipp
index 72516b3..41f60f7 100644
--- a/asio/include/asio/detail/impl/signal_set_service.ipp
+++ b/asio/include/asio/detail/impl/signal_set_service.ipp
@@ -437,7 +437,8 @@
     signal_set_service::implementation_type& impl,
     asio::error_code& ec)
 {
-  ASIO_HANDLER_OPERATION(("signal_set", &impl, "cancel"));
+  ASIO_HANDLER_OPERATION((io_service_.context(),
+        "signal_set", &impl, "cancel"));
 
   op_queue<operation> ops;
   {
diff --git a/asio/include/asio/detail/impl/strand_executor_service.hpp b/asio/include/asio/detail/impl/strand_executor_service.hpp
index e0b3968..fb81249 100644
--- a/asio/include/asio/detail/impl/strand_executor_service.hpp
+++ b/asio/include/asio/detail/impl/strand_executor_service.hpp
@@ -121,7 +121,8 @@
   p.v = p.a.allocate(1);
   p.p = new (p.v) op(tmp, allocator);
 
-  ASIO_HANDLER_CREATION((p.p, "strand_executor", impl.get(), "dispatch"));
+  ASIO_HANDLER_CREATION((impl->service_->context(),
+        *p.p, "strand_executor", impl.get(), "dispatch"));
 
   // Add the function to the strand and schedule the strand if required.
   bool first = enqueue(impl, p.p);
@@ -149,7 +150,8 @@
   p.v = p.a.allocate(1);
   p.p = new (p.v) op(tmp, allocator);
 
-  ASIO_HANDLER_CREATION((p.p, "strand_executor", impl.get(), "post"));
+  ASIO_HANDLER_CREATION((impl->service_->context(),
+        *p.p, "strand_executor", impl.get(), "post"));
 
   // Add the function to the strand and schedule the strand if required.
   bool first = enqueue(impl, p.p);
@@ -177,7 +179,8 @@
   p.v = p.a.allocate(1);
   p.p = new (p.v) op(tmp, allocator);
 
-  ASIO_HANDLER_CREATION((p.p, "strand_executor", impl.get(), "defer"));
+  ASIO_HANDLER_CREATION((impl->service_->context(),
+        *p.p, "strand_executor", impl.get(), "defer"));
 
   // Add the function to the strand and schedule the strand if required.
   bool first = enqueue(impl, p.p);
diff --git a/asio/include/asio/detail/impl/strand_service.hpp b/asio/include/asio/detail/impl/strand_service.hpp
index 5accfda..bcd7b8f 100644
--- a/asio/include/asio/detail/impl/strand_service.hpp
+++ b/asio/include/asio/detail/impl/strand_service.hpp
@@ -68,7 +68,8 @@
     op::ptr::allocate(handler), 0 };
   p.p = new (p.v) op(handler);
 
-  ASIO_HANDLER_CREATION((p.p, "strand", impl, "dispatch"));
+  ASIO_HANDLER_CREATION((this->context(),
+        *p.p, "strand", impl, "dispatch"));
 
   bool dispatch_immediately = do_dispatch(impl, p.p);
   operation* o = p.p;
@@ -102,7 +103,8 @@
     op::ptr::allocate(handler), 0 };
   p.p = new (p.v) op(handler);
 
-  ASIO_HANDLER_CREATION((p.p, "strand", impl, "post"));
+  ASIO_HANDLER_CREATION((this->context(),
+        *p.p, "strand", impl, "post"));
 
   do_post(impl, p.p, is_continuation);
   p.v = p.p = 0;
diff --git a/asio/include/asio/detail/impl/win_iocp_handle_service.ipp b/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
index b484f7b..2945086 100644
--- a/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
+++ b/asio/include/asio/detail/impl/win_iocp_handle_service.ipp
@@ -199,7 +199,8 @@
 {
   if (is_open(impl))
   {
-    ASIO_HANDLER_OPERATION(("handle", &impl, "close"));
+    ASIO_HANDLER_OPERATION((iocp_service_.context(),
+          "handle", &impl, "close"));
 
     if (!::CloseHandle(impl.handle_))
     {
@@ -233,7 +234,8 @@
     return ec;
   }
 
-  ASIO_HANDLER_OPERATION(("handle", &impl, "cancel"));
+  ASIO_HANDLER_OPERATION((iocp_service_.context(),
+        "handle", &impl, "cancel"));
 
   if (FARPROC cancel_io_ex_ptr = ::GetProcAddress(
         ::GetModuleHandleA("KERNEL32"), "CancelIoEx"))
@@ -507,7 +509,8 @@
 {
   if (is_open(impl))
   {
-    ASIO_HANDLER_OPERATION(("handle", &impl, "close"));
+    ASIO_HANDLER_OPERATION((iocp_service_.context(),
+          "handle", &impl, "close"));
 
     ::CloseHandle(impl.handle_);
     impl.handle_ = INVALID_HANDLE_VALUE;
diff --git a/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp b/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
index 3e374f7..853cdde 100644
--- a/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
+++ b/asio/include/asio/detail/impl/win_iocp_socket_service_base.ipp
@@ -166,7 +166,8 @@
 {
   if (is_open(impl))
   {
-    ASIO_HANDLER_OPERATION(("socket", &impl, "close"));
+    ASIO_HANDLER_OPERATION((iocp_service_.context(),
+          "socket", &impl, "close"));
 
     // Check if the reactor was created, in which case we need to close the
     // socket on the reactor as well to cancel any operations that might be
@@ -200,7 +201,8 @@
     return ec;
   }
 
-  ASIO_HANDLER_OPERATION(("socket", &impl, "cancel"));
+  ASIO_HANDLER_OPERATION((iocp_service_.context(),
+        "socket", &impl, "cancel"));
 
   if (FARPROC cancel_io_ex_ptr = ::GetProcAddress(
         ::GetModuleHandleA("KERNEL32"), "CancelIoEx"))
@@ -618,7 +620,8 @@
 {
   if (is_open(impl))
   {
-    ASIO_HANDLER_OPERATION(("socket", &impl, "close"));
+    ASIO_HANDLER_OPERATION((iocp_service_.context(),
+          "socket", &impl, "close"));
 
     // Check if the reactor was created, in which case we need to close the
     // socket on the reactor as well to cancel any operations that might be
diff --git a/asio/include/asio/detail/impl/win_object_handle_service.ipp b/asio/include/asio/detail/impl/win_object_handle_service.ipp
index f10bc4d..737ae17 100644
--- a/asio/include/asio/detail/impl/win_object_handle_service.ipp
+++ b/asio/include/asio/detail/impl/win_object_handle_service.ipp
@@ -177,7 +177,8 @@
 
   if (is_open(impl))
   {
-    ASIO_HANDLER_OPERATION(("object_handle", &impl, "close"));
+    ASIO_HANDLER_OPERATION((io_service_.context(),
+          "object_handle", &impl, "close"));
 
     HANDLE wait_handle = impl.wait_handle_;
     impl.wait_handle_ = INVALID_HANDLE_VALUE;
@@ -226,7 +227,8 @@
 {
   if (is_open(impl))
   {
-    ASIO_HANDLER_OPERATION(("object_handle", &impl, "close"));
+    ASIO_HANDLER_OPERATION((io_service_.context(),
+          "object_handle", &impl, "close"));
 
     mutex::scoped_lock lock(mutex_);
 
@@ -277,7 +279,8 @@
 {
   if (is_open(impl))
   {
-    ASIO_HANDLER_OPERATION(("object_handle", &impl, "cancel"));
+    ASIO_HANDLER_OPERATION((io_service_.context(),
+          "object_handle", &impl, "cancel"));
 
     mutex::scoped_lock lock(mutex_);
 
diff --git a/asio/include/asio/detail/reactive_descriptor_service.hpp b/asio/include/asio/detail/reactive_descriptor_service.hpp
index 1903f95..87775e8 100644
--- a/asio/include/asio/detail/reactive_descriptor_service.hpp
+++ b/asio/include/asio/detail/reactive_descriptor_service.hpp
@@ -202,7 +202,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "descriptor", &impl, "async_wait"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "descriptor", &impl, "async_wait"));
 
     int op_type;
     switch (w)
@@ -264,7 +265,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.descriptor_, buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "descriptor", &impl, "async_write_some"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "descriptor", &impl, "async_write_some"));
 
     start_op(impl, reactor::write_op, p.p, is_continuation, true,
         buffer_sequence_adapter<asio::const_buffer,
@@ -286,8 +288,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "descriptor",
-          &impl, "async_write_some(null_buffers)"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "descriptor", &impl, "async_write_some(null_buffers)"));
 
     start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
     p.v = p.p = 0;
@@ -330,7 +332,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.descriptor_, buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "descriptor", &impl, "async_read_some"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "descriptor", &impl, "async_read_some"));
 
     start_op(impl, reactor::read_op, p.p, is_continuation, true,
         buffer_sequence_adapter<asio::mutable_buffer,
@@ -352,8 +355,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "descriptor",
-          &impl, "async_read_some(null_buffers)"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "descriptor", &impl, "async_read_some(null_buffers)"));
 
     start_op(impl, reactor::read_op, p.p, is_continuation, false, false);
     p.v = p.p = 0;
diff --git a/asio/include/asio/detail/reactive_null_buffers_op.hpp b/asio/include/asio/detail/reactive_null_buffers_op.hpp
index ec44d1e..b2c3c4d 100644
--- a/asio/include/asio/detail/reactive_null_buffers_op.hpp
+++ b/asio/include/asio/detail/reactive_null_buffers_op.hpp
@@ -55,7 +55,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/reactive_socket_accept_op.hpp b/asio/include/asio/detail/reactive_socket_accept_op.hpp
index 22620a6..d94bf56 100644
--- a/asio/include/asio/detail/reactive_socket_accept_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_accept_op.hpp
@@ -103,7 +103,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
@@ -162,7 +162,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
@@ -181,7 +181,7 @@
     if (owner)
     {
       fenced_block b(fenced_block::half);
-      ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+      ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
       w.complete(handler, handler.handler_);
       ASIO_HANDLER_INVOCATION_END;
     }
diff --git a/asio/include/asio/detail/reactive_socket_connect_op.hpp b/asio/include/asio/detail/reactive_socket_connect_op.hpp
index 0600444..a75a407 100644
--- a/asio/include/asio/detail/reactive_socket_connect_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_connect_op.hpp
@@ -73,7 +73,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/reactive_socket_recv_op.hpp b/asio/include/asio/detail/reactive_socket_recv_op.hpp
index 5067602..dd0f254 100644
--- a/asio/include/asio/detail/reactive_socket_recv_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_recv_op.hpp
@@ -90,7 +90,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp b/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
index 6735d18..56ab32d 100644
--- a/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_recvfrom_op.hpp
@@ -100,7 +100,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp b/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
index 489d13a..e174940 100644
--- a/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_recvmsg_op.hpp
@@ -92,7 +92,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/reactive_socket_send_op.hpp b/asio/include/asio/detail/reactive_socket_send_op.hpp
index f4d9bea..ed4e587 100644
--- a/asio/include/asio/detail/reactive_socket_send_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_send_op.hpp
@@ -87,7 +87,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/reactive_socket_sendto_op.hpp b/asio/include/asio/detail/reactive_socket_sendto_op.hpp
index 3688840..9780716 100644
--- a/asio/include/asio/detail/reactive_socket_sendto_op.hpp
+++ b/asio/include/asio/detail/reactive_socket_sendto_op.hpp
@@ -90,7 +90,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/reactive_socket_service.hpp b/asio/include/asio/detail/reactive_socket_service.hpp
index 432921b..d96b0ce 100644
--- a/asio/include/asio/detail/reactive_socket_service.hpp
+++ b/asio/include/asio/detail/reactive_socket_service.hpp
@@ -238,7 +238,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.socket_, buffers, destination, flags, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_send_to"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_send_to"));
 
     start_op(impl, reactor::write_op, p.p, is_continuation, true, false);
     p.v = p.p = 0;
@@ -258,8 +259,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket",
-          &impl, "async_send_to(null_buffers)"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_send_to(null_buffers)"));
 
     start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
     p.v = p.p = 0;
@@ -321,8 +322,8 @@
     p.p = new (p.v) op(impl.socket_, protocol,
         buffers, sender_endpoint, flags, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket",
-          &impl, "async_receive_from"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_receive_from"));
 
     start_op(impl,
         (flags & socket_base::message_out_of_band)
@@ -346,8 +347,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket",
-          &impl, "async_receive_from(null_buffers)"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_receive_from(null_buffers)"));
 
     // Reset endpoint since it can be given no sensible value at this time.
     sender_endpoint = endpoint_type();
@@ -431,7 +432,8 @@
     p.p = new (p.v) op(impl.socket_, impl.state_, peer,
         impl.protocol_, peer_endpoint, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_accept"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_accept"));
 
     start_accept_op(impl, p.p, is_continuation, peer.is_open());
     p.v = p.p = 0;
@@ -455,7 +457,8 @@
     p.p = new (p.v) op(peer_io_service ? *peer_io_service : io_service_,
         impl.socket_, impl.state_, impl.protocol_, peer_endpoint, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_accept"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_accept"));
 
     start_accept_op(impl, p.p, is_continuation, false);
     p.v = p.p = 0;
@@ -485,7 +488,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.socket_, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_connect"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_connect"));
 
     start_connect_op(impl, p.p, is_continuation,
         peer_endpoint.data(), peer_endpoint.size());
diff --git a/asio/include/asio/detail/reactive_socket_service_base.hpp b/asio/include/asio/detail/reactive_socket_service_base.hpp
index d252cd2..3e50b76 100644
--- a/asio/include/asio/detail/reactive_socket_service_base.hpp
+++ b/asio/include/asio/detail/reactive_socket_service_base.hpp
@@ -210,7 +210,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_wait"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_wait"));
 
     int op_type;
     switch (w)
@@ -274,7 +275,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.socket_, buffers, flags, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_send"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_send"));
 
     start_op(impl, reactor::write_op, p.p, is_continuation, true,
         ((impl.state_ & socket_ops::stream_oriented)
@@ -297,8 +299,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket",
-          &impl, "async_send(null_buffers)"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_send(null_buffers)"));
 
     start_op(impl, reactor::write_op, p.p, is_continuation, false, false);
     p.v = p.p = 0;
@@ -343,7 +345,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.socket_, impl.state_, buffers, flags, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_receive"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_receive"));
 
     start_op(impl,
         (flags & socket_base::message_out_of_band)
@@ -370,8 +373,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket",
-          &impl, "async_receive(null_buffers)"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_receive(null_buffers)"));
 
     start_op(impl,
         (flags & socket_base::message_out_of_band)
@@ -426,8 +429,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.socket_, buffers, in_flags, out_flags, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket",
-          &impl, "async_receive_with_flags"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_receive_with_flags"));
 
     start_op(impl,
         (in_flags & socket_base::message_out_of_band)
@@ -452,8 +455,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl,
-          "async_receive_with_flags(null_buffers)"));
+    ASIO_HANDLER_CREATION((reactor_.context(),
+          *p.p, "socket", &impl, "async_receive_with_flags(null_buffers)"));
 
     // Clear out_flags, since we cannot give it any other sensible value when
     // performing a null_buffers operation.
diff --git a/asio/include/asio/detail/reactive_wait_op.hpp b/asio/include/asio/detail/reactive_wait_op.hpp
index 43adb54..6593435 100644
--- a/asio/include/asio/detail/reactive_wait_op.hpp
+++ b/asio/include/asio/detail/reactive_wait_op.hpp
@@ -55,7 +55,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/resolve_endpoint_op.hpp b/asio/include/asio/detail/resolve_endpoint_op.hpp
index 7584aee..bb8324a 100644
--- a/asio/include/asio/detail/resolve_endpoint_op.hpp
+++ b/asio/include/asio/detail/resolve_endpoint_op.hpp
@@ -83,7 +83,7 @@
       // The operation has been returned to the main io_service. The completion
       // handler is ready to be delivered.
 
-      ASIO_HANDLER_COMPLETION((o));
+      ASIO_HANDLER_COMPLETION((*o));
 
       // Make a copy of the handler so that the memory can be deallocated
       // before the upcall is made. Even if we're not about to make an upcall,
diff --git a/asio/include/asio/detail/resolve_op.hpp b/asio/include/asio/detail/resolve_op.hpp
index 0f250b4..a505521 100644
--- a/asio/include/asio/detail/resolve_op.hpp
+++ b/asio/include/asio/detail/resolve_op.hpp
@@ -88,7 +88,7 @@
       // The operation has been returned to the main io_service. The completion
       // handler is ready to be delivered.
 
-      ASIO_HANDLER_COMPLETION((o));
+      ASIO_HANDLER_COMPLETION((*o));
 
       // Make a copy of the handler so that the memory can be deallocated
       // before the upcall is made. Even if we're not about to make an upcall,
diff --git a/asio/include/asio/detail/resolver_service.hpp b/asio/include/asio/detail/resolver_service.hpp
index 1b0953a..e4932db 100644
--- a/asio/include/asio/detail/resolver_service.hpp
+++ b/asio/include/asio/detail/resolver_service.hpp
@@ -79,7 +79,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl, query, io_service_impl_, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "resolver", &impl, "async_resolve"));
+    ASIO_HANDLER_CREATION((io_service_impl_.context(),
+          *p.p, "resolver", &impl, "async_resolve"));
 
     start_resolve_op(p.p);
     p.v = p.p = 0;
@@ -110,7 +111,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl, endpoint, io_service_impl_, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "resolver", &impl, "async_resolve"));
+    ASIO_HANDLER_CREATION((io_service_impl_.context(),
+          *p.p, "resolver", &impl, "async_resolve"));
 
     start_resolve_op(p.p);
     p.v = p.p = 0;
diff --git a/asio/include/asio/detail/signal_handler.hpp b/asio/include/asio/detail/signal_handler.hpp
index 4554f98..b68295e 100644
--- a/asio/include/asio/detail/signal_handler.hpp
+++ b/asio/include/asio/detail/signal_handler.hpp
@@ -51,7 +51,7 @@
     ptr p = { asio::detail::addressof(h->handler_), h, h };
     handler_work<Handler> w(h->handler_);
 
-    ASIO_HANDLER_COMPLETION((h));
+    ASIO_HANDLER_COMPLETION((*h));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/signal_set_service.hpp b/asio/include/asio/detail/signal_set_service.hpp
index 0bb3cd7..c1e60d7 100644
--- a/asio/include/asio/detail/signal_set_service.hpp
+++ b/asio/include/asio/detail/signal_set_service.hpp
@@ -152,7 +152,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "signal_set", &impl, "async_wait"));
+    ASIO_HANDLER_CREATION((io_service_.context(),
+          *p.p, "signal_set", &impl, "async_wait"));
 
     start_wait_op(impl, p.p);
     p.v = p.p = 0;
diff --git a/asio/include/asio/detail/wait_handler.hpp b/asio/include/asio/detail/wait_handler.hpp
index 542060d..0eb4eb7 100644
--- a/asio/include/asio/detail/wait_handler.hpp
+++ b/asio/include/asio/detail/wait_handler.hpp
@@ -50,7 +50,7 @@
     ptr p = { asio::detail::addressof(h->handler_), h, h };
     handler_work<Handler> w(h->handler_);
 
-    ASIO_HANDLER_COMPLETION((h));
+    ASIO_HANDLER_COMPLETION((*h));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/win_iocp_handle_read_op.hpp b/asio/include/asio/detail/win_iocp_handle_read_op.hpp
index 7753964..8cf9fbc 100644
--- a/asio/include/asio/detail/win_iocp_handle_read_op.hpp
+++ b/asio/include/asio/detail/win_iocp_handle_read_op.hpp
@@ -60,7 +60,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
     if (owner)
diff --git a/asio/include/asio/detail/win_iocp_handle_service.hpp b/asio/include/asio/detail/win_iocp_handle_service.hpp
index 65d7f1a..e89f2a0 100644
--- a/asio/include/asio/detail/win_iocp_handle_service.hpp
+++ b/asio/include/asio/detail/win_iocp_handle_service.hpp
@@ -151,7 +151,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "handle", &impl, "async_write_some"));
+    ASIO_HANDLER_CREATION((iocp_service_.context(),
+          *p.p, "handle", &impl, "async_write_some"));
 
     start_write_op(impl, 0,
         buffer_sequence_adapter<asio::const_buffer,
@@ -171,7 +172,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "handle", &impl, "async_write_some_at"));
+    ASIO_HANDLER_CREATION((iocp_service_.context(),
+          *p.p, "handle", &impl, "async_write_some_at"));
 
     start_write_op(impl, offset,
         buffer_sequence_adapter<asio::const_buffer,
@@ -211,7 +213,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "handle", &impl, "async_read_some"));
+    ASIO_HANDLER_CREATION((iocp_service_.context(),
+          *p.p, "handle", &impl, "async_read_some"));
 
     start_read_op(impl, 0,
         buffer_sequence_adapter<asio::mutable_buffer,
@@ -232,7 +235,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "handle", &impl, "async_read_some_at"));
+    ASIO_HANDLER_CREATION((iocp_service_.context(),
+          *p.p, "handle", &impl, "async_read_some_at"));
 
     start_read_op(impl, offset,
         buffer_sequence_adapter<asio::mutable_buffer,
diff --git a/asio/include/asio/detail/win_iocp_handle_write_op.hpp b/asio/include/asio/detail/win_iocp_handle_write_op.hpp
index eb9f41c..b4380c9 100644
--- a/asio/include/asio/detail/win_iocp_handle_write_op.hpp
+++ b/asio/include/asio/detail/win_iocp_handle_write_op.hpp
@@ -56,7 +56,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
     if (owner)
diff --git a/asio/include/asio/detail/win_iocp_null_buffers_op.hpp b/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
index 5e489d4..4123848 100644
--- a/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
+++ b/asio/include/asio/detail/win_iocp_null_buffers_op.hpp
@@ -66,7 +66,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // The reactor may have stored a result in the operation object.
     if (o->ec_)
diff --git a/asio/include/asio/detail/win_iocp_overlapped_op.hpp b/asio/include/asio/detail/win_iocp_overlapped_op.hpp
index a487d46..43a7752 100644
--- a/asio/include/asio/detail/win_iocp_overlapped_op.hpp
+++ b/asio/include/asio/detail/win_iocp_overlapped_op.hpp
@@ -53,7 +53,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp b/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
index 7816880..02671e4 100644
--- a/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
+++ b/asio/include/asio/detail/win_iocp_overlapped_ptr.hpp
@@ -81,8 +81,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "io_service",
-          &io_service.impl_, "overlapped"));
+    ASIO_HANDLER_CREATION((io_service,
+          *p.p, "io_service", &io_service.impl_, "overlapped"));
 
     io_service.impl_.work_started();
     reset();
diff --git a/asio/include/asio/detail/win_iocp_socket_accept_op.hpp b/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
index b6e4515..1820a0f 100644
--- a/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_accept_op.hpp
@@ -122,7 +122,7 @@
         *o->peer_endpoint_ = peer_endpoint;
     }
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
@@ -248,7 +248,7 @@
         *o->peer_endpoint_ = peer_endpoint;
     }
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
@@ -267,7 +267,7 @@
     if (owner)
     {
       fenced_block b(fenced_block::half);
-      ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, handler.arg2_));
+      ASIO_HANDLER_INVOCATION_BEGIN((handler.arg1_, "..."));
       w.complete(handler, handler.handler_);
       ASIO_HANDLER_INVOCATION_END;
     }
diff --git a/asio/include/asio/detail/win_iocp_socket_connect_op.hpp b/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
index 2f8a516..38ef30e 100644
--- a/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_connect_op.hpp
@@ -89,7 +89,7 @@
         ec = o->ec_;
     }
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/win_iocp_socket_recv_op.hpp b/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
index c25a322..3df821a 100644
--- a/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_recv_op.hpp
@@ -63,7 +63,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
     // Check whether buffers are still valid.
diff --git a/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp b/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
index 0132155..c7ede4f 100644
--- a/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_recvfrom_op.hpp
@@ -70,7 +70,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
     // Check whether buffers are still valid.
diff --git a/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp b/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
index 718a335..faa414f 100644
--- a/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_recvmsg_op.hpp
@@ -66,7 +66,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
     // Check whether buffers are still valid.
diff --git a/asio/include/asio/detail/win_iocp_socket_send_op.hpp b/asio/include/asio/detail/win_iocp_socket_send_op.hpp
index 6ddd63d..92f4396 100644
--- a/asio/include/asio/detail/win_iocp_socket_send_op.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_send_op.hpp
@@ -61,7 +61,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
     // Check whether buffers are still valid.
diff --git a/asio/include/asio/detail/win_iocp_socket_service.hpp b/asio/include/asio/detail/win_iocp_socket_service.hpp
index 21f3e8d..05a3ebf 100644
--- a/asio/include/asio/detail/win_iocp_socket_service.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_service.hpp
@@ -316,7 +316,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.cancel_token_, buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_send_to"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_send_to"));
 
     buffer_sequence_adapter<asio::const_buffer,
         ConstBufferSequence> bufs(buffers);
@@ -338,8 +339,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.cancel_token_, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket",
-          &impl, "async_send_to(null_buffers)"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_send_to(null_buffers)"));
 
     start_reactor_op(impl, select_reactor::write_op, p.p);
     p.v = p.p = 0;
@@ -396,7 +397,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(sender_endp, impl.cancel_token_, buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_receive_from"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_receive_from"));
 
     buffer_sequence_adapter<asio::mutable_buffer,
         MutableBufferSequence> bufs(buffers);
@@ -418,8 +420,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.cancel_token_, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl,
-          "async_receive_from(null_buffers)"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_receive_from(null_buffers)"));
 
     // Reset endpoint since it can be given no sensible value at this time.
     sender_endpoint = endpoint_type();
@@ -499,7 +501,8 @@
     p.p = new (p.v) op(*this, impl.socket_, peer, impl.protocol_,
         peer_endpoint, enable_connection_aborted, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_accept"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_accept"));
 
     start_accept_op(impl, peer.is_open(), p.p->new_socket(),
         impl.protocol_.family(), impl.protocol_.type(),
@@ -526,7 +529,8 @@
         peer_io_service ? *peer_io_service : io_service_,
         peer_endpoint, enable_connection_aborted, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_accept"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_accept"));
 
     start_accept_op(impl, false, p.p->new_socket(),
         impl.protocol_.family(), impl.protocol_.type(),
@@ -556,7 +560,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.socket_, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_connect"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_connect"));
 
     start_connect_op(impl, impl.protocol_.family(), impl.protocol_.type(),
         peer_endpoint.data(), static_cast<int>(peer_endpoint.size()), p.p);
diff --git a/asio/include/asio/detail/win_iocp_socket_service_base.hpp b/asio/include/asio/detail/win_iocp_socket_service_base.hpp
index a7106b1..1e9ccb5 100644
--- a/asio/include/asio/detail/win_iocp_socket_service_base.hpp
+++ b/asio/include/asio/detail/win_iocp_socket_service_base.hpp
@@ -227,7 +227,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.cancel_token_, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_wait"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_wait"));
 
     switch (w)
     {
@@ -285,7 +286,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.cancel_token_, buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_send"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_send"));
 
     buffer_sequence_adapter<asio::const_buffer,
         ConstBufferSequence> bufs(buffers);
@@ -307,8 +309,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.cancel_token_, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket",
-          &impl, "async_send(null_buffers)"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_send(null_buffers)"));
 
     start_reactor_op(impl, select_reactor::write_op, p.p);
     p.v = p.p = 0;
@@ -350,7 +352,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.state_, impl.cancel_token_, buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_receive"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_receive"));
 
     buffer_sequence_adapter<asio::mutable_buffer,
         MutableBufferSequence> bufs(buffers);
@@ -372,8 +375,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.cancel_token_, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket",
-          &impl, "async_receive(null_buffers)"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_receive(null_buffers)"));
 
     start_null_buffers_receive_op(impl, flags, p.p);
     p.v = p.p = 0;
@@ -422,8 +425,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.cancel_token_, buffers, out_flags, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket",
-          &impl, "async_receive_with_flags"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_receive_with_flags"));
 
     buffer_sequence_adapter<asio::mutable_buffer,
         MutableBufferSequence> bufs(buffers);
@@ -444,8 +447,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(impl.cancel_token_, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl,
-          "async_receive_with_flags(null_buffers)"));
+    ASIO_HANDLER_CREATION((io_service_,
+          *p.p, "socket", &impl, "async_receive_with_flags(null_buffers)"));
 
     // Reset out_flags since it can be given no sensible value at this time.
     out_flags = 0;
diff --git a/asio/include/asio/detail/win_iocp_wait_op.hpp b/asio/include/asio/detail/win_iocp_wait_op.hpp
index a996cb2..d406ded 100644
--- a/asio/include/asio/detail/win_iocp_wait_op.hpp
+++ b/asio/include/asio/detail/win_iocp_wait_op.hpp
@@ -66,7 +66,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // The reactor may have stored a result in the operation object.
     if (o->ec_)
diff --git a/asio/include/asio/detail/win_object_handle_service.hpp b/asio/include/asio/detail/win_object_handle_service.hpp
index 21f9fe8..95ae2d6 100644
--- a/asio/include/asio/detail/win_object_handle_service.hpp
+++ b/asio/include/asio/detail/win_object_handle_service.hpp
@@ -137,7 +137,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "object_handle", &impl, "async_wait"));
+    ASIO_HANDLER_CREATION((io_service_.context(),
+          *p.p, "object_handle", &impl, "async_wait"));
 
     start_wait_op(impl, p.p);
     p.v = p.p = 0;
diff --git a/asio/include/asio/detail/winrt_resolve_op.hpp b/asio/include/asio/detail/winrt_resolve_op.hpp
index 4bb1518..312f42a 100644
--- a/asio/include/asio/detail/winrt_resolve_op.hpp
+++ b/asio/include/asio/detail/winrt_resolve_op.hpp
@@ -65,7 +65,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     iterator_type iterator = iterator_type();
     if (!o->ec_)
diff --git a/asio/include/asio/detail/winrt_resolver_service.hpp b/asio/include/asio/detail/winrt_resolver_service.hpp
index 4405dba..8e16a5f 100644
--- a/asio/include/asio/detail/winrt_resolver_service.hpp
+++ b/asio/include/asio/detail/winrt_resolver_service.hpp
@@ -129,7 +129,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(query, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "resolver", &impl, "async_resolve"));
+    ASIO_HANDLER_CREATION((io_service_.context(),
+          *p.p, "resolver", &impl, "async_resolve"));
 
     try
     {
diff --git a/asio/include/asio/detail/winrt_socket_connect_op.hpp b/asio/include/asio/detail/winrt_socket_connect_op.hpp
index db6aeda..7440e77 100644
--- a/asio/include/asio/detail/winrt_socket_connect_op.hpp
+++ b/asio/include/asio/detail/winrt_socket_connect_op.hpp
@@ -55,7 +55,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
     // Make a copy of the handler so that the memory can be deallocated before
     // the upcall is made. Even if we're not about to make an upcall, a
diff --git a/asio/include/asio/detail/winrt_socket_recv_op.hpp b/asio/include/asio/detail/winrt_socket_recv_op.hpp
index 959b89b..6bfe98f 100644
--- a/asio/include/asio/detail/winrt_socket_recv_op.hpp
+++ b/asio/include/asio/detail/winrt_socket_recv_op.hpp
@@ -57,7 +57,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
     // Check whether buffers are still valid.
diff --git a/asio/include/asio/detail/winrt_socket_send_op.hpp b/asio/include/asio/detail/winrt_socket_send_op.hpp
index ad5b052..d602eae 100644
--- a/asio/include/asio/detail/winrt_socket_send_op.hpp
+++ b/asio/include/asio/detail/winrt_socket_send_op.hpp
@@ -56,7 +56,7 @@
     ptr p = { asio::detail::addressof(o->handler_), o, o };
     handler_work<Handler> w(o->handler_);
 
-    ASIO_HANDLER_COMPLETION((o));
+    ASIO_HANDLER_COMPLETION((*o));
 
 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING)
     // Check whether buffers are still valid.
diff --git a/asio/include/asio/detail/winrt_ssocket_service.hpp b/asio/include/asio/detail/winrt_ssocket_service.hpp
index 7e68cc2..629518c 100644
--- a/asio/include/asio/detail/winrt_ssocket_service.hpp
+++ b/asio/include/asio/detail/winrt_ssocket_service.hpp
@@ -214,7 +214,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_connect"));
+    ASIO_HANDLER_CREATION((io_service_.context(),
+          *p.p, "socket", &impl, "async_connect"));
 
     start_connect_op(impl, peer_endpoint.data(), p.p, is_continuation);
     p.v = p.p = 0;
diff --git a/asio/include/asio/detail/winrt_ssocket_service_base.hpp b/asio/include/asio/detail/winrt_ssocket_service_base.hpp
index 7419f0a..3103702 100644
--- a/asio/include/asio/detail/winrt_ssocket_service_base.hpp
+++ b/asio/include/asio/detail/winrt_ssocket_service_base.hpp
@@ -202,7 +202,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_send"));
+    ASIO_HANDLER_CREATION((io_service_.context(),
+          *p.p, "socket", &impl, "async_send"));
 
     start_send_op(impl,
         buffer_sequence_adapter<asio::const_buffer,
@@ -257,7 +258,8 @@
       op::ptr::allocate(handler), 0 };
     p.p = new (p.v) op(buffers, handler);
 
-    ASIO_HANDLER_CREATION((p.p, "socket", &impl, "async_receive"));
+    ASIO_HANDLER_CREATION((io_service_.context(),
+          *p.p, "socket", &impl, "async_receive"));
 
     start_receive_op(impl,
         buffer_sequence_adapter<asio::mutable_buffer,
diff --git a/asio/include/asio/impl/io_service.hpp b/asio/include/asio/impl/io_service.hpp
index 658c9b4..610dd48 100644
--- a/asio/include/asio/impl/io_service.hpp
+++ b/asio/include/asio/impl/io_service.hpp
@@ -95,7 +95,7 @@
       op::ptr::allocate(init.handler), 0 };
     p.p = new (p.v) op(init.handler);
 
-    ASIO_HANDLER_CREATION((p.p, "io_service", this, "dispatch"));
+    ASIO_HANDLER_CREATION((*this, *p.p, "io_service", this, "dispatch"));
 
     impl_.do_dispatch(p.p);
     p.v = p.p = 0;
@@ -124,7 +124,7 @@
       op::ptr::allocate(init.handler), 0 };
   p.p = new (p.v) op(init.handler);
 
-  ASIO_HANDLER_CREATION((p.p, "io_service", this, "post"));
+  ASIO_HANDLER_CREATION((*this, *p.p, "io_service", this, "post"));
 
   impl_.post_immediate_completion(p.p, is_continuation);
   p.v = p.p = 0;
@@ -187,7 +187,8 @@
   p.v = p.a.allocate(1);
   p.p = new (p.v) op(tmp, allocator);
 
-  ASIO_HANDLER_CREATION((p.p, "io_service", this, "post"));
+  ASIO_HANDLER_CREATION((this->context(),
+        *p.p, "io_service", this, "post"));
 
   io_service_.impl_.post_immediate_completion(p.p, false);
   p.v = p.p = 0;
@@ -211,7 +212,8 @@
   p.v = p.a.allocate(1);
   p.p = new (p.v) op(tmp, allocator);
 
-  ASIO_HANDLER_CREATION((p.p, "io_service", this, "post"));
+  ASIO_HANDLER_CREATION((this->context(),
+        *p.p, "io_service", this, "post"));
 
   io_service_.impl_.post_immediate_completion(p.p, false);
   p.v = p.p = 0;
@@ -235,7 +237,8 @@
   p.v = p.a.allocate(1);
   p.p = new (p.v) op(tmp, allocator);
 
-  ASIO_HANDLER_CREATION((p.p, "io_service", this, "defer"));
+  ASIO_HANDLER_CREATION((this->context(),
+        *p.p, "io_service", this, "defer"));
 
   io_service_.impl_.post_immediate_completion(p.p, true);
   p.v = p.p = 0;
diff --git a/asio/include/asio/impl/system_executor.hpp b/asio/include/asio/impl/system_executor.hpp
index d1cdd6c..3f4ab38 100644
--- a/asio/include/asio/impl/system_executor.hpp
+++ b/asio/include/asio/impl/system_executor.hpp
@@ -42,6 +42,8 @@
 void system_executor::post(
     ASIO_MOVE_ARG(Function) f, const Allocator& a)
 {
+  context_impl& ctx = detail::global<context_impl>();
+
   // Make a local, non-const copy of the function.
   typedef typename decay<Function>::type function_type;
   function_type tmp(ASIO_MOVE_CAST(Function)(f));
@@ -56,9 +58,8 @@
   p.v = p.a.allocate(1);
   p.p = new (p.v) op(tmp, allocator);
 
-  ASIO_HANDLER_CREATION((p.p, "system_executor", this, "post"));
+  ASIO_HANDLER_CREATION((ctx, *p.p, "system_executor", this, "post"));
 
-  context_impl& ctx = detail::global<context_impl>();
   ctx.scheduler_.post_immediate_completion(p.p, false);
   p.v = p.p = 0;
 }
@@ -67,6 +68,8 @@
 void system_executor::defer(
     ASIO_MOVE_ARG(Function) f, const Allocator& a)
 {
+  context_impl& ctx = detail::global<context_impl>();
+
   // Make a local, non-const copy of the function.
   typedef typename decay<Function>::type function_type;
   function_type tmp(ASIO_MOVE_CAST(Function)(f));
@@ -81,9 +84,8 @@
   p.v = p.a.allocate(1);
   p.p = new (p.v) op(tmp, allocator);
 
-  ASIO_HANDLER_CREATION((p.p, "system_executor", this, "defer"));
+  ASIO_HANDLER_CREATION((ctx, *p.p, "system_executor", this, "defer"));
 
-  context_impl& ctx = detail::global<context_impl>();
   ctx.scheduler_.post_immediate_completion(p.p, true);
   p.v = p.p = 0;
 }
diff --git a/asio/include/asio/impl/thread_pool.hpp b/asio/include/asio/impl/thread_pool.hpp
index 0b7af1e..445279d 100644
--- a/asio/include/asio/impl/thread_pool.hpp
+++ b/asio/include/asio/impl/thread_pool.hpp
@@ -73,7 +73,7 @@
   p.v = p.a.allocate(1);
   p.p = new (p.v) op(tmp, allocator);
 
-  ASIO_HANDLER_CREATION((p.p, "thread_pool", this, "post"));
+  ASIO_HANDLER_CREATION((pool_, *p.p, "thread_pool", this, "post"));
 
   pool_.scheduler_.post_immediate_completion(p.p, false);
   p.v = p.p = 0;
@@ -97,7 +97,7 @@
   p.v = p.a.allocate(1);
   p.p = new (p.v) op(tmp, allocator);
 
-  ASIO_HANDLER_CREATION((p.p, "thread_pool", this, "post"));
+  ASIO_HANDLER_CREATION((pool_, *p.p, "thread_pool", this, "post"));
 
   pool_.scheduler_.post_immediate_completion(p.p, false);
   p.v = p.p = 0;
@@ -121,7 +121,7 @@
   p.v = p.a.allocate(1);
   p.p = new (p.v) op(tmp, allocator);
 
-  ASIO_HANDLER_CREATION((p.p, "thread_pool", this, "defer"));
+  ASIO_HANDLER_CREATION((pool_, *p.p, "thread_pool", this, "defer"));
 
   pool_.scheduler_.post_immediate_completion(p.p, true);
   p.v = p.p = 0;
diff --git a/asio/src/Makefile.msc b/asio/src/Makefile.msc
index 8f66356..1192e59 100644
--- a/asio/src/Makefile.msc
+++ b/asio/src/Makefile.msc
@@ -5,7 +5,7 @@
 COMMON_CXXFLAGS = -nologo -EHac -GR -I. -I../include
 
 !ifdef WARNINGS
-WARNINGS_CXXFLAGS = -W4 -wd4512 -wd4447
+WARNINGS_CXXFLAGS = -W4 -wd4512 -wd4447 -DASIO_ENABLE_HANDLER_TRACKING
 !endif
 
 !ifdef STATICRTL