Changeset 104380 in webkit


Ignore:
Timestamp:
Jan 7, 2012 12:46:38 AM (12 years ago)
Author:
abarth@webkit.org
Message:

Disconnecting DOMWindow properties is fragile and overly complicated
https://bugs.webkit.org/show_bug.cgi?id=75699

Reviewed by Alexey Proskuryakov.

Previously, we had to carefully check every object tree hanging off of
DOMWindow to make sure that every property correctly disconnected
itself and all its subobjects from the Frame when the DOMWindow
disconnected from the Frame.

This patch introduces DOMWindowProperty, which is a base class that
handles this work automagically, ensuring that we won't have any
dangling Frame pointers and removing a bunch of boilerplate code.

  • CMakeLists.txt:
  • GNUmakefile.list.am:
  • Target.pri:
  • WebCore.gypi:
  • WebCore.vcproj/WebCore.vcproj:
  • css/StyleMedia.cpp:

(WebCore::StyleMedia::StyleMedia):

  • css/StyleMedia.h:

(WebCore::StyleMedia::create):

  • loader/appcache/DOMApplicationCache.cpp:

(WebCore::DOMApplicationCache::DOMApplicationCache):
(WebCore::DOMApplicationCache::disconnectFrame):

  • loader/appcache/DOMApplicationCache.h:
  • page/BarInfo.cpp:

(WebCore::BarInfo::BarInfo):

  • page/BarInfo.h:
  • page/Console.cpp:

(WebCore::Console::Console):
(WebCore::Console::memory):

  • page/Console.h:
  • page/DOMSelection.cpp:

(WebCore::DOMSelection::DOMSelection):

  • page/DOMSelection.h:
  • page/DOMWindow.cpp:

(WebCore::DOMWindow::registerProperty):
(WebCore::DOMWindow::unregisterProperty):
(WebCore::DOMWindow::clear):

  • page/DOMWindow.h:
  • page/Geolocation.cpp:

(WebCore::Geolocation::Geolocation):
(WebCore::Geolocation::disconnectFrame):

  • page/Geolocation.h:
  • page/History.cpp:

(WebCore::History::History):

  • page/History.h:
  • page/Location.cpp:

(WebCore::Location::Location):

  • page/Location.h:
  • page/Navigator.cpp:

(WebCore::Navigator::Navigator):
(WebCore::Navigator::~Navigator):

  • page/Navigator.h:
  • page/Performance.cpp:

(WebCore::Performance::Performance):
(WebCore::Performance::memory):

  • page/Performance.h:
  • page/PerformanceNavigation.cpp:

(WebCore::PerformanceNavigation::PerformanceNavigation):

  • page/PerformanceNavigation.h:
  • page/PerformanceTiming.cpp:

(WebCore::PerformanceTiming::PerformanceTiming):

  • page/PerformanceTiming.h:
  • page/Screen.cpp:

(WebCore::Screen::Screen):

  • page/Screen.h:
  • plugins/DOMMimeTypeArray.cpp:

(WebCore::DOMMimeTypeArray::DOMMimeTypeArray):

  • plugins/DOMMimeTypeArray.h:
  • plugins/DOMPluginArray.cpp:

(WebCore::DOMPluginArray::DOMPluginArray):

  • plugins/DOMPluginArray.h:
  • storage/Storage.cpp:

(WebCore::Storage::Storage):

  • storage/Storage.h:
Location:
trunk/Source/WebCore
Files:
41 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/CMakeLists.txt

    r104344 r104380  
    990990    page/DOMTimer.cpp
    991991    page/DOMWindow.cpp
     992    page/DOMWindowProperty.cpp
    992993    page/DragController.cpp
    993994    page/EventHandler.cpp
  • trunk/Source/WebCore/ChangeLog

    r104378 r104380  
     12012-01-07  Adam Barth  <abarth@webkit.org>
     2
     3        Disconnecting DOMWindow properties is fragile and overly complicated
     4        https://bugs.webkit.org/show_bug.cgi?id=75699
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        Previously, we had to carefully check every object tree hanging off of
     9        DOMWindow to make sure that every property correctly disconnected
     10        itself and all its subobjects from the Frame when the DOMWindow
     11        disconnected from the Frame.
     12
     13        This patch introduces DOMWindowProperty, which is a base class that
     14        handles this work automagically, ensuring that we won't have any
     15        dangling Frame pointers and removing a bunch of boilerplate code.
     16
     17        * CMakeLists.txt:
     18        * GNUmakefile.list.am:
     19        * Target.pri:
     20        * WebCore.gypi:
     21        * WebCore.vcproj/WebCore.vcproj:
     22        * css/StyleMedia.cpp:
     23        (WebCore::StyleMedia::StyleMedia):
     24        * css/StyleMedia.h:
     25        (WebCore::StyleMedia::create):
     26        * loader/appcache/DOMApplicationCache.cpp:
     27        (WebCore::DOMApplicationCache::DOMApplicationCache):
     28        (WebCore::DOMApplicationCache::disconnectFrame):
     29        * loader/appcache/DOMApplicationCache.h:
     30        * page/BarInfo.cpp:
     31        (WebCore::BarInfo::BarInfo):
     32        * page/BarInfo.h:
     33        * page/Console.cpp:
     34        (WebCore::Console::Console):
     35        (WebCore::Console::memory):
     36        * page/Console.h:
     37        * page/DOMSelection.cpp:
     38        (WebCore::DOMSelection::DOMSelection):
     39        * page/DOMSelection.h:
     40        * page/DOMWindow.cpp:
     41        (WebCore::DOMWindow::registerProperty):
     42        (WebCore::DOMWindow::unregisterProperty):
     43        (WebCore::DOMWindow::clear):
     44        * page/DOMWindow.h:
     45        * page/Geolocation.cpp:
     46        (WebCore::Geolocation::Geolocation):
     47        (WebCore::Geolocation::disconnectFrame):
     48        * page/Geolocation.h:
     49        * page/History.cpp:
     50        (WebCore::History::History):
     51        * page/History.h:
     52        * page/Location.cpp:
     53        (WebCore::Location::Location):
     54        * page/Location.h:
     55        * page/Navigator.cpp:
     56        (WebCore::Navigator::Navigator):
     57        (WebCore::Navigator::~Navigator):
     58        * page/Navigator.h:
     59        * page/Performance.cpp:
     60        (WebCore::Performance::Performance):
     61        (WebCore::Performance::memory):
     62        * page/Performance.h:
     63        * page/PerformanceNavigation.cpp:
     64        (WebCore::PerformanceNavigation::PerformanceNavigation):
     65        * page/PerformanceNavigation.h:
     66        * page/PerformanceTiming.cpp:
     67        (WebCore::PerformanceTiming::PerformanceTiming):
     68        * page/PerformanceTiming.h:
     69        * page/Screen.cpp:
     70        (WebCore::Screen::Screen):
     71        * page/Screen.h:
     72        * plugins/DOMMimeTypeArray.cpp:
     73        (WebCore::DOMMimeTypeArray::DOMMimeTypeArray):
     74        * plugins/DOMMimeTypeArray.h:
     75        * plugins/DOMPluginArray.cpp:
     76        (WebCore::DOMPluginArray::DOMPluginArray):
     77        * plugins/DOMPluginArray.h:
     78        * storage/Storage.cpp:
     79        (WebCore::Storage::Storage):
     80        * storage/Storage.h:
     81
    1822012-01-06  Mark Rowe  <mrowe@apple.com>
    283
  • trunk/Source/WebCore/GNUmakefile.list.am

    r104344 r104380  
    26472647        Source/WebCore/page/DOMWindow.cpp \
    26482648        Source/WebCore/page/DOMWindow.h \
     2649        Source/WebCore/page/DOMWindowProperty.cpp \
     2650        Source/WebCore/page/DOMWindowProperty.h \
    26492651        Source/WebCore/page/DragActions.h \
    26502652        Source/WebCore/page/DragClient.h \
  • trunk/Source/WebCore/Target.pri

    r104344 r104380  
    968968    page/DOMTimer.cpp \
    969969    page/DOMWindow.cpp \
     970    page/DOMWindowProperty.cpp \
    970971    page/DragController.cpp \
    971972    page/EventHandler.cpp \
  • trunk/Source/WebCore/WebCore.gypi

    r104368 r104380  
    29922992            'page/DOMTimer.h',
    29932993            'page/DOMWindow.cpp',
     2994            'page/DOMWindowProperty.cpp',
     2995            'page/DOMWindowProperty.h',
    29942996            'page/DragController.cpp',
    29952997            'page/EventHandler.cpp',
  • trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj

    r104344 r104380  
    2518725187                        </File>
    2518825188                        <File
     25189                                RelativePath="..\page\DOMWindowProperty.cpp"
     25190                                >
     25191                        </File>
     25192                        <File
     25193                                RelativePath="..\page\DOMWindowProperty.h"
     25194                                >
     25195                        </File>
     25196                        <File
    2518925197                                RelativePath="..\page\DragActions.h"
    2519025198                                >
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r104344 r104380  
    33703370                97C471DB12F925BD0086354B /* ContentSecurityPolicy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97C471D912F925BC0086354B /* ContentSecurityPolicy.cpp */; };
    33713371                97C471DC12F925BD0086354B /* ContentSecurityPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 97C471DA12F925BD0086354B /* ContentSecurityPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; };
     3372                97D2AD0314B823A60093DF32 /* DOMWindowProperty.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97D2AD0114B823A60093DF32 /* DOMWindowProperty.cpp */; };
     3373                97D2AD0414B823A60093DF32 /* DOMWindowProperty.h in Headers */ = {isa = PBXBuildFile; fileRef = 97D2AD0214B823A60093DF32 /* DOMWindowProperty.h */; settings = {ATTRIBUTES = (Private, ); }; };
    33723374                97DCE20110807C750057D394 /* HistoryController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97DCE1FF10807C750057D394 /* HistoryController.cpp */; };
    33733375                97DCE20210807C750057D394 /* HistoryController.h in Headers */ = {isa = PBXBuildFile; fileRef = 97DCE20010807C750057D394 /* HistoryController.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    1063010632                97C471D912F925BC0086354B /* ContentSecurityPolicy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ContentSecurityPolicy.cpp; sourceTree = "<group>"; };
    1063110633                97C471DA12F925BD0086354B /* ContentSecurityPolicy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContentSecurityPolicy.h; sourceTree = "<group>"; };
     10634                97D2AD0114B823A60093DF32 /* DOMWindowProperty.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DOMWindowProperty.cpp; sourceTree = "<group>"; };
     10635                97D2AD0214B823A60093DF32 /* DOMWindowProperty.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DOMWindowProperty.h; sourceTree = "<group>"; };
    1063210636                97DCE1FF10807C750057D394 /* HistoryController.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HistoryController.cpp; sourceTree = "<group>"; };
    1063310637                97DCE20010807C750057D394 /* HistoryController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HistoryController.h; sourceTree = "<group>"; };
     
    1565415658                                1403B99509EB13AF00797C7F /* DOMWindow.h */,
    1565515659                                1403B90C09EB124500797C7F /* DOMWindow.idl */,
     15660                                97D2AD0114B823A60093DF32 /* DOMWindowProperty.cpp */,
     15661                                97D2AD0214B823A60093DF32 /* DOMWindowProperty.h */,
    1565615662                                A718760D0B2A120100A16ECE /* DragActions.h */,
    1565715663                                A7CA59620B27C1F200FA021D /* DragClient.h */,
     
    2488424890                                FD537353137B651800008DCE /* ZeroPole.h in Headers */,
    2488524891                                974A862314B7ADBB003FDC76 /* FrameDestructionObserver.h in Headers */,
     24892                                97D2AD0414B823A60093DF32 /* DOMWindowProperty.h in Headers */,
    2488624893                        );
    2488724894                        runOnlyForDeploymentPostprocessing = 0;
     
    2778827795                                FD537352137B651800008DCE /* ZeroPole.cpp in Sources */,
    2778927796                                974A862214B7ADBB003FDC76 /* FrameDestructionObserver.cpp in Sources */,
     27797                                97D2AD0314B823A60093DF32 /* DOMWindowProperty.cpp in Sources */,
    2779027798                        );
    2779127799                        runOnlyForDeploymentPostprocessing = 0;
  • trunk/Source/WebCore/css/StyleMedia.cpp

    r97854 r104380  
    3737
    3838StyleMedia::StyleMedia(Frame* frame)
    39     : m_frame(frame)
     39    : DOMWindowProperty(frame)
    4040{
    4141}
  • trunk/Source/WebCore/css/StyleMedia.h

    r98316 r104380  
    2828#define StyleMedia_h
    2929
     30#include "DOMWindowProperty.h"
    3031#include "PlatformString.h"
    3132#include <wtf/RefCounted.h>
     
    3536class Frame;
    3637
    37 class StyleMedia : public RefCounted<StyleMedia> {
     38class StyleMedia : public RefCounted<StyleMedia>, public DOMWindowProperty {
    3839public:
    39     static PassRefPtr<StyleMedia> create(Frame* frame)
    40     {
    41         return adoptRef(new StyleMedia(frame));
    42     }
    43 
    44     Frame* frame() { return m_frame; }
    45     void disconnectFrame() { m_frame = 0; }
     40    static PassRefPtr<StyleMedia> create(Frame* frame) { return adoptRef(new StyleMedia(frame));}
    4641
    4742    String type() const;
    48 
    4943    bool matchMedium(const String&) const;
    5044
    5145private:
    52     StyleMedia(Frame*);
    53 
    54     Frame* m_frame;
     46    explicit StyleMedia(Frame*);
    5547};
    5648
  • trunk/Source/WebCore/loader/appcache/DOMApplicationCache.cpp

    r98388 r104380  
    4141
    4242DOMApplicationCache::DOMApplicationCache(Frame* frame)
    43     : m_frame(frame)
     43    : DOMWindowProperty(frame)
    4444{
    4545    ApplicationCacheHost* cacheHost = applicationCacheHost();
     
    5353    if (cacheHost)
    5454        cacheHost->setDOMApplicationCache(0);
    55     m_frame = 0;
     55    DOMWindowProperty::disconnectFrame();
    5656}
    5757
  • trunk/Source/WebCore/loader/appcache/DOMApplicationCache.h

    r98388 r104380  
    2828
    2929#include "ApplicationCacheHost.h"
     30#include "DOMWindowProperty.h"
    3031#include "EventNames.h"
    3132#include "EventTarget.h"
     
    4243class KURL;
    4344
    44 class DOMApplicationCache : public RefCounted<DOMApplicationCache>, public EventTarget {
     45class DOMApplicationCache : public RefCounted<DOMApplicationCache>, public EventTarget, public DOMWindowProperty {
    4546public:
    4647    static PassRefPtr<DOMApplicationCache> create(Frame* frame) { return adoptRef(new DOMApplicationCache(frame)); }
    4748    ~DOMApplicationCache() { ASSERT(!m_frame); }
    4849
    49     Frame* frame() const { return m_frame; }
    50     void disconnectFrame();
     50    virtual void disconnectFrame() OVERRIDE;
    5151
    5252    unsigned short status() const;
     
    7676
    7777private:
    78     DOMApplicationCache(Frame*);
     78    explicit DOMApplicationCache(Frame*);
    7979
    8080    virtual void refEventTarget() { ref(); }
     
    8585    ApplicationCacheHost* applicationCacheHost() const;
    8686
    87     Frame* m_frame;
    8887    EventTargetData m_eventTargetData;
    8988};
  • trunk/Source/WebCore/page/BarInfo.cpp

    r52772 r104380  
    3737
    3838BarInfo::BarInfo(Frame* frame, Type type)
    39     : m_frame(frame)
     39    : DOMWindowProperty(frame)
    4040    , m_type(type)
    4141{
    42 }
    43 
    44 Frame* BarInfo::frame() const
    45 {
    46     return m_frame;
    47 }
    48 
    49 void BarInfo::disconnectFrame()
    50 {
    51     m_frame = 0;
    5242}
    5343
  • trunk/Source/WebCore/page/BarInfo.h

    r42100 r104380  
    3030#define BarInfo_h
    3131
     32#include "DOMWindowProperty.h"
    3233#include <wtf/PassRefPtr.h>
    3334#include <wtf/RefCounted.h>
     
    3738    class Frame;
    3839
    39     class BarInfo : public RefCounted<BarInfo> {
     40    class BarInfo : public RefCounted<BarInfo>, public DOMWindowProperty {
    4041    public:
    4142        enum Type { Locationbar, Menubar, Personalbar, Scrollbars, Statusbar, Toolbar };
     
    4344        static PassRefPtr<BarInfo> create(Frame* frame, Type type) { return adoptRef(new BarInfo(frame, type)); }
    4445
    45         Frame* frame() const;
    46         void disconnectFrame();
    47 
    4846        Type type() const;
    49 
    5047        bool visible() const;
    5148
    5249    private:
    5350        BarInfo(Frame*, Type);
    54         Frame* m_frame;
    5551        Type m_type;
    5652    };
  • trunk/Source/WebCore/page/Console.cpp

    r102233 r104380  
    5757
    5858Console::Console(Frame* frame)
    59     : m_frame(frame)
     59    : DOMWindowProperty(frame)
    6060{
    6161}
     
    6363Console::~Console()
    6464{
    65 }
    66 
    67 Frame* Console::frame() const
    68 {
    69     return m_frame;
    70 }
    71 
    72 void Console::disconnectFrame()
    73 {
    74     if (m_memory)
    75         m_memory = 0;
    76     m_frame = 0;
    7765}
    7866
     
    349337}
    350338
    351 MemoryInfo* Console::memory() const
    352 {
    353     m_memory = MemoryInfo::create(m_frame);
    354     return m_memory.get();
     339PassRefPtr<MemoryInfo> Console::memory() const
     340{
     341    // FIXME: Because we create a new object here each time,
     342    // console.memory !== console.memory, which seems wrong.
     343    return MemoryInfo::create(m_frame);
    355344}
    356345
  • trunk/Source/WebCore/page/Console.h

    r102233 r104380  
    3131
    3232#include "ConsoleTypes.h"
     33#include "DOMWindowProperty.h"
    3334#include "ScriptProfile.h"
    3435#include "ScriptState.h"
     
    4950#endif
    5051
    51 class Console : public RefCounted<Console> {
     52class Console : public RefCounted<Console>, public DOMWindowProperty {
    5253public:
    5354    static PassRefPtr<Console> create(Frame* frame) { return adoptRef(new Console(frame)); }
    5455    virtual ~Console();
    55 
    56     Frame* frame() const;
    57     void disconnectFrame();
    5856
    5957    void addMessage(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceURL);
     
    8684    static void setShouldPrintExceptions(bool);
    8785
    88     MemoryInfo* memory() const;
     86    PassRefPtr<MemoryInfo> memory() const;
    8987
    9088private:
     
    9290    void addMessage(MessageType, MessageLevel, PassRefPtr<ScriptArguments>, PassRefPtr<ScriptCallStack>, bool acceptNoArguments = false);
    9391
    94     Console(Frame*);
     92    explicit Console(Frame*);
    9593
    96     Frame* m_frame;
    9794#if ENABLE(JAVASCRIPT_DEBUGGER)
    9895    ProfilesArray m_profiles;
    9996#endif
    100     mutable RefPtr<MemoryInfo> m_memory;
    10197};
    10298
  • trunk/Source/WebCore/page/DOMSelection.cpp

    r104317 r104380  
    5555
    5656DOMSelection::DOMSelection(Frame* frame)
    57     : m_frame(frame)
    58 {
    59 }
    60 
    61 Frame* DOMSelection::frame() const
    62 {
    63     return m_frame;
    64 }
    65 
    66 void DOMSelection::disconnectFrame()
    67 {
    68     m_frame = 0;
     57    : DOMWindowProperty(frame)
     58{
    6959}
    7060
  • trunk/Source/WebCore/page/DOMSelection.h

    r66590 r104380  
    3131#define DOMSelection_h
    3232
     33#include "DOMWindowProperty.h"
    3334#include <wtf/Forward.h>
    3435#include <wtf/PassRefPtr.h>
     
    4445    typedef int ExceptionCode;
    4546
    46     class DOMSelection : public RefCounted<DOMSelection> {
     47    class DOMSelection : public RefCounted<DOMSelection>, public DOMWindowProperty {
    4748    public:
    4849        static PassRefPtr<DOMSelection> create(Frame* frame) { return adoptRef(new DOMSelection(frame)); }
    49 
    50         Frame* frame() const;
    51         void disconnectFrame();
    5250
    5351        // Safari Selection Object API
     
    9189
    9290    private:
    93         DOMSelection(Frame*);
     91        explicit DOMSelection(Frame*);
    9492
    9593        // Convenience method for accessors, does not NULL check m_frame.
     
    9795
    9896        bool isValidForPosition(Node*) const;
    99         Frame* m_frame;
    10097    };
    10198
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r104372 r104380  
    477477}
    478478
     479void DOMWindow::registerProperty(DOMWindowProperty* property)
     480{
     481    m_properties.add(property);
     482}
     483
     484void DOMWindow::unregisterProperty(DOMWindowProperty* property)
     485{
     486    m_properties.remove(property);
     487}
     488
    479489void DOMWindow::clear()
    480490{
    481     if (m_screen)
    482         m_screen->disconnectFrame();
     491    HashSet<DOMWindowProperty*>::iterator stop = m_properties.end();
     492    for (HashSet<DOMWindowProperty*>::iterator it = m_properties.begin(); it != stop; ++it)
     493        (*it)->disconnectFrame();
     494    m_properties.clear();
     495
    483496    m_screen = 0;
    484 
    485     if (m_selection)
    486         m_selection->disconnectFrame();
    487497    m_selection = 0;
    488 
    489     if (m_history)
    490         m_history->disconnectFrame();
    491498    m_history = 0;
    492 
    493499    m_crypto = 0;
    494 
    495     if (m_locationbar)
    496         m_locationbar->disconnectFrame();
    497500    m_locationbar = 0;
    498 
    499     if (m_menubar)
    500         m_menubar->disconnectFrame();
    501501    m_menubar = 0;
    502 
    503     if (m_personalbar)
    504         m_personalbar->disconnectFrame();
    505502    m_personalbar = 0;
    506 
    507     if (m_scrollbars)
    508         m_scrollbars->disconnectFrame();
    509503    m_scrollbars = 0;
    510 
    511     if (m_statusbar)
    512         m_statusbar->disconnectFrame();
    513504    m_statusbar = 0;
    514 
    515     if (m_toolbar)
    516         m_toolbar->disconnectFrame();
    517505    m_toolbar = 0;
    518 
    519     if (m_console)
    520         m_console->disconnectFrame();
    521506    m_console = 0;
    522 
    523     if (m_navigator)
    524         m_navigator->disconnectFrame();
    525507    m_navigator = 0;
    526 
    527508#if ENABLE(WEB_TIMING)
    528     if (m_performance)
    529         m_performance->disconnectFrame();
    530509    m_performance = 0;
    531510#endif
    532 
    533     if (m_location)
    534         m_location->disconnectFrame();
    535511    m_location = 0;
    536 
    537     if (m_media)
    538         m_media->disconnectFrame();
    539512    m_media = 0;
    540 
    541     if (m_sessionStorage)
    542         m_sessionStorage->disconnectFrame();
    543513    m_sessionStorage = 0;
    544 
    545     if (m_localStorage)
    546         m_localStorage->disconnectFrame();
    547514    m_localStorage = 0;
    548 
    549     if (m_applicationCache)
    550         m_applicationCache->disconnectFrame();
    551515    m_applicationCache = 0;
    552 
    553516#if ENABLE(NOTIFICATIONS)
     517    // FIXME: Notifications shouldn't have different disconnection logic than
     518    // the rest of the DOMWindowProperties.
    554519    resetNotifications();
    555520#endif
    556 
    557521#if ENABLE(INDEXED_DATABASE)
    558522    m_idbFactory = 0;
    559523#endif
    560 
    561524#if ENABLE(BLOB)
    562525    m_domURL = 0;
    563526#endif
    564 
    565527#if ENABLE(QUOTA)
    566528    m_storageInfo = 0;
  • trunk/Source/WebCore/page/DOMWindow.h

    r104372 r104380  
    4242    class DOMSelection;
    4343    class DOMURL;
     44    class DOMWindowProperty;
    4445    class Database;
    4546    class DatabaseCallback;
     
    9394
    9495        virtual void frameDestroyed() OVERRIDE;
     96
     97        void registerProperty(DOMWindowProperty*);
     98        void unregisterProperty(DOMWindowProperty*);
    9599
    96100        void clear();
     
    438442
    439443        bool m_shouldPrintWhenFinishedLoading;
     444
     445        HashSet<DOMWindowProperty*> m_properties;
     446
    440447        mutable RefPtr<Screen> m_screen;
    441448        mutable RefPtr<DOMSelection> m_selection;
  • trunk/Source/WebCore/page/DOMWindowProperty.cpp

    r104379 r104380  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
    3  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
     2 * Copyright (C) 2011 Google, Inc. All Rights Reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    1211 *    documentation and/or other materials provided with the distribution.
    1312 *
    14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY
    1514 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1615 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1817 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1918 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2524 */
    2625
    27 #ifndef StyleMedia_h
    28 #define StyleMedia_h
     26#include "config.h"
     27#include "DOMWindowProperty.h"
    2928
    30 #include "PlatformString.h"
    31 #include <wtf/RefCounted.h>
     29#include "DOMWindow.h"
     30#include "Frame.h"
    3231
    3332namespace WebCore {
    3433
    35 class Frame;
     34DOMWindowProperty::DOMWindowProperty(Frame* frame)
     35    : m_frame(frame)
     36{
     37    if (m_frame)
     38        m_frame->domWindow()->registerProperty(this);
     39}
    3640
    37 class StyleMedia : public RefCounted<StyleMedia> {
    38 public:
    39     static PassRefPtr<StyleMedia> create(Frame* frame)
    40     {
    41         return adoptRef(new StyleMedia(frame));
    42     }
     41DOMWindowProperty::~DOMWindowProperty()
     42{
     43    if (m_frame)
     44        m_frame->domWindow()->unregisterProperty(this);
     45}
    4346
    44     Frame* frame() { return m_frame; }
    45     void disconnectFrame() { m_frame = 0; }
     47void DOMWindowProperty::disconnectFrame()
     48{
     49    m_frame = 0;
     50}
    4651
    47     String type() const;
    48 
    49     bool matchMedium(const String&) const;
    50 
    51 private:
    52     StyleMedia(Frame*);
    53 
    54     Frame* m_frame;
    55 };
    56 
    57 } // namespace
    58 
    59 #endif // StyleMedia_h
     52}
  • trunk/Source/WebCore/page/DOMWindowProperty.h

    r104379 r104380  
    11/*
    2  * Copyright (C) 2009 Apple Inc. All rights reserved.
    3  * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
     2 * Copyright (C) 2011 Google, Inc. All Rights Reserved.
    43 *
    54 * Redistribution and use in source and binary forms, with or without
     
    1211 *    documentation and/or other materials provided with the distribution.
    1312 *
    14  * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
     13 * THIS SOFTWARE IS PROVIDED BY GOOGLE INC. ``AS IS'' AND ANY
    1514 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    1615 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    17  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
     16 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
    1817 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    1918 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
     
    2524 */
    2625
    27 #ifndef StyleMedia_h
    28 #define StyleMedia_h
    29 
    30 #include "PlatformString.h"
    31 #include <wtf/RefCounted.h>
     26#ifndef DOMWindowProperty_h
     27#define DOMWindowProperty_h
    3228
    3329namespace WebCore {
     
    3531class Frame;
    3632
    37 class StyleMedia : public RefCounted<StyleMedia> {
     33class DOMWindowProperty {
    3834public:
    39     static PassRefPtr<StyleMedia> create(Frame* frame)
    40     {
    41         return adoptRef(new StyleMedia(frame));
    42     }
     35    explicit DOMWindowProperty(Frame*);
     36    virtual void disconnectFrame();
    4337
    44     Frame* frame() { return m_frame; }
    45     void disconnectFrame() { m_frame = 0; }
     38    Frame* frame() const { return m_frame; }
    4639
    47     String type() const;
    48 
    49     bool matchMedium(const String&) const;
    50 
    51 private:
    52     StyleMedia(Frame*);
     40protected:
     41    virtual ~DOMWindowProperty();
    5342
    5443    Frame* m_frame;
    5544};
    5645
    57 } // namespace
     46}
    5847
    59 #endif // StyleMedia_h
     48#endif
  • trunk/Source/WebCore/page/Geolocation.cpp

    r97594 r104380  
    226226
    227227Geolocation::Geolocation(Frame* frame)
    228     : m_frame(frame)
     228    : DOMWindowProperty(frame)
    229229#if !ENABLE(CLIENT_BASED_GEOLOCATION)
    230230    , m_service(GeolocationService::create(this))
     
    274274    if (m_frame && m_frame->document())
    275275        m_frame->document()->setUsingGeolocation(false);
    276     m_frame = 0;
     276    DOMWindowProperty::disconnectFrame();
    277277}
    278278
  • trunk/Source/WebCore/page/Geolocation.h

    r97594 r104380  
    2828#define Geolocation_h
    2929
     30#include "DOMWindowProperty.h"
    3031#include "Geoposition.h"
    3132#include "PositionCallback.h"
     
    4849class Page;
    4950
    50 class Geolocation : public RefCounted<Geolocation>
     51class Geolocation : public RefCounted<Geolocation>, public DOMWindowProperty
    5152#if !ENABLE(CLIENT_BASED_GEOLOCATION) && ENABLE(GEOLOCATION)
    5253    , public GeolocationServiceClient
     
    5556public:
    5657    static PassRefPtr<Geolocation> create(Frame* frame) { return adoptRef(new Geolocation(frame)); }
    57 
    5858    ~Geolocation();
    5959
     60    virtual void disconnectFrame() OVERRIDE;
    6061    void reset();
    61     void disconnectFrame();
    62    
     62
    6363    void getCurrentPosition(PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
    6464    int watchPosition(PassRefPtr<PositionCallback>, PassRefPtr<PositionErrorCallback>, PassRefPtr<PositionOptions>);
     
    6666
    6767    void setIsAllowed(bool);
    68     Frame* frame() const { return m_frame; }
    6968
    7069#if ENABLE(CLIENT_BASED_GEOLOCATION)
     
    8079    bool isAllowed() const { return m_allowGeolocation == Yes; }
    8180    bool isDenied() const { return m_allowGeolocation == No; }
    82    
    83     Geolocation(Frame*);
     81
     82    explicit Geolocation(Frame*);
    8483
    8584    Page* page() const;
     
    173172    GeoNotifierSet m_oneShots;
    174173    Watchers m_watchers;
    175     Frame* m_frame;
    176174#if !ENABLE(CLIENT_BASED_GEOLOCATION)
    177175    OwnPtr<GeolocationService> m_service;
  • trunk/Source/WebCore/page/History.cpp

    r92068 r104380  
    4242
    4343History::History(Frame* frame)
    44     : m_frame(frame)
     44    : DOMWindowProperty(frame)
    4545{
    46 }
    47 
    48 Frame* History::frame() const
    49 {
    50     return m_frame;
    51 }
    52 
    53 void History::disconnectFrame()
    54 {
    55     m_frame = 0;
    5646}
    5747
  • trunk/Source/WebCore/page/History.h

    r74853 r104380  
    2727#define History_h
    2828
     29#include "DOMWindowProperty.h"
    2930#include "KURL.h"
    3031#include <wtf/Forward.h>
     
    3940typedef int ExceptionCode;
    4041
    41 class History : public RefCounted<History> {
     42class History : public RefCounted<History>, public DOMWindowProperty {
    4243public:
    4344    static PassRefPtr<History> create(Frame* frame) { return adoptRef(new History(frame)); }
    44    
    45     Frame* frame() const;
    46     void disconnectFrame();
    4745
    4846    unsigned length() const;
     
    6260
    6361private:
    64     History(Frame*);
     62    explicit History(Frame*);
    6563
    6664    KURL urlForState(const String& url);
    67 
    68     Frame* m_frame;
    6965};
    7066
  • trunk/Source/WebCore/page/Location.cpp

    r100164 r104380  
    4141
    4242Location::Location(Frame* frame)
    43     : m_frame(frame)
    44 {
    45 }
    46 
    47 void Location::disconnectFrame()
    48 {
    49     m_frame = 0;
     43    : DOMWindowProperty(frame)
     44{
    5045}
    5146
  • trunk/Source/WebCore/page/Location.h

    r100164 r104380  
    3030#define Location_h
    3131
     32#include "DOMWindowProperty.h"
    3233#include <wtf/PassRefPtr.h>
    3334#include <wtf/RefCounted.h>
     
    4243typedef int ExceptionCode;
    4344
    44 class Location : public RefCounted<Location> {
     45class Location : public RefCounted<Location>, public DOMWindowProperty {
    4546public:
    4647    static PassRefPtr<Location> create(Frame* frame) { return adoptRef(new Location(frame)); }
    47 
    48     Frame* frame() const { return m_frame; }
    49     void disconnectFrame();
    5048
    5149    void setHref(const String&, DOMWindow* activeWindow, DOMWindow* firstWindow);
     
    7573
    7674private:
    77     Location(Frame*);
     75    explicit Location(Frame*);
    7876
    7977    const KURL& url() const;
    80 
    81     Frame* m_frame;
    8278};
    8379
  • trunk/Source/WebCore/page/Navigator.cpp

    r104146 r104380  
    6060
    6161Navigator::Navigator(Frame* frame)
    62     : m_frame(frame)
     62    : DOMWindowProperty(frame)
    6363{
    6464}
     
    6666Navigator::~Navigator()
    6767{
    68     disconnectFrame();
    6968}
    7069
     
    7372    if (m_geolocation)
    7473        m_geolocation->reset();
    75 }
    76 
    77 void Navigator::disconnectFrame()
    78 {
    79     if (m_plugins) {
    80         m_plugins->disconnectFrame();
    81         m_plugins = 0;
    82     }
    83     if (m_mimeTypes) {
    84         m_mimeTypes->disconnectFrame();
    85         m_mimeTypes = 0;
    86     }
    87     if (m_geolocation) {
    88         m_geolocation->disconnectFrame();
    89         m_geolocation = 0;
    90     }
    91     m_frame = 0;
    9274}
    9375
  • trunk/Source/WebCore/page/Navigator.h

    r104146 r104380  
    2121#define Navigator_h
    2222
     23#include "DOMWindowProperty.h"
    2324#include "NavigatorBase.h"
    2425#include <wtf/Forward.h>
     
    4142typedef int ExceptionCode;
    4243
    43 class Navigator : public NavigatorBase, public RefCounted<Navigator> {
     44class Navigator : public NavigatorBase, public RefCounted<Navigator>, public DOMWindowProperty {
    4445public:
    4546    static PassRefPtr<Navigator> create(Frame* frame) { return adoptRef(new Navigator(frame)); }
     
    4748
    4849    void resetGeolocation();
    49     void disconnectFrame();
    50     Frame* frame() const { return m_frame; }
    5150
    5251    String appVersion() const;
     
    8281
    8382private:
    84     Navigator(Frame*);
    85     Frame* m_frame;
     83    explicit Navigator(Frame*);
     84
    8685    mutable RefPtr<DOMPluginArray> m_plugins;
    8786    mutable RefPtr<DOMMimeTypeArray> m_mimeTypes;
  • trunk/Source/WebCore/page/Performance.cpp

    r95901 r104380  
    4343
    4444Performance::Performance(Frame* frame)
    45     : m_frame(frame)
     45    : DOMWindowProperty(frame)
    4646{
    4747}
    4848
    49 Frame* Performance::frame() const
     49PassRefPtr<MemoryInfo> Performance::memory() const
    5050{
    51     return m_frame;
    52 }
    53 
    54 void Performance::disconnectFrame()
    55 {
    56     if (m_memory)
    57         m_memory = 0;
    58     if (m_navigation) {
    59         m_navigation->disconnectFrame();
    60         m_navigation = 0;
    61     }
    62     if (m_timing) {
    63         m_timing->disconnectFrame();
    64         m_timing = 0;
    65     }
    66     m_frame = 0;
    67 }
    68 
    69 MemoryInfo* Performance::memory() const
    70 {
    71     m_memory = MemoryInfo::create(m_frame);
    72     return m_memory.get();
     51    return MemoryInfo::create(m_frame);
    7352}
    7453
  • trunk/Source/WebCore/page/Performance.h

    r95901 r104380  
    3434#if ENABLE(WEB_TIMING)
    3535
     36#include "DOMWindowProperty.h"
    3637#include "MemoryInfo.h"
    3738#include "PerformanceNavigation.h"
     
    4344namespace WebCore {
    4445
    45 class Performance : public RefCounted<Performance> {
     46class Performance : public RefCounted<Performance>, public DOMWindowProperty {
    4647public:
    4748    static PassRefPtr<Performance> create(Frame* frame) { return adoptRef(new Performance(frame)); }
    4849
    49     Frame* frame() const;
    50     void disconnectFrame();
    51 
    52     MemoryInfo* memory() const;
     50    PassRefPtr<MemoryInfo> memory() const;
    5351    PerformanceNavigation* navigation() const;
    5452    PerformanceTiming* timing() const;
    5553
    5654private:
    57     Performance(Frame*);
     55    explicit Performance(Frame*);
    5856
    59     mutable RefPtr<MemoryInfo> m_memory;
    6057    mutable RefPtr<PerformanceNavigation> m_navigation;
    6158    mutable RefPtr<PerformanceTiming> m_timing;
    62     Frame* m_frame;
    6359};
    6460
    6561}
    6662
    67 #endif // !ENABLE(WEB_TIMING)
    68 #endif // !defined(Performance_h)
     63#endif // ENABLE(WEB_TIMING)
     64
     65#endif // Performance_h
  • trunk/Source/WebCore/page/PerformanceNavigation.cpp

    r102961 r104380  
    4141
    4242PerformanceNavigation::PerformanceNavigation(Frame* frame)
    43     : m_frame(frame)
     43    : DOMWindowProperty(frame)
    4444{
    45 }
    46 
    47 Frame* PerformanceNavigation::frame() const
    48 {
    49     return m_frame;
    50 }
    51 
    52 void PerformanceNavigation::disconnectFrame()
    53 {
    54     m_frame = 0;
    5545}
    5646
  • trunk/Source/WebCore/page/PerformanceNavigation.h

    r95901 r104380  
    3434#if ENABLE(WEB_TIMING)
    3535
     36#include "DOMWindowProperty.h"
    3637#include <wtf/PassRefPtr.h>
    3738#include <wtf/RefCounted.h>
     
    4142class Frame;
    4243
    43 class PerformanceNavigation : public RefCounted<PerformanceNavigation> {
     44class PerformanceNavigation : public RefCounted<PerformanceNavigation>, public DOMWindowProperty {
    4445public:
    4546    static PassRefPtr<PerformanceNavigation> create(Frame* frame) { return adoptRef(new PerformanceNavigation(frame)); }
    46 
    47     Frame* frame() const;
    48     void disconnectFrame();
    4947
    5048    enum PerformanceNavigationType {
     
    5957
    6058private:
    61     PerformanceNavigation(Frame*);
    62 
    63     Frame* m_frame;
     59    explicit PerformanceNavigation(Frame*);
    6460};
    6561
  • trunk/Source/WebCore/page/PerformanceTiming.cpp

    r102961 r104380  
    5252
    5353PerformanceTiming::PerformanceTiming(Frame* frame)
    54     : m_frame(frame)
    55 {
    56 }
    57 
    58 Frame* PerformanceTiming::frame() const
    59 {
    60     return m_frame;
    61 }
    62 
    63 void PerformanceTiming::disconnectFrame()
    64 {
    65     m_frame = 0;
     54    : DOMWindowProperty(frame)
     55{
    6656}
    6757
  • trunk/Source/WebCore/page/PerformanceTiming.h

    r102961 r104380  
    3434#if ENABLE(WEB_TIMING)
    3535
     36#include "DOMWindowProperty.h"
    3637#include <wtf/PassRefPtr.h>
    3738#include <wtf/RefCounted.h>
     
    4546class ResourceLoadTiming;
    4647
    47 class PerformanceTiming : public RefCounted<PerformanceTiming> {
     48class PerformanceTiming : public RefCounted<PerformanceTiming>, public DOMWindowProperty {
    4849public:
    4950    static PassRefPtr<PerformanceTiming> create(Frame* frame) { return adoptRef(new PerformanceTiming(frame)); }
    50 
    51     Frame* frame() const;
    52     void disconnectFrame();
    5351
    5452    unsigned long long navigationStart() const;
     
    7573
    7674private:
    77     PerformanceTiming(Frame*);
     75    explicit PerformanceTiming(Frame*);
    7876
    7977    const DocumentTiming* documentTiming() const;
     
    8381    unsigned long long resourceLoadTimeRelativeToAbsolute(int) const;
    8482    unsigned long long monotonicTimeToIntegerMilliseconds(double) const;
    85 
    86     Frame* m_frame;
    8783};
    8884
  • trunk/Source/WebCore/page/Screen.cpp

    r102301 r104380  
    4040
    4141Screen::Screen(Frame* frame)
    42     : m_frame(frame)
     42    : DOMWindowProperty(frame)
    4343{
    44 }
    45 
    46 Frame* Screen::frame() const
    47 {
    48     return m_frame;
    49 }
    50 
    51 void Screen::disconnectFrame()
    52 {
    53     m_frame = 0;
    5444}
    5545
  • trunk/Source/WebCore/page/Screen.h

    r102301 r104380  
    3131#define Screen_h
    3232
     33#include "DOMWindowProperty.h"
    3334#include <wtf/PassRefPtr.h>
    3435#include <wtf/RefCounted.h>
     
    3839    class Frame;
    3940
    40     class Screen : public RefCounted<Screen> {
     41    class Screen : public RefCounted<Screen>, public DOMWindowProperty {
    4142    public:
    4243        static PassRefPtr<Screen> create(Frame *frame) { return adoptRef(new Screen(frame)); }
    43 
    44         Frame* frame() const;
    45         void disconnectFrame();
    4644
    4745        unsigned horizontalDPI() const;
     
    5755
    5856    private:
    59         Screen(Frame*);
    60        
    61         Frame* m_frame;
     57        explicit Screen(Frame*);
    6258    };
    6359
  • trunk/Source/WebCore/plugins/DOMMimeTypeArray.cpp

    r95901 r104380  
    3030
    3131DOMMimeTypeArray::DOMMimeTypeArray(Frame* frame)
    32     : m_frame(frame)
     32    : DOMWindowProperty(frame)
    3333{
    3434}
  • trunk/Source/WebCore/plugins/DOMMimeTypeArray.h

    r95901 r104380  
    2323
    2424#include "DOMMimeType.h"
     25#include "DOMWindowProperty.h"
    2526#include <wtf/Forward.h>
    2627#include <wtf/PassRefPtr.h>
     
    3334class PluginData;
    3435
    35 class DOMMimeTypeArray : public RefCounted<DOMMimeTypeArray> {
     36class DOMMimeTypeArray : public RefCounted<DOMMimeTypeArray>, public DOMWindowProperty {
    3637public:
    3738    static PassRefPtr<DOMMimeTypeArray> create(Frame* frame) { return adoptRef(new DOMMimeTypeArray(frame)); }
    3839    ~DOMMimeTypeArray();
    39 
    40     Frame* frame() { return m_frame; }
    41     void disconnectFrame() { m_frame = 0; }
    4240
    4341    unsigned length() const;
     
    4745
    4846private:
    49     DOMMimeTypeArray(Frame*);
     47    explicit DOMMimeTypeArray(Frame*);
    5048    PluginData* getPluginData() const;
    51 
    52     Frame* m_frame;
    5349};
    5450
  • trunk/Source/WebCore/plugins/DOMPluginArray.cpp

    r95901 r104380  
    3030
    3131DOMPluginArray::DOMPluginArray(Frame* frame)
    32     : m_frame(frame)
     32    : DOMWindowProperty(frame)
    3333{
    3434}
  • trunk/Source/WebCore/plugins/DOMPluginArray.h

    r95901 r104380  
    2323
    2424#include "DOMPlugin.h"
     25#include "DOMWindowProperty.h"
    2526#include <wtf/Forward.h>
    2627#include <wtf/PassRefPtr.h>
     
    3334class PluginData;
    3435
    35 class DOMPluginArray : public RefCounted<DOMPluginArray> {
     36class DOMPluginArray : public RefCounted<DOMPluginArray>, public DOMWindowProperty {
    3637public:
    3738    static PassRefPtr<DOMPluginArray> create(Frame* frame) { return adoptRef(new DOMPluginArray(frame)); }
    3839    ~DOMPluginArray();
    39 
    40     Frame* frame() { return m_frame; }
    41     void disconnectFrame() { m_frame = 0; }
    4240
    4341    unsigned length() const;
     
    4947
    5048private:
    51     DOMPluginArray(Frame*);
     49    explicit DOMPluginArray(Frame*);
    5250    PluginData* pluginData() const;
    53 
    54     Frame* m_frame;
    5551};
    5652
  • trunk/Source/WebCore/storage/Storage.cpp

    r99439 r104380  
    4242
    4343Storage::Storage(Frame* frame, PassRefPtr<StorageArea> storageArea)
    44     : m_frame(frame)
     44    : DOMWindowProperty(frame)
    4545    , m_storageArea(storageArea)
    4646{
  • trunk/Source/WebCore/storage/Storage.h

    r97574 r104380  
    2727#define Storage_h
    2828
     29#include "DOMWindowProperty.h"
    2930#include <wtf/Forward.h>
    3031#include <wtf/RefCounted.h>
     
    3738    typedef int ExceptionCode;
    3839
    39     class Storage : public RefCounted<Storage> {
     40    class Storage : public RefCounted<Storage>, public DOMWindowProperty {
    4041    public:
    4142        static PassRefPtr<Storage> create(Frame*, PassRefPtr<StorageArea>);
     
    5152        bool contains(const String& key) const;
    5253
    53         Frame* frame() { return m_frame; }
    54         void disconnectFrame() { m_frame = 0; }
    55 
    5654    private:
    5755        Storage(Frame*, PassRefPtr<StorageArea>);
    5856
    59         Frame* m_frame;
    6057        RefPtr<StorageArea> m_storageArea;
    6158    };
Note: See TracChangeset for help on using the changeset viewer.