Changeset 84789 in webkit


Ignore:
Timestamp:
Apr 25, 2011 11:56:02 AM (13 years ago)
Author:
ggaren@apple.com
Message:

2011-04-25 Geoffrey Garen <ggaren@apple.com>

Reviewed by Oliver Hunt.

Removed a use of markDOMObjectWrapper: ActiveDOMObjects, Workers, and MessagePorts
https://bugs.webkit.org/show_bug.cgi?id=59333

  • WebCore.xcodeproj/project.pbxproj: Added .idl files for easier editing.
  • bindings/js/JSDOMBinding.cpp:
  • bindings/js/JSDOMBinding.h:
  • bindings/js/JSDocumentCustom.cpp:
  • bindings/js/JSWorkerContextCustom.cpp: (WebCore::JSWorkerContext::visitChildren): Removed now-unused functions.
  • bindings/scripts/CodeGeneratorJS.pm: Added support for ActiveDOMObject lifetime management.
  • dom/Document.idl: No need for a custom mark function anymore, since ActiveDOMObjets now manage their own lifetimes.
  • dom/MessagePort.cpp: (WebCore::MessagePort::hasPendingActivity): Correctly report that we have pending activity when we're remotely entangled, instead of relying on our clients to know this about us and do the check for us.
  • dom/MessagePort.h: FIXME!
  • dom/MessagePort.idl:
  • fileapi/DOMFileSystem.idl:
  • fileapi/FileReader.idl:
  • fileapi/FileWriter.idl:
  • notifications/Notification.idl:
  • notifications/NotificationCenter.idl:
  • page/EventSource.idl:
  • storage/IDBDatabase.idl:
  • storage/IDBRequest.idl:
  • storage/IDBTransaction.idl:
  • webaudio/AudioContext.idl:
  • websockets/WebSocket.idl:
  • workers/AbstractWorker.idl:
  • workers/SharedWorker.idl:
  • workers/Worker.idl: Opt in to ActiveDOMObject lifetime management.
  • workers/WorkerContext.cpp: (WebCore::WorkerContext::hasPendingActivity): No need to make up for MessagePort::hasPendingActivity being wrong anymore, since it's now right.
  • xml/XMLHttpRequest.idl: Opt in to ActiveDOMObject lifetime management.
Location:
trunk/Source/WebCore
Files:
27 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r84780 r84789  
     12011-04-25  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        Removed a use of markDOMObjectWrapper: ActiveDOMObjects, Workers, and MessagePorts
     6        https://bugs.webkit.org/show_bug.cgi?id=59333
     7
     8        * WebCore.xcodeproj/project.pbxproj: Added .idl files for easier editing.
     9
     10        * bindings/js/JSDOMBinding.cpp:
     11        * bindings/js/JSDOMBinding.h:
     12        * bindings/js/JSDocumentCustom.cpp:
     13        * bindings/js/JSWorkerContextCustom.cpp:
     14        (WebCore::JSWorkerContext::visitChildren): Removed now-unused functions.
     15
     16        * bindings/scripts/CodeGeneratorJS.pm: Added support for ActiveDOMObject
     17        lifetime management.
     18
     19        * dom/Document.idl: No need for a custom mark function anymore, since
     20        ActiveDOMObjets now manage their own lifetimes.
     21
     22        * dom/MessagePort.cpp:
     23        (WebCore::MessagePort::hasPendingActivity): Correctly report that we
     24        have pending activity when we're remotely entangled, instead of relying
     25        on our clients to know this about us and do the check for us.
     26
     27        * dom/MessagePort.h: FIXME!
     28
     29        * dom/MessagePort.idl:
     30        * fileapi/DOMFileSystem.idl:
     31        * fileapi/FileReader.idl:
     32        * fileapi/FileWriter.idl:
     33        * notifications/Notification.idl:
     34        * notifications/NotificationCenter.idl:
     35        * page/EventSource.idl:
     36        * storage/IDBDatabase.idl:
     37        * storage/IDBRequest.idl:
     38        * storage/IDBTransaction.idl:
     39        * webaudio/AudioContext.idl:
     40        * websockets/WebSocket.idl:
     41        * workers/AbstractWorker.idl:
     42        * workers/SharedWorker.idl:
     43        * workers/Worker.idl: Opt in to ActiveDOMObject lifetime management.
     44
     45        * workers/WorkerContext.cpp:
     46        (WebCore::WorkerContext::hasPendingActivity): No need to make up for
     47        MessagePort::hasPendingActivity being wrong anymore, since it's now right.
     48
     49        * xml/XMLHttpRequest.idl: Opt in to ActiveDOMObject lifetime management.
     50
    1512011-04-25  Yury Semikhatsky  <yurys@chromium.org>
    252
  • trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r84773 r84789  
    67726772                14993BE40B2F2B1C0050497F /* FocusController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = FocusController.h; sourceTree = "<group>"; };
    67736773                14A98E05136386A200C9FED2 /* Blob.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Blob.idl; path = ../../../webkit/Source/WebCore/fileapi/Blob.idl; sourceTree = SOURCE_ROOT; };
     6774                14BDF5971365392C00148393 /* DOMFileSystem.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DOMFileSystem.idl; path = ../../../webkit/Source/WebCore/fileapi/DOMFileSystem.idl; sourceTree = SOURCE_ROOT; };
     6775                14BDF59A1365399100148393 /* FileReader.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = FileReader.idl; path = ../../../webkit/Source/WebCore/fileapi/FileReader.idl; sourceTree = SOURCE_ROOT; };
     6776                14BDF59C136539BE00148393 /* FileWriter.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = FileWriter.idl; path = ../../../webkit/Source/WebCore/fileapi/FileWriter.idl; sourceTree = SOURCE_ROOT; };
    67746777                14C9A5E90B3D105F005A0232 /* Settings.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Settings.cpp; sourceTree = "<group>"; };
    67756778                14CD8D81106B529000A46D23 /* JSSharedWorkerCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSharedWorkerCustom.cpp; sourceTree = "<group>"; };
     
    1627716280                                8987853F122CA064003AABDA /* DOMFileSystem.cpp */,
    1627816281                                89878540122CA064003AABDA /* DOMFileSystem.h */,
     16282                                14BDF5971365392C00148393 /* DOMFileSystem.idl */,
    1627916283                                893C47F41248BD39002B3D86 /* DOMFileSystemBase.cpp */,
    1628016284                                893C47F51248BD39002B3D86 /* DOMFileSystemBase.h */,
     
    1630816312                                976D6C69122B8A3D001FD1F7 /* FileReader.cpp */,
    1630916313                                976D6C6A122B8A3D001FD1F7 /* FileReader.h */,
     16314                                14BDF59A1365399100148393 /* FileReader.idl */,
    1631016315                                2E75841A12779ADA0062628B /* FileReaderLoader.cpp */,
    1631116316                                2E75841B12779ADA0062628B /* FileReaderLoader.h */,
     
    1632316328                                976D6C71122B8A3D001FD1F7 /* FileWriter.cpp */,
    1632416329                                976D6C72122B8A3D001FD1F7 /* FileWriter.h */,
     16330                                14BDF59C136539BE00148393 /* FileWriter.idl */,
    1632516331                                46BC724B129B104C0071C07E /* FileWriterBase.cpp */,
    1632616332                                46BC724C129B104C0071C07E /* FileWriterBase.h */,
  • trunk/Source/WebCore/bindings/js/JSDOMBinding.cpp

    r84556 r84789  
    11/*
    22 *  Copyright (C) 1999-2001 Harri Porten (porten@kde.org)
    3  *  Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
     3 *  Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
    44 *  Copyright (C) 2007 Samuel Weinig <sam@webkit.org>
    55 *
     
    2222#include "JSDOMBinding.h"
    2323
    24 #include "debugger/DebuggerCallFrame.h"
    25 
    26 #include "ActiveDOMObject.h"
    2724#include "DOMCoreException.h"
    2825#include "DOMObjectHashTableMap.h"
    29 #include "Document.h"
    3026#include "EventException.h"
    3127#include "ExceptionBase.h"
    32 #include "ExceptionCode.h"
     28#include "FileException.h"
    3329#include "Frame.h"
    34 #include "HTMLAudioElement.h"
    35 #include "HTMLCanvasElement.h"
    36 #include "HTMLFrameElementBase.h"
    37 #include "HTMLImageElement.h"
    38 #include "HTMLLinkElement.h"
    39 #include "HTMLNames.h"
    40 #include "HTMLScriptElement.h"
    41 #include "HTMLStyleElement.h"
     30#include "IDBDatabaseException.h"
    4231#include "JSDOMCoreException.h"
    4332#include "JSDOMWindowCustom.h"
    4433#include "JSEventException.h"
    4534#include "JSExceptionBase.h"
    46 #include "JSMainThreadExecState.h"
     35#include "JSFileException.h"
    4736#include "JSRangeException.h"
     37#include "JSSQLException.h"
     38#include "JSSVGException.h"
    4839#include "JSXMLHttpRequestException.h"
    49 #include "KURL.h"
    50 #include "MessagePort.h"
    51 #include "ProcessingInstruction.h"
     40#include "JSXPathException.h"
    5241#include "RangeException.h"
    53 #include "ScriptCachedFrameData.h"
     42#include "SQLException.h"
     43#include "SVGException.h"
    5444#include "ScriptCallStack.h"
    55 #include "ScriptController.h"
    56 #include "Settings.h"
    57 #include "WebCoreJSClientData.h"
    5845#include "XMLHttpRequestException.h"
     46#include "XPathException.h"
    5947#include <runtime/DateInstance.h>
    6048#include <runtime/Error.h>
    6149#include <runtime/JSFunction.h>
    62 #include <wtf/MathExtras.h>
    63 #include <wtf/StdLibExtras.h>
    64 
    65 #if ENABLE(SVG)
    66 #include "JSSVGException.h"
    67 #include "SVGException.h"
    68 #endif
    69 
    70 #if ENABLE(XPATH)
    71 #include "JSXPathException.h"
    72 #include "XPathException.h"
    73 #endif
    74 
    75 #if ENABLE(DATABASE)
    76 #include "JSSQLException.h"
    77 #include "SQLException.h"
    78 #endif
    79 
    80 #if ENABLE(BLOB) || ENABLE(FILE_SYSTEM)
    81 #include "FileException.h"
    82 #include "JSFileException.h"
    83 #endif
    84 
    85 #if ENABLE(INDEXED_DATABASE)
    86 #include "IDBDatabaseException.h"
    87 #include "JSIDBDatabaseException.h"
    88 #endif
    8950
    9051using namespace JSC;
     
    9253namespace WebCore {
    9354
    94 using namespace HTMLNames;
    95 
    96 class JSGlobalDataWorldIterator {
    97 public:
    98     JSGlobalDataWorldIterator(JSGlobalData* globalData)
    99         : m_pos(static_cast<WebCoreJSClientData*>(globalData->clientData)->m_worldSet.begin())
    100         , m_end(static_cast<WebCoreJSClientData*>(globalData->clientData)->m_worldSet.end())
    101     {
    102     }
    103 
    104     operator bool()
    105     {
    106         return m_pos != m_end;
    107     }
    108 
    109     DOMWrapperWorld* operator*()
    110     {
    111         ASSERT(m_pos != m_end);
    112         return *m_pos;
    113     }
    114 
    115     DOMWrapperWorld* operator->()
    116     {
    117         ASSERT(m_pos != m_end);
    118         return *m_pos;
    119     }
    120 
    121     JSGlobalDataWorldIterator& operator++()
    122     {
    123         ++m_pos;
    124         return *this;
    125     }
    126 
    127 private:
    128     HashSet<DOMWrapperWorld*>::iterator m_pos;
    129     HashSet<DOMWrapperWorld*>::iterator m_end;
    130 };
    131 
    13255const JSC::HashTable* getHashTableForGlobalData(JSGlobalData& globalData, const JSC::HashTable* staticTable)
    13356{
    13457    return DOMObjectHashTableMap::mapFor(globalData).get(staticTable);
    135 }
    136 
    137 void visitActiveObjectsForContext(SlotVisitor& visitor, JSGlobalData& globalData, ScriptExecutionContext* scriptExecutionContext)
    138 {
    139     // If an element has pending activity that may result in event listeners being called
    140     // (e.g. an XMLHttpRequest), we need to keep JS wrappers alive.
    141 
    142     const HashMap<ActiveDOMObject*, void*>& activeObjects = scriptExecutionContext->activeDOMObjects();
    143     HashMap<ActiveDOMObject*, void*>::const_iterator activeObjectsEnd = activeObjects.end();
    144     for (HashMap<ActiveDOMObject*, void*>::const_iterator iter = activeObjects.begin(); iter != activeObjectsEnd; ++iter) {
    145         if (iter->first->hasPendingActivity()) {
    146             // Generally, an active object with pending activity must have a wrapper to mark its listeners.
    147             // However, some ActiveDOMObjects don't have JS wrappers.
    148             markDOMObjectWrapper(visitor, globalData, iter->second);
    149         }
    150     }
    151 
    152     const HashSet<MessagePort*>& messagePorts = scriptExecutionContext->messagePorts();
    153     HashSet<MessagePort*>::const_iterator portsEnd = messagePorts.end();
    154     for (HashSet<MessagePort*>::const_iterator iter = messagePorts.begin(); iter != portsEnd; ++iter) {
    155         // If the message port is remotely entangled, then always mark it as in-use because we can't determine reachability across threads.
    156         if (!(*iter)->locallyEntangledPort() || (*iter)->hasPendingActivity())
    157             markDOMObjectWrapper(visitor, globalData, *iter);
    158     }
    159 }
    160 
    161 void markDOMObjectWrapper(SlotVisitor& visitor, JSGlobalData& globalData, void* object)
    162 {
    163     // FIXME: This could be changed to only mark wrappers that are "observable"
    164     // as markDOMNodesForDocument does, allowing us to collect more wrappers,
    165     // but doing this correctly would be challenging.
    166     if (!object)
    167         return;
    168 
    169     for (JSGlobalDataWorldIterator worldIter(&globalData); worldIter; ++worldIter) {
    170         if (JSDOMWrapper* wrapper = worldIter->m_wrappers.get(object).get())
    171             visitor.deprecatedAppend(reinterpret_cast<JSCell**>(&wrapper));
    172     }
    17358}
    17459
  • trunk/Source/WebCore/bindings/js/JSDOMBinding.h

    r84764 r84789  
    117117    };
    118118   
    119     void visitActiveObjectsForContext(JSC::SlotVisitor&, JSC::JSGlobalData&, ScriptExecutionContext*);
    120     void markDOMObjectWrapper(JSC::SlotVisitor&, JSC::JSGlobalData&, void*);
    121 
    122119    JSC::Structure* getCachedDOMStructure(JSDOMGlobalObject*, const JSC::ClassInfo*);
    123120    JSC::Structure* cacheDOMStructure(JSDOMGlobalObject*, JSC::Structure*, const JSC::ClassInfo*);
  • trunk/Source/WebCore/bindings/js/JSDocumentCustom.cpp

    r84665 r84789  
    11/*
    2  * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved.
     2 * Copyright (C) 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
    33 *
    44 * This library is free software; you can redistribute it and/or
     
    4848
    4949namespace WebCore {
    50 
    51 void JSDocument::visitChildren(SlotVisitor& visitor)
    52 {
    53     JSNode::visitChildren(visitor);
    54 
    55     Document* document = impl();
    56     JSGlobalData& globalData = *Heap::heap(this)->globalData();
    57 
    58     visitActiveObjectsForContext(visitor, globalData, document);
    59 }
    6050
    6151JSValue JSDocument::location(ExecState* exec) const
  • trunk/Source/WebCore/bindings/js/JSWorkerContextCustom.cpp

    r84764 r84789  
    11/*
    2  * Copyright (C) 2008, 2009 Apple Inc. All Rights Reserved.
     2 * Copyright (C) 2008, 2009, 2011 Apple Inc. All Rights Reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    5757{
    5858    Base::visitChildren(visitor);
    59 
    60     JSGlobalData& globalData = this->globalData();
    61 
    62     visitActiveObjectsForContext(visitor, globalData, scriptExecutionContext());
    6359
    6460    if (WorkerLocation* location = impl()->optionalLocation())
  • trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm

    r84764 r84789  
    915915    }
    916916
    917     if ($dataNode->extendedAttributes->{"GenerateIsReachable"} || $dataNode->extendedAttributes->{"CustomIsReachable"} || $dataNode->extendedAttributes->{"CustomFinalize"}) {
     917    if ($dataNode->extendedAttributes->{"GenerateIsReachable"} ||
     918        $dataNode->extendedAttributes->{"CustomIsReachable"} ||
     919        $dataNode->extendedAttributes->{"CustomFinalize"} ||
     920        $dataNode->extendedAttributes->{"ActiveDOMObject"}) {
    918921        push(@headerContent, "class JS${implType}Owner : public JSC::WeakHandleOwner {\n");
    919922        push(@headerContent, "    virtual bool isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown>, void* context, JSC::SlotVisitor&);\n");
     
    21272130    }
    21282131
    2129     if ($dataNode->extendedAttributes->{"GenerateIsReachable"}) {
     2132    if ($dataNode->extendedAttributes->{"GenerateIsReachable"} || $dataNode->extendedAttributes->{"ActiveDOMObject"}) {
    21302133        push(@implContent, "static inline bool isObservable(JS${implType}* js${implType})\n");
    21312134        push(@implContent, "{\n");
     
    21392142        push(@implContent, "}\n\n");
    21402143
    2141         my $rootString;
    2142         if ($dataNode->extendedAttributes->{"GenerateIsReachable"} eq "Impl") {
    2143             $rootString  = "    ${implType}* root = js${implType}->impl();\n";
    2144         } elsif ($dataNode->extendedAttributes->{"GenerateIsReachable"} eq "ImplContext") {
    2145             $rootString  = "    WebGLRenderingContext* root = js${implType}->impl()->context();\n";
    2146         } elsif ($dataNode->extendedAttributes->{"GenerateIsReachable"} eq "ImplFrame") {
    2147             $rootString  = "    Frame* root = js${implType}->impl()->frame();\n";
    2148             $rootString .= "    if (!root)\n";
    2149             $rootString .= "        return false;\n";
    2150         } elsif ($dataNode->extendedAttributes->{"GenerateIsReachable"} eq "ImplDocument") {
    2151             $rootString  = "    Document* root = js${implType}->impl()->document();\n";
    2152             $rootString .= "    if (!root)\n";
    2153             $rootString .= "        return false;\n";
    2154         } elsif ($dataNode->extendedAttributes->{"GenerateIsReachable"} eq "ImplElementRoot") {
    2155             $rootString  = "    Element* element = js${implType}->impl()->element();\n";
    2156             $rootString .= "    if (!element)\n";
    2157             $rootString .= "        return false;\n";
    2158             $rootString .= "    void* root = WebCore::root(element);\n";
    2159         } elsif ($interfaceName eq "CanvasRenderingContext") {
    2160             $rootString  = "    void* root = WebCore::root(js${implType}->impl()->canvas());\n";
    2161         } elsif ($interfaceName eq "HTMLCollection") {
    2162             $rootString  = "    void* root = WebCore::root(js${implType}->impl()->base());\n";
    2163         } else {
    2164             $rootString  = "    void* root = WebCore::root(js${implType}->impl());\n";
    2165         }
    2166 
    21672144        push(@implContent, "bool JS${implType}Owner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)\n");
    21682145        push(@implContent, "{\n");
    21692146        push(@implContent, "    JS${implType}* js${implType} = static_cast<JS${implType}*>(handle.get().asCell());\n");
     2147        # Not all ActiveDOMObjects with pending activity maintain their reference
     2148        # counts correctly, so JavaScript wrappers must unconditionally keep
     2149        # ActiveDOMObjects with pending activity alive.
     2150        # FIXME: Fix this lifetime issue in the DOM, and move this hasPendingActivity
     2151        # check below the isObservable check.
     2152        if ($dataNode->extendedAttributes->{"ActiveDOMObject"}) {
     2153            push(@implContent, "    if (js${implType}->impl()->hasPendingActivity())\n");
     2154            push(@implContent, "        return true;\n");
     2155        }
    21702156        push(@implContent, "    if (!isObservable(js${implType}))\n");
    21712157        push(@implContent, "        return false;\n");
    2172         push(@implContent, $rootString);
    2173         push(@implContent, "    return visitor.containsOpaqueRoot(root);\n");
     2158        if ($dataNode->extendedAttributes->{"GenerateIsReachable"}) {
     2159            my $rootString;
     2160            if ($dataNode->extendedAttributes->{"GenerateIsReachable"} eq "Impl") {
     2161                $rootString  = "    ${implType}* root = js${implType}->impl();\n";
     2162            } elsif ($dataNode->extendedAttributes->{"GenerateIsReachable"} eq "ImplContext") {
     2163                $rootString  = "    WebGLRenderingContext* root = js${implType}->impl()->context();\n";
     2164            } elsif ($dataNode->extendedAttributes->{"GenerateIsReachable"} eq "ImplFrame") {
     2165                $rootString  = "    Frame* root = js${implType}->impl()->frame();\n";
     2166                $rootString .= "    if (!root)\n";
     2167                $rootString .= "        return false;\n";
     2168            } elsif ($dataNode->extendedAttributes->{"GenerateIsReachable"} eq "ImplDocument") {
     2169                $rootString  = "    Document* root = js${implType}->impl()->document();\n";
     2170                $rootString .= "    if (!root)\n";
     2171                $rootString .= "        return false;\n";
     2172            } elsif ($dataNode->extendedAttributes->{"GenerateIsReachable"} eq "ImplElementRoot") {
     2173                $rootString  = "    Element* element = js${implType}->impl()->element();\n";
     2174                $rootString .= "    if (!element)\n";
     2175                $rootString .= "        return false;\n";
     2176                $rootString .= "    void* root = WebCore::root(element);\n";
     2177            } elsif ($interfaceName eq "CanvasRenderingContext") {
     2178                $rootString  = "    void* root = WebCore::root(js${implType}->impl()->canvas());\n";
     2179            } elsif ($interfaceName eq "HTMLCollection") {
     2180                $rootString  = "    void* root = WebCore::root(js${implType}->impl()->base());\n";
     2181            } else {
     2182                $rootString  = "    void* root = WebCore::root(js${implType}->impl());\n";
     2183            }
     2184
     2185            push(@implContent, $rootString);
     2186            push(@implContent, "    return visitor.containsOpaqueRoot(root);\n");
     2187        } else {
     2188            push(@implContent, "    UNUSED_PARAM(visitor);\n");
     2189            push(@implContent, "    return false;\n");
     2190        }
    21742191        push(@implContent, "}\n\n");
    21752192    }
    21762193
    2177     if ($dataNode->extendedAttributes->{"GenerateIsReachable"} || $dataNode->extendedAttributes->{"CustomIsReachable"} && !$dataNode->extendedAttributes->{"CustomFinalize"}) {
     2194    if (!$dataNode->extendedAttributes->{"CustomFinalize"} &&
     2195        ($dataNode->extendedAttributes->{"GenerateIsReachable"} ||
     2196         $dataNode->extendedAttributes->{"CustomIsReachable"} ||
     2197         $dataNode->extendedAttributes->{"ActiveDOMObject"})) {
    21782198        push(@implContent, "void JS${implType}Owner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)\n");
    21792199        push(@implContent, "{\n");
  • trunk/Source/WebCore/dom/Document.idl

    r83213 r84789  
    11/*
    2  * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
     2 * Copyright (C) 2006, 2007, 2011 Apple Inc. All rights reserved.
    33 * Copyright (C) 2006, 2007 Samuel Weinig <sam@webkit.org>
    44 *
     
    2424        CustomToJS,
    2525        GenerateNativeConverter,
    26         CustomMarkFunction,
    2726        InlineGetOwnPropertySlot
    2827    ] Document : Node {
  • trunk/Source/WebCore/dom/MessagePort.cpp

    r83900 r84789  
    193193    // The spec says that entangled message ports should always be treated as if they have a strong reference.
    194194    // We'll also stipulate that the queue needs to be open (if the app drops its reference to the port before start()-ing it, then it's not really entangled as it's unreachable).
    195     return m_started && m_entangledChannel && m_entangledChannel->hasPendingActivity();
     195    if (m_started && m_entangledChannel && m_entangledChannel->hasPendingActivity())
     196        return true;
     197    if (isEntangled() && !locallyEntangledPort())
     198        return true;
     199    return false;
    196200}
    197201
  • trunk/Source/WebCore/dom/MessagePort.h

    r65077 r84789  
    4949    typedef Vector<RefPtr<MessagePort>, 1> MessagePortArray;
    5050
     51    // FIXME: This class should inherit from ActiveDOMObject and use
     52    // setPendingActivity / unsetPendingActivity instead of duplicating
     53    // ActiveDOMObject's features and relying on JavaScript garbage collection
     54    // to get its lifetime right.
    5155    class MessagePort : public RefCounted<MessagePort>, public EventTarget {
    5256    public:
  • trunk/Source/WebCore/dom/MessagePort.idl

    r84764 r84789  
    3030        CustomMarkFunction,
    3131        GenerateIsReachable=Impl,
     32        ActiveDOMObject,
    3233        EventTarget,
    3334        NoStaticTables
  • trunk/Source/WebCore/fileapi/DOMFileSystem.idl

    r67917 r84789  
    11/*
    22 * Copyright (C) 2010 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    3233    interface [
    3334        Conditional=FILE_SYSTEM,
     35        ActiveDOMObject,
    3436        NoStaticTables
    3537    ] DOMFileSystem {
  • trunk/Source/WebCore/fileapi/FileReader.idl

    r70904 r84789  
    11/*
    22 * Copyright (C) 2010 Google Inc.  All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    3233    interface [
    3334        Conditional=BLOB,
     35        ActiveDOMObject,
    3436        CanBeConstructed,
    3537        CallWith=ScriptExecutionContext,
  • trunk/Source/WebCore/fileapi/FileWriter.idl

    r67614 r84789  
    11/*
    22 * Copyright (C) 2010 Google Inc.  All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    3233    interface [
    3334        Conditional=FILE_SYSTEM,
     35        ActiveDOMObject,
    3436        CallWith=ScriptExecutionContext,
    3537        EventTarget,
  • trunk/Source/WebCore/notifications/Notification.idl

    r66470 r84789  
    11/*
    22 * Copyright (C) 2009 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    3334    interface [
    3435        Conditional=NOTIFICATIONS,
     36        ActiveDOMObject,
    3537        EventTarget,
    3638        OmitConstructor
  • trunk/Source/WebCore/notifications/NotificationCenter.idl

    r52534 r84789  
    11/*
    22 * Copyright (C) 2009 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    3334    interface [
    3435        Conditional=NOTIFICATIONS,
     36        ActiveDOMObject,
    3537        OmitConstructor
    3638    ] NotificationCenter {
  • trunk/Source/WebCore/page/EventSource.idl

    r61136 r84789  
    11/*
    22 * Copyright (C) 2009 Ericsson AB. All rights reserved.
    3  * Copyright (C) 2010 Apple Inc. All Rights Reserved.
     3 * Copyright (C) 2010, 2011 Apple Inc. All Rights Reserved.
    44 *
    55 * Redistribution and use in source and binary forms, with or without
     
    3434    interface [
    3535        Conditional=EVENTSOURCE,
     36        ActiveDOMObject,
    3637        CanBeConstructed,
    3738        CustomConstructFunction,
  • trunk/Source/WebCore/storage/IDBDatabase.idl

    r80183 r84789  
    11/*
    22 * Copyright (C) 2010 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    2829    interface [
    2930        Conditional=INDEXED_DATABASE,
     31        ActiveDOMObject,
    3032        EventTarget
    3133    ] IDBDatabase {
  • trunk/Source/WebCore/storage/IDBRequest.idl

    r78525 r84789  
    11/*
    22 * Copyright (C) 2010 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    3132    interface [
    3233        Conditional=INDEXED_DATABASE,
     34        ActiveDOMObject,
    3335        EventTarget
    3436    ] IDBRequest {
  • trunk/Source/WebCore/storage/IDBTransaction.idl

    r77689 r84789  
    11 /*
    22 * Copyright (C) 2010 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    2829    interface [
    2930        Conditional=INDEXED_DATABASE,
     31        ActiveDOMObject,
    3032        EventTarget
    3133    ] IDBTransaction {
  • trunk/Source/WebCore/webaudio/AudioContext.idl

    r82963 r84789  
    11/*
    22 * Copyright (C) 2010, Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    2627    interface [
    2728        Conditional=WEB_AUDIO,
     29        ActiveDOMObject,
    2830        CanBeConstructed,
    2931        CustomConstructFunction,
  • trunk/Source/WebCore/websockets/WebSocket.idl

    r61390 r84789  
    11/*
    22 * Copyright (C) 2009 Google Inc.  All rights reserved.
    3  * Copyright (C) 2010 Apple Inc. All Rights Reserved.
     3 * Copyright (C) 2010, 2011 Apple Inc. All Rights Reserved.
    44 *
    55 * Redistribution and use in source and binary forms, with or without
     
    3434    interface [
    3535        Conditional=WEB_SOCKETS,
     36        ActiveDOMObject,
    3637        CanBeConstructed,
    3738        CustomConstructFunction,
  • trunk/Source/WebCore/workers/AbstractWorker.idl

    r58330 r84789  
    11/*
    22 * Copyright (C) 2009 Google Inc. All rights reserved.
     3 * Copyright (C) 2011 Apple Inc. All rights reserved.
    34 *
    45 * Redistribution and use in source and binary forms, with or without
     
    3334    interface [
    3435        Conditional=WORKERS,
     36        ActiveDOMObject,
    3537        CustomToJS,
    3638        EventTarget
  • trunk/Source/WebCore/workers/SharedWorker.idl

    r61136 r84789  
    3434    interface [
    3535        Conditional=SHARED_WORKERS,
     36        ActiveDOMObject,
    3637        CanBeConstructed,
    3738        CustomConstructFunction,
  • trunk/Source/WebCore/workers/Worker.idl

    r61136 r84789  
    2929    interface [
    3030        Conditional=WORKERS,
     31        ActiveDOMObject,
    3132        CanBeConstructed,
    3233        CustomConstructFunction,
  • trunk/Source/WebCore/workers/WorkerContext.cpp

    r84224 r84789  
    195195    }
    196196
    197     // Keep the worker active as long as there is a MessagePort with pending activity or that is remotely entangled.
    198197    HashSet<MessagePort*>::const_iterator messagePortsEnd = messagePorts().end();
    199198    for (HashSet<MessagePort*>::const_iterator iter = messagePorts().begin(); iter != messagePortsEnd; ++iter) {
    200         if ((*iter)->hasPendingActivity() || ((*iter)->isEntangled() && !(*iter)->locallyEntangledPort()))
     199        if ((*iter)->hasPendingActivity())
    201200            return true;
    202201    }
  • trunk/Source/WebCore/xml/XMLHttpRequest.idl

    r72626 r84789  
    11/*
    2  * Copyright (C) 2008 Apple Inc. All rights reserved.
     2 * Copyright (C) 2008, 2011 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    3030
    3131    interface [
     32        ActiveDOMObject,
    3233        CanBeConstructed,
    3334        CustomConstructFunction,
Note: See TracChangeset for help on using the changeset viewer.