Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(141)

Side by Side Diff: third_party/WebKit/Source/wtf/BitVector.cpp

Issue 1422773008: Fixing remaining VC++ 2015 64-bit build breaks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing unneeded include Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/TraceEvent.h ('k') | third_party/libxml/libxml.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2011 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 else 72 else
73 memset(outOfLineBits()->bits(), 0, byteCount(size())); 73 memset(outOfLineBits()->bits(), 0, byteCount(size()));
74 } 74 }
75 75
76 BitVector::OutOfLineBits* BitVector::OutOfLineBits::create(size_t numBits) 76 BitVector::OutOfLineBits* BitVector::OutOfLineBits::create(size_t numBits)
77 { 77 {
78 // Because of the way BitVector stores the pointer, memory tools 78 // Because of the way BitVector stores the pointer, memory tools
79 // will erroneously report a leak here. 79 // will erroneously report a leak here.
80 WTF_INTERNAL_LEAK_SANITIZER_DISABLED_SCOPE; 80 WTF_INTERNAL_LEAK_SANITIZER_DISABLED_SCOPE;
81 numBits = (numBits + bitsInPointer() - 1) & ~(bitsInPointer() - 1); 81 numBits = (numBits + bitsInPointer() - 1) & ~(bitsInPointer() - 1);
82 numBits = (numBits + bitsInPointer() - 1) & ~(bitsInPointer() - static_cast< size_t>(1));
82 size_t size = sizeof(OutOfLineBits) + sizeof(uintptr_t) * (numBits / bitsInP ointer()); 83 size_t size = sizeof(OutOfLineBits) + sizeof(uintptr_t) * (numBits / bitsInP ointer());
83 void* allocation = Partitions::bufferMalloc(size, WTF_HEAP_PROFILER_TYPE_NAM E(OutOfLineBits)); 84 void* allocation = Partitions::bufferMalloc(size, WTF_HEAP_PROFILER_TYPE_NAM E(OutOfLineBits));
84 OutOfLineBits* result = new (NotNull, allocation) OutOfLineBits(numBits); 85 OutOfLineBits* result = new (NotNull, allocation) OutOfLineBits(numBits);
85 return result; 86 return result;
86 } 87 }
87 88
88 void BitVector::OutOfLineBits::destroy(OutOfLineBits* outOfLineBits) 89 void BitVector::OutOfLineBits::destroy(OutOfLineBits* outOfLineBits)
89 { 90 {
90 Partitions::bufferFree(outOfLineBits); 91 Partitions::bufferFree(outOfLineBits);
91 } 92 }
(...skipping 24 matching lines...) Expand all
116 { 117 {
117 for (size_t i = 0; i < size(); ++i) { 118 for (size_t i = 0; i < size(); ++i) {
118 if (get(i)) 119 if (get(i))
119 out.printf("1"); 120 out.printf("1");
120 else 121 else
121 out.printf("-"); 122 out.printf("-");
122 } 123 }
123 } 124 }
124 125
125 } // namespace WTF 126 } // namespace WTF
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/TraceEvent.h ('k') | third_party/libxml/libxml.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698