зеркало из https://github.com/mozilla/gecko-dev.git
Bug 937404 - Remove the unused NotableStringInfo copy constructor. r=jimb
--HG-- extra : rebase_source : 9af09cb34a2bda3b1cbee61c85617a25c5876106
This commit is contained in:
Родитель
9e246ccf6b
Коммит
cb3eece0fc
|
@ -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))
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче