Ignore:
Timestamp:
Nov 11, 2014, 7:13:47 PM (11 years ago)
Author:
[email protected]
Message:

Remove IncrementalSweeper::create()
https://bugs.webkit.org/show_bug.cgi?id=138243

Reviewed by Filip Pizlo.

As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes
IncrementalSweeper::create(), then set constructor of IncrementalSweeper to public.
Now we begins to use std::make_unique<> to create IncrementalSweeper instance.

Source/JavaScriptCore:

  • heap/Heap.cpp:

(JSC::Heap::Heap):
(JSC::Heap::setIncrementalSweeper):

  • heap/Heap.h:
  • heap/IncrementalSweeper.cpp:

(JSC::IncrementalSweeper::create): Deleted.

  • heap/IncrementalSweeper.h:

Source/WebCore:

No new tests, no behavior changes.

  • bindings/js/JSDOMWindowBase.cpp:

(WebCore::JSDOMWindowBase::commonVM):

  • platform/ios/WebSafeIncrementalSweeperIOS.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/heap/Heap.cpp

    r175443 r176000  
    332332    , m_edenActivityCallback(m_fullActivityCallback)
    333333#endif
    334     , m_sweeper(IncrementalSweeper::create(this))
     334#if USE(CF)
     335    , m_sweeper(std::make_unique<IncrementalSweeper>(this, CFRunLoopGetCurrent()))
     336#else
     337    , m_sweeper(std::make_unique<IncrementalSweeper>(this->vm()))
     338#endif
    335339    , m_deferralDepth(0)
    336340{
     
    12831287}
    12841288
    1285 void Heap::setIncrementalSweeper(PassOwnPtr<IncrementalSweeper> sweeper)
    1286 {
    1287     m_sweeper = sweeper;
     1289void Heap::setIncrementalSweeper(std::unique_ptr<IncrementalSweeper> sweeper)
     1290{
     1291    m_sweeper = WTF::move(sweeper);
    12881292}
    12891293
Note: See TracChangeset for help on using the changeset viewer.