Changeset 84736 in webkit
- Timestamp:
- Apr 22, 2011 9:41:54 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r84732 r84736 1 2011-04-22 Geoffrey Garen <ggaren@apple.com> 2 3 Rolled back in r84725 and r84728 with appcache crash fixed. 4 5 Reviewed by Oliver Hunt. 6 7 Removed a use of markDOMObjectWrapper: DOMWindow 8 https://bugs.webkit.org/show_bug.cgi?id=59260 9 10 * bindings/js/JSDOMWindowCustom.cpp: 11 (WebCore::JSDOMWindow::visitChildren): No need to mark explicitly, since 12 we use the opaque roots system now. 13 14 * bindings/js/JSNavigatorCustom.cpp: Ditto. 15 16 * bindings/scripts/CodeGeneratorJS.pm: Added autogeneration for objects 17 whose opaque roots are frames. 18 19 * css/StyleMedia.h: 20 (WebCore::StyleMedia::frame): Added an accessor for the sake of GC. 21 22 * css/StyleMedia.idl: 23 * loader/appcache/DOMApplicationCache.idl: 24 * page/BarInfo.idl: 25 * page/Console.idl: 26 * page/DOMSelection.idl: 27 * page/Geolocation.idl: 28 * page/History.idl: 29 * page/Location.idl: 30 * page/Navigator.idl: 31 * page/Screen.idl: 32 * storage/Storage.idl: Updated to use the opaque roots system. 33 1 34 2011-04-22 Nate Chapin <japhet@chromium.org> 2 35 … … 73 106 * svg/animation/SVGSMILElement.cpp: 74 107 (WebCore::SVGSMILElement::insertedIntoDocument): Ditto. 108 109 2011-04-22 Geoffrey Garen <ggaren@apple.com> 110 111 Mac build fix. 112 113 * page/DOMWindow.h: 114 (WebCore::DOMWindow::optionalApplicationCache): Restored this function, 115 which is used after all. 75 116 76 117 2011-04-22 Geoffrey Garen <ggaren@apple.com> -
trunk/Source/WebCore/bindings/js/JSDOMApplicationCacheCustom.cpp
r65077 r84736 42 42 43 43 namespace WebCore { 44 45 static inline bool isObservable(JSDOMApplicationCache* jsDOMApplicationCache, DOMApplicationCache* domApplicationCache) 46 { 47 if (!jsDOMApplicationCache->hasCustomProperties()) 48 return true; 49 if (domApplicationCache->hasEventListeners()) 50 return true; 51 return false; 52 } 53 54 bool JSDOMApplicationCacheOwner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor) 55 { 56 JSDOMApplicationCache* jsDOMApplicationCache = static_cast<JSDOMApplicationCache*>(handle.get().asCell()); 57 DOMApplicationCache* domApplicationCache = jsDOMApplicationCache->impl(); 58 Frame* frame = jsDOMApplicationCache->impl()->frame(); 59 if (!frame) 60 return false; 61 return isObservable(jsDOMApplicationCache, domApplicationCache) && visitor.containsOpaqueRoot(frame); 62 } 44 63 45 64 #if ENABLE(APPLICATION_CACHE_DYNAMIC_ENTRIES) -
trunk/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp
r84731 r84736 78 78 79 79 impl()->visitJSEventListeners(visitor); 80 81 JSGlobalData& globalData = *Heap::heap(this)->globalData(); 82 83 markDOMObjectWrapper(visitor, globalData, impl()->optionalConsole()); 84 markDOMObjectWrapper(visitor, globalData, impl()->optionalHistory()); 85 markDOMObjectWrapper(visitor, globalData, impl()->optionalLocationbar()); 86 markDOMObjectWrapper(visitor, globalData, impl()->optionalMenubar()); 87 markDOMObjectWrapper(visitor, globalData, impl()->optionalNavigator()); 88 markDOMObjectWrapper(visitor, globalData, impl()->optionalPersonalbar()); 89 markDOMObjectWrapper(visitor, globalData, impl()->optionalScreen()); 90 markDOMObjectWrapper(visitor, globalData, impl()->optionalScrollbars()); 91 markDOMObjectWrapper(visitor, globalData, impl()->optionalSelection()); 92 markDOMObjectWrapper(visitor, globalData, impl()->optionalStatusbar()); 93 markDOMObjectWrapper(visitor, globalData, impl()->optionalToolbar()); 94 markDOMObjectWrapper(visitor, globalData, impl()->optionalLocation()); 95 markDOMObjectWrapper(visitor, globalData, impl()->optionalMedia()); 96 #if ENABLE(DOM_STORAGE) 97 markDOMObjectWrapper(visitor, globalData, impl()->optionalSessionStorage()); 98 markDOMObjectWrapper(visitor, globalData, impl()->optionalLocalStorage()); 99 #endif 100 #if ENABLE(OFFLINE_WEB_APPLICATIONS) 101 markDOMObjectWrapper(visitor, globalData, impl()->optionalApplicationCache()); 102 #endif 80 if (Frame* frame = impl()->frame()) 81 visitor.addOpaqueRoot(frame); 103 82 } 104 83 -
trunk/Source/WebCore/bindings/js/JSNavigatorCustom.cpp
r84731 r84736 33 33 using namespace JSC; 34 34 35 void JSNavigator::visitChildren(SlotVisitor& visitor)36 {37 Base::visitChildren(visitor);38 39 JSGlobalData& globalData = *Heap::heap(this)->globalData();40 41 markDOMObjectWrapper(visitor, globalData, impl()->optionalGeolocation());42 }43 44 35 #if ENABLE(MEDIA_STREAM) 45 36 JSValue JSNavigator::webkitGetUserMedia(ExecState* exec) -
trunk/Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
r84731 r84736 2127 2127 } 2128 2128 2129 if ($dataNode->extendedAttributes->{"CustomIsReachable"} && !$dataNode->extendedAttributes->{"CustomFinalize"}) { 2130 push(@implContent, "void JS${implType}Owner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)\n"); 2131 push(@implContent, "{\n"); 2132 push(@implContent, " JS${implType}* js${implType} = static_cast<JS${implType}*>(handle.get().asCell());\n"); 2133 push(@implContent, " DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);\n"); 2134 push(@implContent, " uncacheWrapper(world, js${implType}->impl(), js${implType});\n"); 2135 push(@implContent, "}\n"); 2129 if ($dataNode->extendedAttributes->{"CustomIsReachable"}) { 2130 if ($dataNode->extendedAttributes->{"CustomIsReachable"} eq "Frame") { 2131 push(@implContent, "bool JS${implType}Owner::isReachableFromOpaqueRoots(JSC::Handle<JSC::Unknown> handle, void*, SlotVisitor& visitor)\n"); 2132 push(@implContent, "{\n"); 2133 push(@implContent, " JS${implType}* js${implType} = static_cast<JS${implType}*>(handle.get().asCell());\n"); 2134 push(@implContent, " if (!js${implType}->hasCustomProperties())\n"); 2135 push(@implContent, " return false;\n"); 2136 push(@implContent, " Frame* frame = js${implType}->impl()->frame();\n"); 2137 push(@implContent, " if (!frame)\n"); 2138 push(@implContent, " return false;\n"); 2139 push(@implContent, " return visitor.containsOpaqueRoot(frame);\n"); 2140 push(@implContent, "}\n\n"); 2141 } 2142 2143 if (!$dataNode->extendedAttributes->{"CustomFinalize"}) { 2144 push(@implContent, "void JS${implType}Owner::finalize(JSC::Handle<JSC::Unknown> handle, void* context)\n"); 2145 push(@implContent, "{\n"); 2146 push(@implContent, " JS${implType}* js${implType} = static_cast<JS${implType}*>(handle.get().asCell());\n"); 2147 push(@implContent, " DOMWrapperWorld* world = static_cast<DOMWrapperWorld*>(context);\n"); 2148 push(@implContent, " uncacheWrapper(world, js${implType}->impl(), js${implType});\n"); 2149 push(@implContent, "}\n\n"); 2150 } 2136 2151 } 2137 2152 -
trunk/Source/WebCore/css/StyleMedia.h
r84731 r84736 41 41 } 42 42 43 Frame* frame() { return m_frame; } 43 44 void disconnectFrame() { m_frame = 0; } 44 45 -
trunk/Source/WebCore/css/StyleMedia.idl
r84731 r84736 26 26 27 27 module view { 28 interface StyleMedia { 28 interface [ 29 CustomIsReachable=Frame 30 ] StyleMedia { 29 31 readonly attribute DOMString type; 30 32 boolean matchMedium(in DOMString mediaquery); -
trunk/Source/WebCore/loader/appcache/DOMApplicationCache.idl
r84731 r84736 30 30 EventTarget, 31 31 OmitConstructor, 32 DontCheckEnums 32 DontCheckEnums, 33 CustomIsReachable 33 34 ] DOMApplicationCache { 34 35 // update status -
trunk/Source/WebCore/page/BarInfo.idl
r84731 r84736 29 29 module window { 30 30 31 interface [OmitConstructor] BarInfo { 31 interface [ 32 CustomIsReachable=Frame, 33 OmitConstructor 34 ] BarInfo { 32 35 readonly attribute boolean visible; 33 36 }; -
trunk/Source/WebCore/page/Console.idl
r84731 r84736 29 29 module window { 30 30 31 interface [OmitConstructor] Console { 31 interface [ 32 CustomIsReachable=Frame, 33 OmitConstructor 34 ] Console { 32 35 33 36 [CustomArgumentHandling] void debug(); -
trunk/Source/WebCore/page/DOMSelection.idl
r84731 r84736 32 32 // This is based off of Mozilla's Selection interface 33 33 // https://developer.mozilla.org/En/DOM/Selection 34 interface [OmitConstructor] DOMSelection { 34 interface [ 35 CustomIsReachable=Frame, 36 OmitConstructor 37 ] DOMSelection { 35 38 readonly attribute Node anchorNode; 36 39 readonly attribute long anchorOffset; -
trunk/Source/WebCore/page/DOMWindow.h
r84731 r84736 341 341 void finishedLoading(); 342 342 343 // These functions are used for GC marking. See JSDOMWindow::visitChildren(SlotVisitor&) in JSDOMWindowCustom.cpp.344 Screen* optionalScreen() const { return m_screen.get(); }345 DOMSelection* optionalSelection() const { return m_selection.get(); }346 History* optionalHistory() const { return m_history.get(); }347 Crypto* optionalCrypto() const { return m_crypto.get(); }348 BarInfo* optionalLocationbar() const { return m_locationbar.get(); }349 BarInfo* optionalMenubar() const { return m_menubar.get(); }350 BarInfo* optionalPersonalbar() const { return m_personalbar.get(); }351 BarInfo* optionalScrollbars() const { return m_scrollbars.get(); }352 BarInfo* optionalStatusbar() const { return m_statusbar.get(); }353 BarInfo* optionalToolbar() const { return m_toolbar.get(); }354 Console* optionalConsole() const { return m_console.get(); }355 Navigator* optionalNavigator() const { return m_navigator.get(); }356 Location* optionalLocation() const { return m_location.get(); }357 StyleMedia* optionalMedia() const { return m_media.get(); }358 359 343 using RefCounted<DOMWindow>::ref; 360 344 using RefCounted<DOMWindow>::deref; … … 378 362 Storage* sessionStorage(ExceptionCode&) const; 379 363 Storage* localStorage(ExceptionCode&) const; 380 Storage* optionalSessionStorage() const { return m_sessionStorage.get(); }381 Storage* optionalLocalStorage() const { return m_localStorage.get(); }382 364 #endif 383 365 … … 429 411 #if ENABLE(WEB_TIMING) 430 412 Performance* performance() const; 431 Performance* optionalPerformance() const { return m_performance.get(); }432 413 #endif 433 414 -
trunk/Source/WebCore/page/Geolocation.idl
r84731 r84736 26 26 module core { 27 27 28 interface [Conditional=GEOLOCATION, OmitConstructor] Geolocation { 28 interface [ 29 Conditional=GEOLOCATION, 30 CustomIsReachable=Frame, 31 OmitConstructor 32 ] Geolocation { 29 33 [Custom] void getCurrentPosition(in PositionCallback successCallback, in PositionErrorCallback errorCallback, in PositionOptions options); 30 34 -
trunk/Source/WebCore/page/History.idl
r84731 r84736 32 32 DelegatingGetOwnPropertySlot, 33 33 DelegatingPutFunction, 34 CustomIsReachable=Frame, 34 35 CustomDeleteProperty, 35 36 CustomGetPropertyNames, -
trunk/Source/WebCore/page/Location.idl
r84731 r84736 35 35 DelegatingGetOwnPropertySlot, 36 36 DelegatingPutFunction, 37 CustomIsReachable=Frame, 37 38 CustomDeleteProperty, 38 39 CustomGetPropertyNames, -
trunk/Source/WebCore/page/Navigator.h
r84731 r84736 58 58 59 59 Geolocation* geolocation() const; 60 // This is used for GC marking.61 Geolocation* optionalGeolocation() const { return m_geolocation.get(); }62 60 63 61 #if ENABLE(DOM_STORAGE) -
trunk/Source/WebCore/page/Navigator.idl
r84731 r84736 21 21 22 22 interface [ 23 Custom MarkFunction,23 CustomIsReachable=Frame, 24 24 OmitConstructor 25 25 ] Navigator { -
trunk/Source/WebCore/page/Screen.idl
r84731 r84736 30 30 module window { 31 31 32 interface [OmitConstructor] Screen { 32 interface [ 33 CustomIsReachable=Frame, 34 OmitConstructor 35 ] Screen { 33 36 readonly attribute unsigned long height; 34 37 readonly attribute unsigned long width; -
trunk/Source/WebCore/storage/Storage.idl
r84731 r84736 28 28 interface [ 29 29 HasNameGetter, 30 CustomIsReachable=Frame, 30 31 CustomDeleteProperty, 31 32 CustomGetPropertyNames,
Note: See TracChangeset
for help on using the changeset viewer.