Changeset 200857 in webkit


Ignore:
Timestamp:
May 13, 2016, 7:58:53 AM (9 years ago)
Author:
Chris Dumez
Message:

Have the WorkerGlobalScope API return more references
https://bugs.webkit.org/show_bug.cgi?id=157663

Reviewed by Alexey Proskuryakov.

Have the WorkerGlobalScope API return more references instead of
pointers.

  • workers/WorkerGlobalScope.cpp:

(WebCore::WorkerGlobalScope::location):
(WebCore::WorkerGlobalScope::navigator):

  • workers/WorkerGlobalScope.h:

(WebCore::WorkerGlobalScope::self):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r200837 r200857  
     12016-05-13  Chris Dumez  <cdumez@apple.com>
     2
     3        Have the WorkerGlobalScope API return more references
     4        https://bugs.webkit.org/show_bug.cgi?id=157663
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        Have the WorkerGlobalScope API return more references instead of
     9        pointers.
     10
     11        * workers/WorkerGlobalScope.cpp:
     12        (WebCore::WorkerGlobalScope::location):
     13        (WebCore::WorkerGlobalScope::navigator):
     14        * workers/WorkerGlobalScope.h:
     15        (WebCore::WorkerGlobalScope::self):
     16
    1172016-05-13  Youenn Fablet  <youenn.fablet@crf.canon.fr>
    218
  • trunk/Source/WebCore/workers/WorkerGlobalScope.cpp

    r200639 r200857  
    135135#endif // ENABLE(INDEXED_DATABASE)
    136136
    137 WorkerLocation* WorkerGlobalScope::location() const
     137WorkerLocation& WorkerGlobalScope::location() const
    138138{
    139139    if (!m_location)
    140140        m_location = WorkerLocation::create(m_url);
    141     return m_location.get();
     141    return *m_location;
    142142}
    143143
     
    159159}
    160160
    161 WorkerNavigator* WorkerGlobalScope::navigator() const
     161WorkerNavigator& WorkerGlobalScope::navigator() const
    162162{
    163163    if (!m_navigator)
    164164        m_navigator = WorkerNavigator::create(m_userAgent);
    165     return m_navigator.get();
     165    return *m_navigator;
    166166}
    167167
  • trunk/Source/WebCore/workers/WorkerGlobalScope.h

    r199853 r200857  
    9191
    9292    // WorkerGlobalScope
    93     WorkerGlobalScope* self() { return this; }
    94     WorkerLocation* location() const;
     93    WorkerGlobalScope& self() { return *this; }
     94    WorkerLocation& location() const;
    9595    void close();
    9696
    9797    // WorkerUtils
    9898    virtual void importScripts(const Vector<String>& urls, ExceptionCode&);
    99     WorkerNavigator* navigator() const;
     99    WorkerNavigator& navigator() const;
    100100
    101101    // Timers
Note: See TracChangeset for help on using the changeset viewer.