Changeset 117015 in webkit
- Timestamp:
- May 14, 2012 4:47:53 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r117013 r117015 1 2012-05-14 Michael Saboff <msaboff@apple.com> 2 3 Enh: Add the Ability to Disable / Enable JavaScript GC Timer 4 https://bugs.webkit.org/show_bug.cgi?id=86382 5 6 Reviewed by Darin Adler. 7 8 Add flag to GCActivityCallback to enable / disable activity timer. 9 Add api via Heap to set the flag's value. 10 11 * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def: Windows export 12 * heap/Heap.cpp: 13 (JSC::Heap::setGarbageCollectionTimerEnabled): 14 * heap/Heap.h: 15 * runtime/GCActivityCallback.h: 16 (JSC::GCActivityCallback::isEnabled): 17 (JSC::GCActivityCallback::setEnabled): 18 (JSC::GCActivityCallback::GCActivityCallback): 19 * runtime/GCActivityCallbackCF.cpp: 20 (JSC::DefaultGCActivityCallbackPlatformData::timerDidFire): 21 1 22 2012-05-14 Michael Saboff <msaboff@apple.com> 2 23 -
trunk/Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
r116828 r117015 295 295 ?setDumpsGeneratedCode@BytecodeGenerator@JSC@@SAX_N@Z 296 296 ?setEnumerable@PropertyDescriptor@JSC@@QAEX_N@Z 297 ?setGarbageCollectionTimerEnabled@Heap@JSC@@QAEX_N@Z 297 298 ?setGetter@PropertyDescriptor@JSC@@QAEXVJSValue@2@@Z 298 299 ?setLoc@StatementNode@JSC@@QAEXHH@Z -
trunk/Source/JavaScriptCore/heap/Heap.cpp
r116822 r117015 833 833 } 834 834 835 void Heap::setGarbageCollectionTimerEnabled(bool enable) 836 { 837 activityCallback()->setEnabled(enable); 838 } 839 835 840 void Heap::didAllocate(size_t bytes) 836 841 { -
trunk/Source/JavaScriptCore/heap/Heap.h
r116025 r117015 101 101 JS_EXPORT_PRIVATE GCActivityCallback* activityCallback(); 102 102 JS_EXPORT_PRIVATE void setActivityCallback(PassOwnPtr<GCActivityCallback>); 103 JS_EXPORT_PRIVATE void setGarbageCollectionTimerEnabled(bool); 103 104 104 105 // true if an allocation or collection is in progress -
trunk/Source/JavaScriptCore/runtime/GCActivityCallback.h
r115915 r117015 48 48 virtual void synchronize() { } 49 49 virtual void cancel() { } 50 bool isEnabled() const { return m_enabled; } 51 void setEnabled(bool enabled) { m_enabled = enabled; } 50 52 51 53 protected: 52 GCActivityCallback() {} 54 GCActivityCallback() 55 : m_enabled(true) 56 { 57 } 58 59 bool m_enabled; 53 60 }; 54 61 -
trunk/Source/JavaScriptCore/runtime/GCActivityCallbackCF.cpp
r116043 r117015 64 64 { 65 65 Heap* heap = static_cast<Heap*>(info); 66 if (!heap->activityCallback()->isEnabled()) 67 return; 68 66 69 APIEntryShim shim(heap->globalData()); 67 70 #if !PLATFORM(IOS) -
trunk/Source/WebCore/ChangeLog
r117012 r117015 1 2012-05-14 Michael Saboff <msaboff@apple.com> 2 3 Enh: Add the Ability to Disable / Enable JavaScript GC Timer 4 https://bugs.webkit.org/show_bug.cgi?id=86382 5 6 Reviewed by Darin Adler. 7 8 Plumbing to set / clear JS GC activity timer enable flag. 9 10 * WebCore.exp.in: 11 * bindings/js/GCController.cpp: 12 (WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled): 13 * bindings/js/GCController.h: 14 1 15 2012-05-14 Nate Chapin <japhet@chromium.org> 2 16 -
trunk/Source/WebCore/WebCore.exp.in
r116828 r117015 251 251 __ZN7WebCore12GCController17garbageCollectNowEv 252 252 __ZN7WebCore12GCController18garbageCollectSoonEv 253 __ZN7WebCore12GCController41setJavaScriptGarbageCollectorTimerEnabledEb 253 254 __ZN7WebCore12GCController43garbageCollectOnAlternateThreadForDebuggingEb 254 255 __ZN7WebCore12PopupMenuMacC1EPNS_15PopupMenuClientE -
trunk/Source/WebCore/bindings/js/GCController.cpp
r115383 r117015 98 98 } 99 99 100 void GCController::setJavaScriptGarbageCollectorTimerEnabled(bool enable) 101 { 102 JSDOMWindow::commonJSGlobalData()->heap.setGarbageCollectionTimerEnabled(enable); 103 } 104 100 105 void GCController::discardAllCompiledCode() 101 106 { -
trunk/Source/WebCore/bindings/js/GCController.h
r115383 r117015 45 45 46 46 void garbageCollectOnAlternateThreadForDebugging(bool waitUntilDone); // Used for stress testing. 47 47 void setJavaScriptGarbageCollectorTimerEnabled(bool); 48 48 void discardAllCompiledCode(); 49 49 -
trunk/Source/WebKit/mac/ChangeLog
r116828 r117015 1 2012-05-14 Michael Saboff <msaboff@apple.com> 2 3 Enh: Add the Ability to Disable / Enable JavaScript GC Timer 4 https://bugs.webkit.org/show_bug.cgi?id=86382 5 6 Reviewed by Darin Adler. 7 8 Plumbing to set / clear JS GC activity timer enable flag. 9 10 * Misc/WebCoreStatistics.h: 11 * Misc/WebCoreStatistics.mm: 12 (+[WebCoreStatistics setJavaScriptGarbageCollectorTimerEnabled:]): 13 1 14 2012-05-11 Gavin Barraclough <barraclough@apple.com> 2 15 -
trunk/Source/WebKit/mac/Misc/WebCoreStatistics.h
r63521 r117015 48 48 + (void)garbageCollectJavaScriptObjects; 49 49 + (void)garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:(BOOL)waitUntilDone; 50 + (void)setJavaScriptGarbageCollectorTimerEnabled:(BOOL)enabled; 50 51 51 52 + (size_t)iconPageURLMappingCount; -
trunk/Source/WebKit/mac/Misc/WebCoreStatistics.mm
r80299 r117015 121 121 } 122 122 123 + (void)setJavaScriptGarbageCollectorTimerEnabled:(BOOL)enable 124 { 125 gcController().setJavaScriptGarbageCollectorTimerEnabled(enable); 126 } 127 123 128 + (size_t)iconPageURLMappingCount 124 129 { -
trunk/Source/WebKit2/ChangeLog
r116993 r117015 1 2012-05-14 Michael Saboff <msaboff@apple.com> 2 3 Enh: Add the Ability to Disable / Enable JavaScript GC Timer 4 https://bugs.webkit.org/show_bug.cgi?id=86382 5 6 Reviewed by Darin Adler. 7 8 Plumbing to set / clear JS GC activity timer enable flag. 9 10 * UIProcess/API/C/WKContext.cpp: 11 (WKContextSetJavaScriptGarbageCollectorTimerEnabled): 12 * UIProcess/API/C/WKContext.h: 13 * UIProcess/WebContext.cpp: 14 (WebKit::WebContext::setJavaScriptGarbageCollectorTimerEnabled): 15 * UIProcess/WebContext.h: 16 * WebProcess/WebProcess.cpp: 17 (WebKit::WebProcess::setJavaScriptGarbageCollectorTimerEnabled): 18 * WebProcess/WebProcess.h: 19 * WebProcess/WebProcess.messages.in: 20 1 21 2012-05-14 Anders Carlsson <andersca@apple.com> 2 22 -
trunk/Source/WebKit2/UIProcess/API/C/WKContext.cpp
r110425 r117015 266 266 } 267 267 268 void WKContextSetJavaScriptGarbageCollectorTimerEnabled(WKContextRef contextRef, bool enable) 269 { 270 toImpl(contextRef)->setJavaScriptGarbageCollectorTimerEnabled(enable); 271 } 268 272 // Deprecated functions. 269 273 void _WKContextSetAdditionalPluginsDirectory(WKContextRef context, WKStringRef pluginsDirectory) -
trunk/Source/WebKit2/UIProcess/API/C/WKContext.h
r101307 r117015 157 157 158 158 WK_EXPORT void WKContextGarbageCollectJavaScriptObjects(WKContextRef context); 159 WK_EXPORT void WKContextSetJavaScriptGarbageCollectorTimerEnabled(WKContextRef context, bool enable); 159 160 160 161 #ifdef __cplusplus -
trunk/Source/WebKit2/UIProcess/WebContext.cpp
r116971 r117015 957 957 } 958 958 959 void WebContext::setJavaScriptGarbageCollectorTimerEnabled(bool flag) 960 { 961 sendToAllProcesses(Messages::WebProcess::SetJavaScriptGarbageCollectorTimerEnabled(flag)); 962 } 963 959 964 void WebContext::didReceiveMessageOnConnectionWorkQueue(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, bool& didHandleMessage) 960 965 { -
trunk/Source/WebKit2/UIProcess/WebContext.h
r116796 r117015 195 195 void getWebCoreStatistics(PassRefPtr<DictionaryCallback>); 196 196 void garbageCollectJavaScriptObjects(); 197 void setJavaScriptGarbageCollectorTimerEnabled(bool flag); 197 198 198 199 #if PLATFORM(MAC) -
trunk/Source/WebKit2/WebProcess/WebProcess.cpp
r116796 r117015 963 963 } 964 964 965 void WebProcess::setJavaScriptGarbageCollectorTimerEnabled(bool flag) 966 { 967 gcController().setJavaScriptGarbageCollectorTimerEnabled(flag); 968 } 969 965 970 #if ENABLE(PLUGIN_PROCESS) 966 971 void WebProcess::pluginProcessCrashed(CoreIPC::Connection*, const String& pluginPath) -
trunk/Source/WebKit2/WebProcess/WebProcess.h
r116796 r117015 217 217 void getWebCoreStatistics(uint64_t callbackID); 218 218 void garbageCollectJavaScriptObjects(); 219 void setJavaScriptGarbageCollectorTimerEnabled(bool flag); 219 220 220 221 #if PLATFORM(MAC) -
trunk/Source/WebKit2/WebProcess/WebProcess.messages.in
r116796 r117015 78 78 GetWebCoreStatistics(uint64_t callbackID) 79 79 GarbageCollectJavaScriptObjects() 80 SetJavaScriptGarbageCollectorTimerEnabled(bool enable) 80 81 81 82 #if PLATFORM(MAC)
Note: See TracChangeset
for help on using the changeset viewer.