summaryrefslogtreecommitdiffstats
path: root/webkit/blob
diff options
context:
space:
mode:
authorjeanluc@chromium.org <jeanluc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-30 22:57:35 +0000
committerjeanluc@chromium.org <jeanluc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-30 22:57:35 +0000
commit107446884c2e92b17f494ded21b315a052e51928 (patch)
tree35ff2b61b9a8a4ae0c07bbbb30d1fcb05d364ff7 /webkit/blob
parentc90d849636fd9db7f79f2f2b4611f2bcff0c5700 (diff)
downloadchromium_src-107446884c2e92b17f494ded21b315a052e51928.zip
chromium_src-107446884c2e92b17f494ded21b315a052e51928.tar.gz
chromium_src-107446884c2e92b17f494ded21b315a052e51928.tar.bz2
In Visual Studio 2010, pass a nullptr rather than NULL when building a std::pair. See http://connect.microsoft.com/VisualStudio/feedback/details/520043/error-converting-from-null-to-a-pointer-type-in-std-pair
BUG=71138 TEST=Successful compile Review URL: http://codereview.chromium.org/6366023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73120 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/blob')
-rw-r--r--webkit/blob/deletable_file_reference.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/webkit/blob/deletable_file_reference.cc b/webkit/blob/deletable_file_reference.cc
index 7a5cfac..3f2daed 100644
--- a/webkit/blob/deletable_file_reference.cc
+++ b/webkit/blob/deletable_file_reference.cc
@@ -34,8 +34,17 @@ scoped_refptr<DeletableFileReference> DeletableFileReference::GetOrCreate(
const FilePath& path, base::MessageLoopProxy* file_thread) {
DCHECK(file_thread);
typedef std::pair<DeleteableFileMap::iterator, bool> InsertResult;
+
+ // Visual Studio 2010 has problems converting NULL to the null pointer for
+ // std::pair. See http://connect.microsoft.com/VisualStudio/feedback/details/520043/error-converting-from-null-to-a-pointer-type-in-std-pair
+ // It will work if we pass nullptr.
+#if defined(_MSC_VER) && _MSC_VER >= 1600
+ webkit_blob::DeletableFileReference* null_reference = nullptr;
+#else
+ webkit_blob::DeletableFileReference* null_reference = NULL;
+#endif
InsertResult result = g_deletable_file_map.Get().insert(
- DeleteableFileMap::value_type(path, NULL));
+ DeleteableFileMap::value_type(path, null_reference));
if (result.second == false)
return scoped_refptr<DeletableFileReference>(result.first->second);