[WTF] Use Ref<> for the result type of non-failing factory functions
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jun 2018 09:59:04 +0000 (09:59 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 23 Jun 2018 09:59:04 +0000 (09:59 +0000)
commite0867abe830913e18b1dbf2ebd43279c43f88c5f
tree7b417acd93ae13de525910a6a9d32d0b31974feb
parent94e15a1241dcbafa5d4b8e6215649c5eae51e872
[WTF] Use Ref<> for the result type of non-failing factory functions
https://bugs.webkit.org/show_bug.cgi?id=186920

Reviewed by Darin Adler.

Source/JavaScriptCore:

* dfg/DFGWorklist.cpp:
(JSC::DFG::Worklist::ThreadBody::ThreadBody):
(JSC::DFG::Worklist::finishCreation):
* dfg/DFGWorklist.h:
* heap/Heap.cpp:
(JSC::Heap::Thread::Thread):
* heap/Heap.h:
* jit/JITWorklist.cpp:
(JSC::JITWorklist::Thread::Thread):
* jit/JITWorklist.h:
* runtime/VMTraps.cpp:
* runtime/VMTraps.h:
* wasm/WasmWorklist.cpp:
* wasm/WasmWorklist.h:

Source/WTF:

Use Ref<> instead of RefPtr<> if the `create` function do not return nullptr.

* wtf/AutomaticThread.cpp:
(WTF::AutomaticThreadCondition::create):
(WTF::AutomaticThread::AutomaticThread):
* wtf/AutomaticThread.h:
* wtf/ParallelHelperPool.cpp:
(WTF::ParallelHelperPool::Thread::Thread):
* wtf/ParallelHelperPool.h:
* wtf/WorkerPool.cpp:
(WTF::WorkerPool::WorkerPool):
* wtf/WorkerPool.h:
* wtf/win/WorkQueueWin.cpp:
(WTF::TimerContext::create):
(WTF::WorkQueue::dispatchAfter):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/dfg/DFGWorklist.cpp
Source/JavaScriptCore/dfg/DFGWorklist.h
Source/JavaScriptCore/heap/Heap.cpp
Source/JavaScriptCore/heap/Heap.h
Source/JavaScriptCore/jit/JITWorklist.cpp
Source/JavaScriptCore/jit/JITWorklist.h
Source/JavaScriptCore/runtime/VMTraps.cpp
Source/JavaScriptCore/runtime/VMTraps.h
Source/JavaScriptCore/wasm/WasmWorklist.cpp
Source/JavaScriptCore/wasm/WasmWorklist.h
Source/WTF/ChangeLog
Source/WTF/wtf/AutomaticThread.cpp
Source/WTF/wtf/AutomaticThread.h
Source/WTF/wtf/ParallelHelperPool.cpp
Source/WTF/wtf/ParallelHelperPool.h
Source/WTF/wtf/WorkerPool.cpp
Source/WTF/wtf/WorkerPool.h
Source/WTF/wtf/win/WorkQueueWin.cpp