WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-139532-20141212002115.patch (text/plain), 20.72 KB, created by
Gyuyoung Kim
on 2014-12-11 07:20:33 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Gyuyoung Kim
Created:
2014-12-11 07:20:33 PST
Size:
20.72 KB
patch
obsolete
>Subversion Revision: 177145 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 8873e827f6c790681fe77a42cdbbd05fd9bc8fc3..caf0d750bf7b6c4bedea155968704db5efd504d6 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,46 @@ >+2014-12-11 Gyuyoung Kim <gyuyoung.kim@samsung.com> >+ >+ Final clean up OwnPtr in JSC - runtime, ftl, and tool directories >+ https://bugs.webkit.org/show_bug.cgi?id=139532 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Final remove OwnPtr, PassOwnPtr in runtime, ftl, and tools directories of JSC. >+ >+ * builtins/BuiltinExecutables.h: >+ * bytecode/CodeBlock.h: >+ * bytecode/UnlinkedCodeBlock.cpp: >+ (JSC::generateFunctionCodeBlock): >+ * ftl/FTLAbstractHeap.cpp: >+ (JSC::FTL::IndexedAbstractHeap::atSlow): >+ * ftl/FTLAbstractHeap.h: >+ * ftl/FTLCompile.cpp: >+ (JSC::FTL::mmAllocateDataSection): >+ * ftl/FTLJITFinalizer.h: >+ * jsc.cpp: >+ (jscmain): >+ * parser/Lexer.h: >+ * runtime/PropertyMapHashTable.h: >+ (JSC::PropertyTable::clearDeletedOffsets): >+ (JSC::PropertyTable::addDeletedOffset): >+ * runtime/PropertyTable.cpp: >+ (JSC::PropertyTable::PropertyTable): >+ * runtime/RegExpObject.cpp: >+ * runtime/SmallStrings.cpp: >+ * runtime/Structure.cpp: >+ * runtime/StructureIDTable.cpp: >+ (JSC::StructureIDTable::StructureIDTable): >+ (JSC::StructureIDTable::resize): >+ * runtime/StructureIDTable.h: >+ * runtime/StructureTransitionTable.h: >+ * runtime/VM.cpp: >+ (JSC::VM::VM): >+ (JSC::VM::~VM): >+ * runtime/VM.h: >+ * tools/CodeProfile.h: >+ (JSC::CodeProfile::CodeProfile): >+ (JSC::CodeProfile::addChild): >+ > 2014-12-10 Gyuyoung Kim <gyuyoung.kim@samsung.com> > > Use std::unique_ptr instead of OwnPtr in JSC - heap, jit, runtime, and parser directories >diff --git a/Source/JavaScriptCore/builtins/BuiltinExecutables.h b/Source/JavaScriptCore/builtins/BuiltinExecutables.h >index 1f4b08f45bd179e6a09571566f3538a6f71c0677..b053a0ee38719a8bbd042448f4587ee637454d14 100644 >--- a/Source/JavaScriptCore/builtins/BuiltinExecutables.h >+++ b/Source/JavaScriptCore/builtins/BuiltinExecutables.h >@@ -29,7 +29,6 @@ > #include "JSCBuiltins.h" > #include "SourceCode.h" > #include "Weak.h" >-#include <wtf/PassOwnPtr.h> > > namespace JSC { > >diff --git a/Source/JavaScriptCore/bytecode/CodeBlock.h b/Source/JavaScriptCore/bytecode/CodeBlock.h >index f9784836193766d1b81d634274150b161367d7d6..2767bd278782f401334c0a8f20398ed2673b0931 100644 >--- a/Source/JavaScriptCore/bytecode/CodeBlock.h >+++ b/Source/JavaScriptCore/bytecode/CodeBlock.h >@@ -70,7 +70,6 @@ > #include "Watchpoint.h" > #include <wtf/Bag.h> > #include <wtf/FastMalloc.h> >-#include <wtf/PassOwnPtr.h> > #include <wtf/RefCountedArray.h> > #include <wtf/RefPtr.h> > #include <wtf/SegmentedVector.h> >diff --git a/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp b/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp >index 1aee8eb3c983e4744c88a8669a8df3742aabaa15..740a244265cc852ba3a7bca2a1eb7f458978c44c 100644 >--- a/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp >+++ b/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp >@@ -62,7 +62,7 @@ static UnlinkedFunctionCodeBlock* generateFunctionCodeBlock(VM& vm, UnlinkedFunc > executable->recordParse(function->features(), function->hasCapturedVariables()); > > UnlinkedFunctionCodeBlock* result = UnlinkedFunctionCodeBlock::create(&vm, FunctionCode, ExecutableInfo(function->needsActivation(), function->usesEval(), function->isStrictMode(), kind == CodeForConstruct, functionKind == UnlinkedBuiltinFunction)); >- OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(vm, function.get(), result, debuggerMode, profilerMode))); >+ auto generator(std::make_unique<BytecodeGenerator>(vm, function.get(), result, debuggerMode, profilerMode)); > error = generator->generate(); > if (error.m_type != ParserError::ErrorNone) > return 0; >diff --git a/Source/JavaScriptCore/ftl/FTLAbstractHeap.cpp b/Source/JavaScriptCore/ftl/FTLAbstractHeap.cpp >index dfbbeb18c93da7e8da710213d4bc50b1edecc573..0037a7a54ccd42c0f566b7a9117040ba9d63472b 100644 >--- a/Source/JavaScriptCore/ftl/FTLAbstractHeap.cpp >+++ b/Source/JavaScriptCore/ftl/FTLAbstractHeap.cpp >@@ -102,7 +102,7 @@ const AbstractField& IndexedAbstractHeap::atSlow(ptrdiff_t index) > ASSERT(static_cast<size_t>(index) >= m_smallIndices.size()); > > if (UNLIKELY(!m_largeIndices)) >- m_largeIndices = adoptPtr(new MapType()); >+ m_largeIndices = std::make_unique<MapType>(); > > std::unique_ptr<AbstractField>& field = m_largeIndices->add(index, nullptr).iterator->value; > if (!field) { >diff --git a/Source/JavaScriptCore/ftl/FTLAbstractHeap.h b/Source/JavaScriptCore/ftl/FTLAbstractHeap.h >index 0731eedbd12cd177fb35f3d4d031fee58f47665e..eb163c1dc4486a5d98207a83938b278cc8872e8b 100644 >--- a/Source/JavaScriptCore/ftl/FTLAbstractHeap.h >+++ b/Source/JavaScriptCore/ftl/FTLAbstractHeap.h >@@ -34,7 +34,6 @@ > #include <wtf/FastMalloc.h> > #include <wtf/HashMap.h> > #include <wtf/Noncopyable.h> >-#include <wtf/OwnPtr.h> > #include <wtf/Vector.h> > #include <wtf/text/CString.h> > >@@ -183,7 +182,7 @@ private: > }; > typedef HashMap<ptrdiff_t, std::unique_ptr<AbstractField>, WTF::IntHash<ptrdiff_t>, WithoutZeroOrOneHashTraits> MapType; > >- OwnPtr<MapType> m_largeIndices; >+ std::unique_ptr<MapType> m_largeIndices; > Vector<CString, 16> m_largeIndexNames; > }; > >diff --git a/Source/JavaScriptCore/ftl/FTLCompile.cpp b/Source/JavaScriptCore/ftl/FTLCompile.cpp >index 8b28c9a0cf3c76bfbf5ceddb90da5da0c27d0e74..dc699433f5607d2c28da37ec8e6d902e458ad618 100644 >--- a/Source/JavaScriptCore/ftl/FTLCompile.cpp >+++ b/Source/JavaScriptCore/ftl/FTLCompile.cpp >@@ -322,8 +322,8 @@ static void fixFunctionBasedOnStackMaps( > RELEASE_ASSERT(state.finalizer->osrExit.size()); > RELEASE_ASSERT(didSeeUnwindInfo); > >- OwnPtr<LinkBuffer> linkBuffer = adoptPtr(new LinkBuffer( >- vm, exitThunkGenerator, codeBlock, JITCompilationMustSucceed)); >+ auto linkBuffer = std::make_unique<LinkBuffer>( >+ vm, exitThunkGenerator, codeBlock, JITCompilationMustSucceed); > > RELEASE_ASSERT(state.finalizer->osrExit.size() == state.jitCode->osrExit.size()); > >@@ -359,7 +359,7 @@ static void fixFunctionBasedOnStackMaps( > } > } > >- state.finalizer->exitThunksLinkBuffer = linkBuffer.release(); >+ state.finalizer->exitThunksLinkBuffer = WTF::move(linkBuffer); > } > > if (!state.getByIds.isEmpty() || !state.putByIds.isEmpty() || !state.checkIns.isEmpty()) { >@@ -483,8 +483,7 @@ static void fixFunctionBasedOnStackMaps( > exceptionTarget.link(&slowPathJIT); > MacroAssembler::Jump exceptionJump = slowPathJIT.jump(); > >- state.finalizer->sideCodeLinkBuffer = adoptPtr( >- new LinkBuffer(vm, slowPathJIT, codeBlock, JITCompilationMustSucceed)); >+ state.finalizer->sideCodeLinkBuffer = std::make_unique<LinkBuffer>(vm, slowPathJIT, codeBlock, JITCompilationMustSucceed); > state.finalizer->sideCodeLinkBuffer->link( > exceptionJump, state.finalizer->handleExceptionsLinkBuffer->entrypoint()); > >diff --git a/Source/JavaScriptCore/ftl/FTLJITFinalizer.h b/Source/JavaScriptCore/ftl/FTLJITFinalizer.h >index 4dffdaa79081a28e8fe49b4b33319a77b1afa376..c0df579a59407965b9cd482c6eff3b134ec35a26 100644 >--- a/Source/JavaScriptCore/ftl/FTLJITFinalizer.h >+++ b/Source/JavaScriptCore/ftl/FTLJITFinalizer.h >@@ -48,9 +48,9 @@ public: > bool finalize() override; > bool finalizeFunction() override; > >- OwnPtr<LinkBuffer> exitThunksLinkBuffer; >+ std::unique_ptr<LinkBuffer> exitThunksLinkBuffer; > std::unique_ptr<LinkBuffer> entrypointLinkBuffer; >- OwnPtr<LinkBuffer> sideCodeLinkBuffer; >+ std::unique_ptr<LinkBuffer> sideCodeLinkBuffer; > std::unique_ptr<LinkBuffer> handleExceptionsLinkBuffer; > Vector<SlowPathCall> slowPathCalls; // Calls inside the side code. > Vector<OSRExitCompilationInfo> osrExit; >diff --git a/Source/JavaScriptCore/jsc.cpp b/Source/JavaScriptCore/jsc.cpp >index 39cdcf4eb50698d38ca6257d7016af9fee53acfc..506bd0cb65ac493a4cccb112923b7ad94b12dfd9 100644 >--- a/Source/JavaScriptCore/jsc.cpp >+++ b/Source/JavaScriptCore/jsc.cpp >@@ -1451,7 +1451,7 @@ int jscmain(int argc, char** argv) > JSLockHolder locker(vm); > > if (options.m_profile && !vm->m_perBytecodeProfiler) >- vm->m_perBytecodeProfiler = adoptPtr(new Profiler::Database(*vm)); >+ vm->m_perBytecodeProfiler = std::make_unique<Profiler::Database>(*vm); > > GlobalObject* globalObject = GlobalObject::create(*vm, GlobalObject::createStructure(*vm, jsNull()), options.m_arguments); > bool success = runWithScripts(globalObject, options.m_scripts, options.m_dump); >diff --git a/Source/JavaScriptCore/parser/Lexer.h b/Source/JavaScriptCore/parser/Lexer.h >index 3fdd66175c8b04a70a3103b66f064ea17990c58a..81b4334d849d83e75fadafef54208416a8d16d66 100644 >--- a/Source/JavaScriptCore/parser/Lexer.h >+++ b/Source/JavaScriptCore/parser/Lexer.h >@@ -44,7 +44,9 @@ public: > { > return m_keywordTable.entry(ident); > } >- >+ >+ explicit Keywords(VM&); >+ > ~Keywords() > { > m_keywordTable.deleteTable(); >@@ -53,8 +55,6 @@ public: > private: > friend class VM; > >- explicit Keywords(VM&); >- > VM& m_vm; > const HashTable m_keywordTable; > }; >diff --git a/Source/JavaScriptCore/runtime/PropertyMapHashTable.h b/Source/JavaScriptCore/runtime/PropertyMapHashTable.h >index cabe554ac25f969cf63a69f7b0bef54410784cdd..d008aa6ef582625851b52c895a5ae7aa2ffe815e 100644 >--- a/Source/JavaScriptCore/runtime/PropertyMapHashTable.h >+++ b/Source/JavaScriptCore/runtime/PropertyMapHashTable.h >@@ -28,7 +28,6 @@ > #include <wtf/CryptographicallyRandomNumber.h> > #include <wtf/HashTable.h> > #include <wtf/MathExtras.h> >-#include <wtf/PassOwnPtr.h> > #include <wtf/Vector.h> > #include <wtf/text/AtomicStringImpl.h> > >@@ -243,7 +242,7 @@ private: > unsigned* m_index; > unsigned m_keyCount; > unsigned m_deletedCount; >- OwnPtr< Vector<PropertyOffset>> m_deletedOffsets; >+ std::unique_ptr< Vector<PropertyOffset>> m_deletedOffsets; > > static const unsigned MinimumTableSize = 16; > static const unsigned EmptyEntryIndex = 0; >@@ -421,7 +420,7 @@ inline unsigned PropertyTable::propertyStorageSize() const > > inline void PropertyTable::clearDeletedOffsets() > { >- m_deletedOffsets.clear(); >+ m_deletedOffsets = nullptr; > } > > inline bool PropertyTable::hasDeletedOffset() >@@ -439,7 +438,7 @@ inline PropertyOffset PropertyTable::getDeletedOffset() > inline void PropertyTable::addDeletedOffset(PropertyOffset offset) > { > if (!m_deletedOffsets) >- m_deletedOffsets = adoptPtr(new Vector<PropertyOffset>); >+ m_deletedOffsets = std::make_unique<Vector<PropertyOffset>>(); > m_deletedOffsets->append(offset); > } > >diff --git a/Source/JavaScriptCore/runtime/PropertyTable.cpp b/Source/JavaScriptCore/runtime/PropertyTable.cpp >index 570e5f95920fe67ac84cc38faaffc873eafc3de1..74474c6d915f3dad5ab9dcd237e98b0c2e9df0b2 100644 >--- a/Source/JavaScriptCore/runtime/PropertyTable.cpp >+++ b/Source/JavaScriptCore/runtime/PropertyTable.cpp >@@ -88,7 +88,7 @@ PropertyTable::PropertyTable(VM& vm, const PropertyTable& other) > // Copy the m_deletedOffsets vector. > Vector<PropertyOffset>* otherDeletedOffsets = other.m_deletedOffsets.get(); > if (otherDeletedOffsets) >- m_deletedOffsets = adoptPtr(new Vector<PropertyOffset>(*otherDeletedOffsets)); >+ m_deletedOffsets = std::make_unique<Vector<PropertyOffset>>(*otherDeletedOffsets); > } > > PropertyTable::PropertyTable(VM& vm, unsigned initialCapacity, const PropertyTable& other) >@@ -112,7 +112,7 @@ PropertyTable::PropertyTable(VM& vm, unsigned initialCapacity, const PropertyTab > // Copy the m_deletedOffsets vector. > Vector<PropertyOffset>* otherDeletedOffsets = other.m_deletedOffsets.get(); > if (otherDeletedOffsets) >- m_deletedOffsets = adoptPtr(new Vector<PropertyOffset>(*otherDeletedOffsets)); >+ m_deletedOffsets = std::make_unique<Vector<PropertyOffset>>(*otherDeletedOffsets); > } > > void PropertyTable::destroy(JSCell* cell) >diff --git a/Source/JavaScriptCore/runtime/RegExpObject.cpp b/Source/JavaScriptCore/runtime/RegExpObject.cpp >index 5f4e76e4c80fd2fc354f338f300c085f53e23ea6..4d9d0b27e4d0c8c91f9feb45a1d54e595d33d519 100644 >--- a/Source/JavaScriptCore/runtime/RegExpObject.cpp >+++ b/Source/JavaScriptCore/runtime/RegExpObject.cpp >@@ -34,7 +34,6 @@ > #include "RegExpConstructor.h" > #include "RegExpMatchesArray.h" > #include "RegExpPrototype.h" >-#include <wtf/PassOwnPtr.h> > #include <wtf/text/StringBuilder.h> > > namespace JSC { >diff --git a/Source/JavaScriptCore/runtime/SmallStrings.cpp b/Source/JavaScriptCore/runtime/SmallStrings.cpp >index 1df9f63c9211c3d4710f0bc413b3b01506577b01..43b2958cc82f65e8debf6f03cfb0bd46c06e02ba 100644 >--- a/Source/JavaScriptCore/runtime/SmallStrings.cpp >+++ b/Source/JavaScriptCore/runtime/SmallStrings.cpp >@@ -31,7 +31,6 @@ > #include "JSString.h" > #include "JSCInlines.h" > #include <wtf/Noncopyable.h> >-#include <wtf/PassOwnPtr.h> > #include <wtf/text/StringImpl.h> > > namespace JSC { >diff --git a/Source/JavaScriptCore/runtime/Structure.cpp b/Source/JavaScriptCore/runtime/Structure.cpp >index 86d0b6fbdaece3832cc362fb834098dbcee083a4..6f85a452110c16c1111d8db12704168593d64b83 100644 >--- a/Source/JavaScriptCore/runtime/Structure.cpp >+++ b/Source/JavaScriptCore/runtime/Structure.cpp >@@ -37,6 +37,7 @@ > #include "StructureChain.h" > #include "StructureRareDataInlines.h" > #include <wtf/CommaPrinter.h> >+#include <wtf/PassOwnPtr.h> > #include <wtf/ProcessID.h> > #include <wtf/RefCountedLeakCounter.h> > #include <wtf/RefPtr.h> >diff --git a/Source/JavaScriptCore/runtime/StructureIDTable.cpp b/Source/JavaScriptCore/runtime/StructureIDTable.cpp >index 57acd29fe4cf7d44e0668140192390723ba9ff55..12c64d93e9992b98b472af47a1529e2c38b42986 100644 >--- a/Source/JavaScriptCore/runtime/StructureIDTable.cpp >+++ b/Source/JavaScriptCore/runtime/StructureIDTable.cpp >@@ -29,13 +29,12 @@ > #include <limits.h> > #include <wtf/Atomics.h> > #include <wtf/DataLog.h> >-#include <wtf/PassOwnPtr.h> > > namespace JSC { > > StructureIDTable::StructureIDTable() > : m_firstFreeOffset(0) >- , m_table(adoptPtr(new StructureOrOffset[s_initialSize])) >+ , m_table(std::make_unique<StructureOrOffset[]>(s_initialSize)) > , m_size(0) > , m_capacity(s_initialSize) > { >@@ -47,7 +46,7 @@ StructureIDTable::StructureIDTable() > void StructureIDTable::resize(size_t newCapacity) > { > // Create the new table. >- OwnPtr<StructureOrOffset> newTable = adoptPtr(new StructureOrOffset[newCapacity]); >+ auto newTable = std::make_unique<StructureOrOffset[]>(newCapacity); > > // Copy the contents of the old table to the new table. > memcpy(newTable.get(), table(), m_capacity * sizeof(StructureOrOffset)); >diff --git a/Source/JavaScriptCore/runtime/StructureIDTable.h b/Source/JavaScriptCore/runtime/StructureIDTable.h >index cfac3ad854cc18a5605911ab4faeeb865487c93b..ab19dc51f31d78df3ce0f9736a79fd12ef0cb1fb 100644 >--- a/Source/JavaScriptCore/runtime/StructureIDTable.h >+++ b/Source/JavaScriptCore/runtime/StructureIDTable.h >@@ -27,7 +27,6 @@ > #define StructureIDTable_h > > #include "UnusedPointer.h" >-#include <wtf/OwnPtr.h> > #include <wtf/Vector.h> > > namespace JSC { >@@ -67,10 +66,10 @@ private: > > static const size_t s_initialSize = 256; > >- Vector<OwnPtr<StructureOrOffset>> m_oldTables; >+ Vector<std::unique_ptr<StructureOrOffset>> m_oldTables; > > uint32_t m_firstFreeOffset; >- OwnPtr<StructureOrOffset> m_table; >+ std::unique_ptr<StructureOrOffset[]> m_table; > > size_t m_size; > size_t m_capacity; >diff --git a/Source/JavaScriptCore/runtime/StructureTransitionTable.h b/Source/JavaScriptCore/runtime/StructureTransitionTable.h >index 130efda1ef51ab6553248a58ff797f3373bdb05a..23c6ca30dfa38e402b99568a6301f537e82058fe 100644 >--- a/Source/JavaScriptCore/runtime/StructureTransitionTable.h >+++ b/Source/JavaScriptCore/runtime/StructureTransitionTable.h >@@ -29,7 +29,6 @@ > #include "IndexingType.h" > #include "WeakGCMap.h" > #include <wtf/HashFunctions.h> >-#include <wtf/OwnPtr.h> > #include <wtf/text/AtomicStringImpl.h> > > namespace JSC { >diff --git a/Source/JavaScriptCore/runtime/VM.cpp b/Source/JavaScriptCore/runtime/VM.cpp >index ba0e0b4a75ec4fd777003871297cf5f7ee318460..7a883446078185a19e86b6ec9055e9e5734448f2 100644 >--- a/Source/JavaScriptCore/runtime/VM.cpp >+++ b/Source/JavaScriptCore/runtime/VM.cpp >@@ -153,7 +153,7 @@ VM::VM(VMType vmType, HeapType heapType) > , m_atomicStringTable(vmType == Default ? wtfThreadData().atomicStringTable() : new AtomicStringTable) > , propertyNames(nullptr) > , emptyList(new MarkedArgumentBuffer) >- , keywords(adoptPtr(new Keywords(*this))) >+ , keywords(std::make_unique<Keywords>(*this)) > , interpreter(0) > , jsArrayClassInfo(JSArray::info()) > , jsFinalObjectClassInfo(JSFinalObject::info()) >@@ -241,7 +241,7 @@ VM::VM(VMType vmType, HeapType heapType) > wtfThreadData().setCurrentAtomicStringTable(existingEntryAtomicStringTable); > > #if ENABLE(JIT) >- jitStubs = adoptPtr(new JITThunks()); >+ jitStubs = std::make_unique<JITThunks>(); > arityCheckFailReturnThunks = std::make_unique<ArityCheckFailReturnThunks>(); > #endif > arityCheckData = std::make_unique<CommonSlowPaths::ArityCheckData>(); >@@ -261,7 +261,7 @@ VM::VM(VMType vmType, HeapType heapType) > LLInt::Data::performAssertions(*this); > > if (Options::enableProfiler()) { >- m_perBytecodeProfiler = adoptPtr(new Profiler::Database(*this)); >+ m_perBytecodeProfiler = std::make_unique<Profiler::Database>(*this); > > StringPrintStream pathOut; > const char* profilerPath = getenv("JSC_PROFILER_PATH"); >@@ -273,7 +273,7 @@ VM::VM(VMType vmType, HeapType heapType) > > #if ENABLE(DFG_JIT) > if (canUseJIT()) >- dfgState = adoptPtr(new DFG::LongLivedState()); >+ dfgState = std::make_unique<DFG::LongLivedState>(); > #endif > > // Initialize this last, as a free way of asserting that VM initialization itself >@@ -303,8 +303,8 @@ VM::~VM() > #endif // ENABLE(DFG_JIT) > > // Clear this first to ensure that nobody tries to remove themselves from it. >- m_perBytecodeProfiler.clear(); >- >+ m_perBytecodeProfiler = nullptr; >+ > ASSERT(m_apiLock->currentThreadIsHoldingLock()); > m_apiLock->willDestroyVM(this); > heap.lastChanceToFinalize(); >diff --git a/Source/JavaScriptCore/runtime/VM.h b/Source/JavaScriptCore/runtime/VM.h >index c118b9b8780c01b638bda7ab9bce75a1094a0aad..f8842821761f6ad8abea098d28aa76b0942b6e0f 100644 >--- a/Source/JavaScriptCore/runtime/VM.h >+++ b/Source/JavaScriptCore/runtime/VM.h >@@ -235,7 +235,7 @@ public: > Heap heap; > > #if ENABLE(DFG_JIT) >- OwnPtr<DFG::LongLivedState> dfgState; >+ std::unique_ptr<DFG::LongLivedState> dfgState; > #endif // ENABLE(DFG_JIT) > > std::unique_ptr<CallEdgeLog> callEdgeLog; >@@ -328,10 +328,10 @@ public: > > typedef HashMap<RefPtr<SourceProvider>, RefPtr<SourceProviderCache>> SourceProviderCacheMap; > SourceProviderCacheMap sourceProviderCacheMap; >- OwnPtr<Keywords> keywords; >+ std::unique_ptr<Keywords> keywords; > Interpreter* interpreter; > #if ENABLE(JIT) >- OwnPtr<JITThunks> jitStubs; >+ std::unique_ptr<JITThunks> jitStubs; > MacroAssemblerCodeRef getCTIStub(ThunkGenerator generator) > { > return jitStubs->ctiStub(this, generator); >@@ -458,7 +458,7 @@ public: > String cachedDateString; > double cachedDateStringValue; > >- OwnPtr<Profiler::Database> m_perBytecodeProfiler; >+ std::unique_ptr<Profiler::Database> m_perBytecodeProfiler; > RefPtr<TypedArrayController> m_typedArrayController; > RegExpCache* m_regExpCache; > BumpPointerAllocator m_regExpAllocator; >diff --git a/Source/JavaScriptCore/tools/CodeProfile.h b/Source/JavaScriptCore/tools/CodeProfile.h >index 6b0a3068984d817d644f4436e9fc7e01707cc8b8..68469724abc3c84c272f43595a8d356db93f7192 100644 >--- a/Source/JavaScriptCore/tools/CodeProfile.h >+++ b/Source/JavaScriptCore/tools/CodeProfile.h >@@ -41,7 +41,7 @@ public: > , m_parent(parent) > { > if (parent) >- parent->addChild(this); >+ parent->addChild(std::make_unique<CodeProfile>(source, parent)); > } > > void sample(void* pc, void** framePointer); >@@ -52,9 +52,9 @@ public: > return m_parent; > } > >- void addChild(CodeProfile* child) >+ void addChild(std::unique_ptr<CodeProfile> child) > { >- m_children.append(adoptPtr(child)); >+ m_children.append(WTF::move(child)); > } > > private: >@@ -82,7 +82,7 @@ private: > CString m_file; > unsigned m_lineNo; > CodeProfile* m_parent; >- Vector< OwnPtr<CodeProfile>> m_children; >+ Vector<std::unique_ptr<CodeProfile>> m_children; > TieredMMapArray<CodeRecord> m_samples; > > static const char* s_codeTypeNames[NumberOfCodeTypes];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 139532
:
243108
|
243122
|
243178
|
243180
|
243181