Commit 35be5bd6 authored by kylechar's avatar kylechar Committed by Commit Bot

Fix assigning NULL to scoped_refptr

Update code where NULL or 0 is assigned to a scoped_refptr to reset it. Just
call reset() instead. If operator=(std::nullptr_t) is added these assignments
become ambiguous.

This CL was uploaded by git cl split.

R=mseaborn@chromium.org

Bug: 1024981
Change-Id: I2d6317c780f849bb47e943d48868fe24283120f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1918157
Auto-Submit: kylechar <kylechar@chromium.org>
Reviewed-by: default avatarMark Seaborn <mseaborn@chromium.org>
Commit-Queue: Mark Seaborn <mseaborn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#715489}
parent 1958f5b9
...@@ -652,7 +652,7 @@ void NaClProcessHost::SendMessageToRenderer( ...@@ -652,7 +652,7 @@ void NaClProcessHost::SendMessageToRenderer(
NaClHostMsg_LaunchNaCl::WriteReplyParams(reply_msg_, result, error_message); NaClHostMsg_LaunchNaCl::WriteReplyParams(reply_msg_, result, error_message);
nacl_host_message_filter_->Send(reply_msg_); nacl_host_message_filter_->Send(reply_msg_);
nacl_host_message_filter_ = NULL; nacl_host_message_filter_.reset();
reply_msg_ = NULL; reply_msg_ = NULL;
} }
......
...@@ -39,7 +39,7 @@ class NaClIPCAdapterTest : public testing::Test { ...@@ -39,7 +39,7 @@ class NaClIPCAdapterTest : public testing::Test {
} }
void TearDown() override { void TearDown() override {
sink_ = NULL; // This pointer is actually owned by the IPCAdapter. sink_ = NULL; // This pointer is actually owned by the IPCAdapter.
adapter_ = NULL; adapter_.reset();
// The adapter destructor has to post a task to destroy the Channel on the // The adapter destructor has to post a task to destroy the Channel on the
// IO thread. For the purposes of the test, we just need to make sure that // IO thread. For the purposes of the test, we just need to make sure that
// task gets run, or it will appear as a leak. // task gets run, or it will appear as a leak.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment