Changeset 42277 in webkit


Ignore:
Timestamp:
Apr 7, 2009 12:47:08 PM (15 years ago)
Author:
beidson@apple.com
Message:

2009-04-07 Brady Eidson <beidson@apple.com>

Reviewed by Darin Adler

While working on <rdar://problem/5968249>, noticed some glaring problems with LocalStorage.

  • page/DOMWindow.cpp: (WebCore::DOMWindow::localStorage): Return the cached m_localStorage object if it exists to avoid creating multiple representations for the same underlying StorageArea.
  • page/DOMWindow.h: (WebCore::DOMWindow::optionalLocalStorage): Return m_localStorage, not m_sessionStorage.
Location:
trunk/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r42276 r42277  
     12009-04-07  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by Darin Adler
     4
     5        While working on <rdar://problem/5968249>, noticed some glaring problems with LocalStorage.
     6
     7        * page/DOMWindow.cpp:
     8        (WebCore::DOMWindow::localStorage): Return the cached m_localStorage object if it exists to
     9          avoid creating multiple representations for the same underlying StorageArea.
     10        * page/DOMWindow.h:
     11        (WebCore::DOMWindow::optionalLocalStorage): Return m_localStorage, not m_sessionStorage.
     12
    1132009-04-07  Darin Adler  <darin@apple.com>
    214
  • trunk/WebCore/page/DOMWindow.cpp

    r41227 r42277  
    336336Storage* DOMWindow::localStorage() const
    337337{
     338    if (m_localStorage)
     339        return m_localStorage.get();
     340   
    338341    Document* document = this->document();
    339342    if (!document)
  • trunk/WebCore/page/DOMWindow.h

    r41218 r42277  
    271271#if ENABLE(DOM_STORAGE)
    272272        Storage* optionalSessionStorage() const { return m_sessionStorage.get(); }
    273         Storage* optionalLocalStorage() const { return m_sessionStorage.get(); }
     273        Storage* optionalLocalStorage() const { return m_localStorage.get(); }
    274274#endif
    275275#if ENABLE(OFFLINE_WEB_APPLICATIONS)
Note: See TracChangeset for help on using the changeset viewer.