namespace JSC {
struct SourceProviderCacheItemCreationParameters {
- unsigned functionStart;
+ unsigned functionNameStart;
unsigned closeBraceLine;
unsigned closeBraceOffset;
unsigned closeBraceLineStartOffset;
bool needsFullActivation;
bool usesEval;
bool strictMode;
- Vector<RefPtr<StringImpl> > usedVariables;
- Vector<RefPtr<StringImpl> > writtenVariables;
+ Vector<RefPtr<StringImpl>> usedVariables;
+ Vector<RefPtr<StringImpl>> writtenVariables;
};
#if COMPILER(MSVC)
class SourceProviderCacheItem {
WTF_MAKE_FAST_ALLOCATED;
public:
- static PassOwnPtr<SourceProviderCacheItem> create(const SourceProviderCacheItemCreationParameters&);
+ static std::unique_ptr<SourceProviderCacheItem> create(const SourceProviderCacheItemCreationParameters&);
~SourceProviderCacheItem();
JSToken closeBraceToken() const
return token;
}
- unsigned functionStart : 31;
+ unsigned functionNameStart : 31;
bool needsFullActivation : 1;
unsigned closeBraceLine : 31;
m_variables[i]->deref();
}
-inline PassOwnPtr<SourceProviderCacheItem> SourceProviderCacheItem::create(const SourceProviderCacheItemCreationParameters& parameters)
+inline std::unique_ptr<SourceProviderCacheItem> SourceProviderCacheItem::create(const SourceProviderCacheItemCreationParameters& parameters)
{
size_t variableCount = parameters.writtenVariables.size() + parameters.usedVariables.size();
size_t objectSize = sizeof(SourceProviderCacheItem) + sizeof(StringImpl*) * variableCount;
void* slot = fastMalloc(objectSize);
- return adoptPtr(new (slot) SourceProviderCacheItem(parameters));
+ return std::unique_ptr<SourceProviderCacheItem>(new (slot) SourceProviderCacheItem(parameters));
}
inline SourceProviderCacheItem::SourceProviderCacheItem(const SourceProviderCacheItemCreationParameters& parameters)
- : functionStart(parameters.functionStart)
+ : functionNameStart(parameters.functionNameStart)
, needsFullActivation(parameters.needsFullActivation)
, closeBraceLine(parameters.closeBraceLine)
, usesEval(parameters.usesEval)