summaryrefslogtreecommitdiffstats
path: root/webkit/blob
diff options
context:
space:
mode:
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);