Bug 937404 - Remove the unused NotableStringInfo copy constructor. r=jimb

--HG--
extra : rebase_source : 9af09cb34a2bda3b1cbee61c85617a25c5876106
This commit is contained in:
Jim Blandy 2013-11-18 13:48:45 -08:00
Родитель 9e246ccf6b
Коммит cb3eece0fc
2 изменённых файлов: 5 добавлений и 18 удалений

Просмотреть файл

@ -272,7 +272,6 @@ struct NotableStringInfo : public StringInfo
{
NotableStringInfo();
NotableStringInfo(JSString *str, const StringInfo &info);
NotableStringInfo(const NotableStringInfo& info);
NotableStringInfo(NotableStringInfo &&info);
NotableStringInfo &operator=(NotableStringInfo &&info);
@ -286,10 +285,10 @@ struct NotableStringInfo : public StringInfo
return js::MemoryReportingSundriesThreshold();
}
// The amount of memory we requested for |buffer|; i.e.
// buffer = malloc(bufferSize).
size_t bufferSize;
char *buffer;
private:
NotableStringInfo(const NotableStringInfo& info) MOZ_DELETE;
};
// These measurements relate directly to the JSRuntime, and not to zones and

Просмотреть файл

@ -94,14 +94,13 @@ InefficientNonFlatteningStringHashPolicy::match(const JSString *const &k, const
namespace JS {
NotableStringInfo::NotableStringInfo()
: bufferSize(0),
buffer(0)
: buffer(0)
{}
NotableStringInfo::NotableStringInfo(JSString *str, const StringInfo &info)
: StringInfo(info)
{
bufferSize = Min(str->length() + 1, size_t(4096));
size_t bufferSize = Min(str->length() + 1, size_t(4096));
buffer = js_pod_malloc<char>(bufferSize);
if (!buffer) {
MOZ_CRASH("oom");
@ -123,17 +122,6 @@ NotableStringInfo::NotableStringInfo(JSString *str, const StringInfo &info)
PutEscapedString(buffer, bufferSize, chars, str->length(), /* quote */ 0);
}
NotableStringInfo::NotableStringInfo(const NotableStringInfo& info)
: StringInfo(info),
bufferSize(info.bufferSize)
{
buffer = js_pod_malloc<char>(bufferSize);
if (!buffer)
MOZ_CRASH("oom");
strcpy(buffer, info.buffer);
}
NotableStringInfo::NotableStringInfo(NotableStringInfo &&info)
: StringInfo(Move(info))
{