зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1243198 - Use rvalue references for JS::ubi::ByFilename constructor; r=jimb
This change makes it a bit more clear that ByFilename is taking ownership of the given arguments.
This commit is contained in:
Родитель
f506ded619
Коммит
84b55a74af
|
@ -773,7 +773,7 @@ class ByFilename : public CountType {
|
|||
CountTypePtr noFilenameType;
|
||||
|
||||
public:
|
||||
ByFilename(CountTypePtr& thenType, CountTypePtr& noFilenameType)
|
||||
ByFilename(CountTypePtr&& thenType, CountTypePtr&& noFilenameType)
|
||||
: CountType(),
|
||||
thenType(Move(thenType)),
|
||||
noFilenameType(Move(noFilenameType))
|
||||
|
@ -1037,7 +1037,7 @@ ParseBreakdown(JSContext* cx, HandleValue breakdownValue)
|
|||
if (!noFilenameType)
|
||||
return nullptr;
|
||||
|
||||
return CountTypePtr(js_new<ByFilename>(thenType, noFilenameType));
|
||||
return CountTypePtr(js_new<ByFilename>(Move(thenType), Move(noFilenameType)));
|
||||
}
|
||||
|
||||
// We didn't recognize the breakdown type; complain.
|
||||
|
|
Загрузка…
Ссылка в новой задаче