PPAPI/NaCl: Fix leaky NaClIPCAdapter test.

The NaClIPCAdapter was not leaking, but the Channel deletion is posted as a task that the test was not running. This makes all the NaClIPCAdapter test cases do RunAllPending on shutdown to delete stuff. Unfortunately, one of the tests results in calling "Close()" on the channel in one of these tasks, and that fails for IPC::TestSink, because IPC::Channel::Close dereferences channel_impl_ unconditionally, and the channel_impl_ is NULL for TestSink. So this patch also makes Channel::Close() do nothing if channel_impl_ is NULL.

BUG=127954
TEST=


Review URL: https://chromiumcodereview.appspot.com/10383167

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@137471 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/ipc/ipc_channel_win.cc b/ipc/ipc_channel_win.cc
index bbb2eb9..981e4b68 100644
--- a/ipc/ipc_channel_win.cc
+++ b/ipc/ipc_channel_win.cc
@@ -462,7 +462,8 @@
 }
 
 void Channel::Close() {
-  channel_impl_->Close();
+  if (channel_impl_)
+    channel_impl_->Close();
 }
 
 void Channel::set_listener(Listener* listener) {