Changeset 55424 in webkit
- Timestamp:
- Mar 2, 2010 12:48:21 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r55422 r55424 1 2010-03-02 Mads Ager <ager@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 [V8] V8 should be notified of context disposals 6 https://bugs.webkit.org/show_bug.cgi?id=35526 7 8 Notify V8 of context disposals to allow it to clean up memory from those 9 contexts when idle. When disposing a context, start a timer that will 10 give V8 an idle notification after a while to force cleanup. Use a timer 11 to avoid performing an idle notification in the middle of navigation where 12 we know we are not idle. 13 14 * WebCore.gypi: 15 * bindings/v8/V8DOMWindowShell.cpp: 16 (WebCore::V8DOMWindowShell::disposeContextHandles): 17 * bindings/v8/V8GCForContextDispose.cpp: Added. 18 (WebCore::V8GCForContextDispose::V8GCForContextDispose): 19 (WebCore::V8GCForContextDispose::notifyContextDisposed): 20 (WebCore::V8GCForContextDispose::notifyIdleSooner): 21 (WebCore::V8GCForContextDispose::instance): 22 (WebCore::V8GCForContextDispose::pseudoIdleTimerFired): 23 * bindings/v8/V8GCForContextDispose.h: Added. 24 * bindings/v8/custom/V8DOMWindowCustom.cpp: 25 (WebCore::WindowSetTimeoutImpl): 26 1 27 2010-03-02 Pavel Feldman <pfeldman@chromium.org> 2 28 -
trunk/WebCore/WebCore.gypi
r55422 r55424 858 858 'bindings/v8/V8GCController.cpp', 859 859 'bindings/v8/V8GCController.h', 860 'bindings/v8/V8GCForContextDispose.cpp', 861 'bindings/v8/V8GCForContextDispose.h', 860 862 'bindings/v8/V8Helpers.cpp', 861 863 'bindings/v8/V8Helpers.h', -
trunk/WebCore/bindings/v8/V8DOMWindowShell.cpp
r54718 r55424 52 52 #include "V8DOMWindow.h" 53 53 #include "V8Document.h" 54 #include "V8GCForContextDispose.h" 54 55 #include "V8HiddenPropertyName.h" 55 56 #include "V8History.h" … … 151 152 m_context.Dispose(); 152 153 m_context.Clear(); 154 155 // It's likely that disposing the context has created a lot of 156 // garbage. Notify V8 about this so it'll have a chance of cleaning 157 // it up when idle. 158 V8GCForContextDispose::instance().notifyContextDisposed(); 153 159 } 154 160 -
trunk/WebCore/bindings/v8/custom/V8DOMWindowCustom.cpp
r55096 r55424 56 56 #include "V8BindingState.h" 57 57 #include "V8CustomEventListener.h" 58 #include "V8GCForContextDispose.h" 58 59 #include "V8HTMLCollection.h" 59 60 #include "V8MessagePortCustom.h" … … 134 135 } else { 135 136 id = DOMTimer::install(scriptContext, new ScheduledAction(V8Proxy::context(imp->frame()), functionString), timeout, singleShot); 137 } 138 139 // Try to do the idle notification before the timeout expires to get better 140 // use of any idle time. Aim for the middle of the interval for simplicity. 141 if (timeout > 0) { 142 double maximumFireInterval = static_cast<double>(timeout) / 1000 / 2; 143 V8GCForContextDispose::instance().notifyIdleSooner(maximumFireInterval); 136 144 } 137 145 -
trunk/WebKit/chromium/ChangeLog
r55419 r55424 1 2010-03-02 Mads Ager <ager@chromium.org> 2 3 Reviewed by Adam Barth. 4 5 [V8] V8 should be notified of context disposals 6 https://bugs.webkit.org/show_bug.cgi?id=35526 7 8 Update V8 DEPS in order to get V8 API changes needed for context 9 disposal notifications. 10 11 * DEPS: 12 1 13 2010-03-02 Kenneth Russell <kbr@google.com> 2 14 -
trunk/WebKit/chromium/DEPS
r55318 r55424 44 44 'ots_rev': '26', 45 45 'skia_rev': '490', 46 'v8_rev': '39 63',46 'v8_rev': '3985', 47 47 48 48 # Windows:
Note: See TracChangeset
for help on using the changeset viewer.