Remove unneeded ScriptGCEvent class
authordarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Oct 2013 17:15:26 +0000 (17:15 +0000)
committerdarin@apple.com <darin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 6 Oct 2013 17:15:26 +0000 (17:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=122390

Reviewed by Anders Carlsson.

Source/ThirdParty:

* gtest/xcode/gtest.xcodeproj/project.pbxproj: Let Xcode update this file.
Not really part of this bug fix, but good to land anyway.

Source/WebCore:

* GNUmakefile.list.am: Removed ScriptGCEvent files.
* Target.pri: Ditto.
* UseJSC.cmake: Ditto.
* WebCore.exp.in: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditto.
* bindings/js/JSBindingsAllInOne.cpp: Ditto.
* bindings/js/ScriptGCEvent.cpp: Removed.
* bindings/js/ScriptGCEvent.h: Removed.

* inspector/InspectorMemoryAgent.cpp: Removed include.

* inspector/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::start): Removed GC event listening.
Some day we might add it back, but for now it is dead code.
(WebCore::InspectorTimelineAgent::stop): Ditto.
(WebCore::usedHeapSize): Renamed from getUsedHeapSize and put the
implementation here instead of indirecting through ScriptGCEvent.
(WebCore::InspectorTimelineAgent::setDOMCounters): Updated for above changes.
(WebCore::InspectorTimelineAgent::didCompleteCurrentRecord): Ditto.
(WebCore::InspectorTimelineAgent::pushCurrentRecord): Ditto.

* inspector/InspectorTimelineAgent.h: Removed include.

* inspector/ScriptGCEventListener.h: Removed.

* testing/MemoryInfo.h: Updated to get heap capacity and size directly
instead of going through ScriptGCEvent.

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
Replaced symbol from ScriptGCEvent with symbol from JSDOMWindowBase.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@156989 268f45cc-cd09-0410-ab3c-d52691b4dbfc

19 files changed:
Source/ThirdParty/ChangeLog
Source/ThirdParty/gtest/xcode/gtest.xcodeproj/project.pbxproj
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/UseJSC.cmake
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSBindingsAllInOne.cpp
Source/WebCore/bindings/js/ScriptGCEvent.cpp [deleted file]
Source/WebCore/bindings/js/ScriptGCEvent.h [deleted file]
Source/WebCore/inspector/InspectorMemoryAgent.cpp
Source/WebCore/inspector/InspectorTimelineAgent.cpp
Source/WebCore/inspector/InspectorTimelineAgent.h
Source/WebCore/inspector/ScriptGCEventListener.h [deleted file]
Source/WebCore/testing/MemoryInfo.h
Source/WebKit/ChangeLog
Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in

index d291407be1541dfa680d941c1ed44a0b3c2f7737..085015614407571debc56fb525e20efccce26fc7 100644 (file)
@@ -1,3 +1,13 @@
+2013-10-06  Darin Adler  <darin@apple.com>
+
+        Remove unneeded ScriptGCEvent class
+        https://bugs.webkit.org/show_bug.cgi?id=122390
+
+        Reviewed by Anders Carlsson.
+
+        * gtest/xcode/gtest.xcodeproj/project.pbxproj: Let Xcode update this file.
+        Not really part of this bug fix, but good to land anyway.
+
 2013-09-29  Darin Adler  <darin@apple.com>
 
         Take some Xcode advice about turning on additional warnings in ANGLE and gtest
index 91f1351f000fca64cca1afc786b1822190871dad..397d1d0e75efec67a366e0c6447ae5bb1b4a62c2 100644 (file)
@@ -3,7 +3,7 @@
        archiveVersion = 1;
        classes = {
        };
-       objectVersion = 42;
+       objectVersion = 46;
        objects = {
 
 /* Begin PBXAggregateTarget section */
 /* Begin PBXProject section */
                0867D690FE84028FC02AAC07 /* Project object */ = {
                        isa = PBXProject;
+                       attributes = {
+                               LastUpgradeCheck = 0500;
+                       };
                        buildConfigurationList = 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "gtest" */;
-                       compatibilityVersion = "Xcode 2.4";
+                       compatibilityVersion = "Xcode 3.2";
                        developmentRegion = English;
                        hasScannedForEncodings = 1;
                        knownRegions = (
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 44C48DFF14A4098F00A2D9C7 /* ProductionProject.xcconfig */;
                        buildSettings = {
+                               CLANG_WARN_BOOL_CONVERSION = YES;
+                               CLANG_WARN_ENUM_CONVERSION = YES;
+                               CLANG_WARN_INT_CONVERSION = YES;
                        };
                        name = Production;
                };
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 40D4CDF20E30E07400294801 /* FrameworkTarget.xcconfig */;
                        buildSettings = {
+                               COMBINE_HIDPI_IMAGES = YES;
                                DYLIB_COMPATIBILITY_VERSION = 1;
                                DYLIB_CURRENT_VERSION = 1;
                                INFOPLIST_FILE = Resources/Info.plist;
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 40D4CDF20E30E07400294801 /* FrameworkTarget.xcconfig */;
                        buildSettings = {
+                               COMBINE_HIDPI_IMAGES = YES;
                                DYLIB_COMPATIBILITY_VERSION = 1;
                                DYLIB_CURRENT_VERSION = 1;
                                INFOPLIST_FILE = Resources/Info.plist;
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 40D4CDF20E30E07400294801 /* FrameworkTarget.xcconfig */;
                        buildSettings = {
+                               COMBINE_HIDPI_IMAGES = YES;
                                DYLIB_COMPATIBILITY_VERSION = 1;
                                DYLIB_CURRENT_VERSION = 1;
                                INFOPLIST_FILE = Resources/Info.plist;
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 40D4CDF10E30E07400294801 /* DebugProject.xcconfig */;
                        buildSettings = {
+                               CLANG_WARN_BOOL_CONVERSION = YES;
+                               CLANG_WARN_ENUM_CONVERSION = YES;
+                               CLANG_WARN_INT_CONVERSION = YES;
+                               ONLY_ACTIVE_ARCH = YES;
                        };
                        name = Debug;
                };
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 40D4CDF40E30E07400294801 /* ReleaseProject.xcconfig */;
                        buildSettings = {
+                               CLANG_WARN_BOOL_CONVERSION = YES;
+                               CLANG_WARN_ENUM_CONVERSION = YES;
+                               CLANG_WARN_INT_CONVERSION = YES;
                        };
                        name = Release;
                };
index e93e390472c697fce4227b7b4dd6f96c88f13246..60ebdc93708c5e9d1b60918c9ac25933f2e93414 100644 (file)
@@ -1,3 +1,40 @@
+2013-10-06  Darin Adler  <darin@apple.com>
+
+        Remove unneeded ScriptGCEvent class
+        https://bugs.webkit.org/show_bug.cgi?id=122390
+
+        Reviewed by Anders Carlsson.
+
+        * GNUmakefile.list.am: Removed ScriptGCEvent files.
+        * Target.pri: Ditto.
+        * UseJSC.cmake: Ditto.
+        * WebCore.exp.in: Ditto.
+        * WebCore.vcxproj/WebCore.vcxproj: Ditto.
+        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditto.
+        * bindings/js/JSBindingsAllInOne.cpp: Ditto.
+        * bindings/js/ScriptGCEvent.cpp: Removed.
+        * bindings/js/ScriptGCEvent.h: Removed.
+
+        * inspector/InspectorMemoryAgent.cpp: Removed include.
+
+        * inspector/InspectorTimelineAgent.cpp:
+        (WebCore::InspectorTimelineAgent::start): Removed GC event listening.
+        Some day we might add it back, but for now it is dead code.
+        (WebCore::InspectorTimelineAgent::stop): Ditto.
+        (WebCore::usedHeapSize): Renamed from getUsedHeapSize and put the
+        implementation here instead of indirecting through ScriptGCEvent.
+        (WebCore::InspectorTimelineAgent::setDOMCounters): Updated for above changes.
+        (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord): Ditto.
+        (WebCore::InspectorTimelineAgent::pushCurrentRecord): Ditto.
+
+        * inspector/InspectorTimelineAgent.h: Removed include.
+
+        * inspector/ScriptGCEventListener.h: Removed.
+
+        * testing/MemoryInfo.h: Updated to get heap capacity and size directly
+        instead of going through ScriptGCEvent.
+
 2013-10-06  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Generate toCSSFooValue() for CSSCursorImageValue, CSSCubicBezierTimingFunctionValue, CSSStepsTimingFunctionValue and CSSUnicodeRangeValue
index 49573bd7eb5658c6f984dd4c474e8df95a85e9b4..106bb00b0533702ad5bd638b32ae82ce06ce3ec3 100644 (file)
@@ -2382,8 +2382,6 @@ webcore_sources += \
        Source/WebCore/bindings/js/ScriptDebugServer.h \
        Source/WebCore/bindings/js/ScriptFunctionCall.cpp \
        Source/WebCore/bindings/js/ScriptFunctionCall.h \
-       Source/WebCore/bindings/js/ScriptGCEvent.cpp \
-       Source/WebCore/bindings/js/ScriptGCEvent.h \
        Source/WebCore/bindings/js/ScriptHeapSnapshot.h \
        Source/WebCore/bindings/js/ScriptObject.cpp \
        Source/WebCore/bindings/js/ScriptObject.h \
@@ -3812,7 +3810,6 @@ webcore_sources += \
        Source/WebCore/inspector/ScriptCallStack.cpp \
        Source/WebCore/inspector/ScriptCallStack.h \
        Source/WebCore/inspector/ScriptDebugListener.h \
-       Source/WebCore/inspector/ScriptGCEventListener.h \
        Source/WebCore/inspector/TimelineRecordFactory.cpp \
        Source/WebCore/inspector/TimelineRecordFactory.h \
        Source/WebCore/inspector/WorkerConsoleAgent.cpp \
index 266a7b164c737c279e14d28c7ae962c358c05c7f..5f4e0ad84f5b5e9171a0e71355845c6340390a52 100644 (file)
@@ -126,7 +126,6 @@ list(APPEND WebCore_SOURCES
     bindings/js/ScriptController.cpp
     bindings/js/ScriptDebugServer.cpp
     bindings/js/ScriptFunctionCall.cpp
-    bindings/js/ScriptGCEvent.cpp
     bindings/js/ScriptObject.cpp
     bindings/js/ScriptProfile.cpp
     bindings/js/ScriptProfiler.cpp
index ec1f23eaa7f043216b5a6e992b69e2b8bd2662be..9ad714e043ca5dd9c65714cbe53c8385214230d9 100644 (file)
@@ -282,7 +282,6 @@ __ZN7WebCore13QualifiedNameD1Ev
 __ZN7WebCore13ResourceErrorC1EP7NSError
 __ZN7WebCore13ResourceErrorC1EP9__CFError
 __ZN7WebCore13SQLResultDoneE
-__ZN7WebCore13ScriptGCEvent11getHeapSizeERNS_8HeapInfoE
 __ZN7WebCore13StyledElement22setInlineStylePropertyENS_13CSSPropertyIDERKN3WTF6StringEb
 __ZN7WebCore13StyledElement22setInlineStylePropertyENS_13CSSPropertyIDEdNS_17CSSPrimitiveValue9UnitTypesEb
 __ZN7WebCore13cookiesForDOMERKNS_21NetworkStorageSessionERKNS_3URLES5_
index 9c5262e8e36c0da7d0f9b8bb2b3617135f77655e..8f60c3a7658f9295b34ace7556ca6d5529d9bcaf 100644 (file)
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
       <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
     </ClCompile>
-    <ClCompile Include="..\bindings\js\ScriptGCEvent.cpp">
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug_WinCairo|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='DebugSuffix|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>
-      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>
-    </ClCompile>
     <ClCompile Include="..\bindings\js\ScriptObject.cpp" />
     <ClCompile Include="..\bindings\js\ScriptProfile.cpp" />
     <ClCompile Include="..\bindings\js\ScriptProfiler.cpp">
     <ClInclude Include="..\bindings\js\ScriptController.h" />
     <ClInclude Include="..\bindings\js\ScriptDebugServer.h" />
     <ClInclude Include="..\bindings\js\ScriptFunctionCall.h" />
-    <ClInclude Include="..\bindings\js\ScriptGCEvent.h" />
     <ClInclude Include="..\bindings\js\ScriptHeapSnapshot.h" />
     <ClInclude Include="..\bindings\js\ScriptObject.h" />
     <ClInclude Include="..\bindings\js\ScriptProfile.h" />
index 7327a3a8fa61bf8e8a178eeaa8c0ff005bf2b737..0b2372f770a5f30657e00e34b720db75b05eba7e 100644 (file)
     <ClCompile Include="..\bindings\js\ScriptFunctionCall.cpp">
       <Filter>bindings\js</Filter>
     </ClCompile>
-    <ClCompile Include="..\bindings\js\ScriptGCEvent.cpp">
-      <Filter>bindings\js</Filter>
-    </ClCompile>
     <ClCompile Include="..\bindings\js\ScriptObject.cpp">
       <Filter>bindings\js</Filter>
     </ClCompile>
     <ClInclude Include="..\bindings\js\ScriptFunctionCall.h">
       <Filter>bindings\js</Filter>
     </ClInclude>
-    <ClInclude Include="..\bindings\js\ScriptGCEvent.h">
-      <Filter>bindings\js</Filter>
-    </ClInclude>
     <ClInclude Include="..\bindings\js\ScriptHeapSnapshot.h">
       <Filter>bindings\js</Filter>
     </ClInclude>
index a631d44fc67d08253f65ec4394e9cac71c74e225..99c3e41eafb2e98768f1e136257aaf4da2fc7c24 100644 (file)
                4FA3B90A125CD12200300BAD /* InspectorState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FA3B908125CD12100300BAD /* InspectorState.cpp */; };
                4FA3B90B125CD12200300BAD /* InspectorState.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FA3B909125CD12200300BAD /* InspectorState.h */; };
                4FB390AD15EF61F3007AD51F /* GeneratedImage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FB390AC15EF61F3007AD51F /* GeneratedImage.cpp */; };
-               4FD8D0F2119C718B002FA825 /* ScriptGCEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */; };
-               4FD8D0F3119C718B002FA825 /* ScriptGCEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */; };
                4FFC022B1643B710004E1638 /* NodeRareData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB48661643A67E00F70C07 /* NodeRareData.cpp */; };
                4FFC022D1643B726004E1638 /* ElementRareData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4FAB48641643A66D00F70C07 /* ElementRareData.cpp */; };
                501BAAA913950E2C00F7ACEB /* WindRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 501BAAA813950E2C00F7ACEB /* WindRule.h */; settings = {ATTRIBUTES = (Private, ); }; };
                4FAB48641643A66D00F70C07 /* ElementRareData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ElementRareData.cpp; sourceTree = "<group>"; };
                4FAB48661643A67E00F70C07 /* NodeRareData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = NodeRareData.cpp; sourceTree = "<group>"; };
                4FB390AC15EF61F3007AD51F /* GeneratedImage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GeneratedImage.cpp; sourceTree = "<group>"; };
-               4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptGCEvent.cpp; sourceTree = "<group>"; };
-               4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptGCEvent.h; sourceTree = "<group>"; };
                501BAAA813950E2C00F7ACEB /* WindRule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindRule.h; sourceTree = "<group>"; };
                5038BC0614711CDB0095E0D1 /* WebKitCSSShaderValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebKitCSSShaderValue.cpp; sourceTree = "<group>"; };
                5038BE2D1472AD230095E0D1 /* StyleCachedShader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleCachedShader.cpp; path = style/StyleCachedShader.cpp; sourceTree = "<group>"; };
                                9F6FC1951122E82A00E80196 /* ScriptDebugServer.h */,
                                41002CCC0F66EDEF009E660D /* ScriptFunctionCall.cpp */,
                                41002CCB0F66EDEF009E660D /* ScriptFunctionCall.h */,
-                               4FD8D0F0119C718B002FA825 /* ScriptGCEvent.cpp */,
-                               4FD8D0F1119C718B002FA825 /* ScriptGCEvent.h */,
                                9F3B947D12241758005304E7 /* ScriptHeapSnapshot.h */,
                                41F066E30F64BCF600A07EAC /* ScriptObject.cpp */,
                                41F066E20F64BCF600A07EAC /* ScriptObject.h */,
                                08A484780E5272C500C3FE76 /* ScriptElement.h in Headers */,
                                E11C9D9B0EB3681200E409DB /* ScriptExecutionContext.h in Headers */,
                                41002CCD0F66EDEF009E660D /* ScriptFunctionCall.h in Headers */,
-                               4FD8D0F3119C718B002FA825 /* ScriptGCEvent.h in Headers */,
                                9F3B947E12241758005304E7 /* ScriptHeapSnapshot.h in Headers */,
                                41F066E40F64BCF600A07EAC /* ScriptObject.h in Headers */,
                                FD31603612B0267600C1A359 /* ScriptProcessorNode.h in Headers */,
                                08A484770E5272C500C3FE76 /* ScriptElement.cpp in Sources */,
                                E11C9DB00EB3699500E409DB /* ScriptExecutionContext.cpp in Sources */,
                                41002CCE0F66EDEF009E660D /* ScriptFunctionCall.cpp in Sources */,
-                               4FD8D0F2119C718B002FA825 /* ScriptGCEvent.cpp in Sources */,
                                41F066E50F64BCF600A07EAC /* ScriptObject.cpp in Sources */,
                                FD31603512B0267600C1A359 /* ScriptProcessorNode.cpp in Sources */,
                                F33F0282120947F200E5743A /* ScriptProfile.cpp in Sources */,
index d3d5ac7459337ae7401b5755cf15056852f8400c..525eeda2c2be666d930de2a4f96c15e91a5d892e 100644 (file)
 #include "ScriptController.cpp"
 #include "ScriptDebugServer.cpp"
 #include "ScriptFunctionCall.cpp"
-#include "ScriptGCEvent.cpp"
 #include "ScriptProfiler.cpp"
 #include "ScriptState.cpp"
 #include "SerializedScriptValue.cpp"
diff --git a/Source/WebCore/bindings/js/ScriptGCEvent.cpp b/Source/WebCore/bindings/js/ScriptGCEvent.cpp
deleted file mode 100644 (file)
index 2acb307..0000000
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "ScriptGCEvent.h"
-
-#include "JSDOMWindow.h"
-#include <heap/Heap.h>
-#include <runtime/VM.h>
-#include <wtf/CurrentTime.h>
-
-namespace WebCore {
-
-using namespace JSC;
-
-void ScriptGCEvent::getHeapSize(HeapInfo& info)
-{
-    VM* vm = JSDOMWindow::commonVM();
-    info.totalJSHeapSize = vm->heap.capacity();
-    info.usedJSHeapSize = vm->heap.size();
-}
-
-} // namespace WebCore
diff --git a/Source/WebCore/bindings/js/ScriptGCEvent.h b/Source/WebCore/bindings/js/ScriptGCEvent.h
deleted file mode 100644 (file)
index b69a794..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ScriptGCEvent_h
-#define ScriptGCEvent_h
-
-namespace WebCore {
-
-struct HeapInfo {
-    HeapInfo()
-        : usedJSHeapSize(0)
-        , totalJSHeapSize(0)
-    {
-    }
-
-    size_t usedJSHeapSize;
-    size_t totalJSHeapSize;
-};
-
-class ScriptGCEventListener;
-
-class ScriptGCEvent
-{
-public:
-    static void addEventListener(ScriptGCEventListener*) { }
-    static void removeEventListener(ScriptGCEventListener*) { }
-    static void getHeapSize(HeapInfo&);
-};
-
-} // namespace WebCore
-
-#endif // !defined(ScriptGCEvent_h)
index 8186884a516a305eb6868a48ade21e14a5bee7d6..7bc0e7bb9da3bb4eac92a0bc2339b8c67cb5fe3f 100644 (file)
@@ -47,7 +47,6 @@
 #include "MemoryCache.h"
 #include "Node.h"
 #include "NodeTraversal.h"
-#include "ScriptGCEvent.h"
 #include "ScriptProfiler.h"
 #include "StyledElement.h"
 #include <runtime/ArrayBufferView.h>
index 0aad63978e704dd58a425dc9c88353c099c9b8c7..a121a14a7e4cec679c11401f83c0b274bb4d3818 100644 (file)
 #include "InspectorState.h"
 #include "InstrumentingAgents.h"
 #include "IntRect.h"
+#include "JSDOMWindow.h"
 #include "RenderElement.h"
 #include "RenderView.h"
 #include "ResourceRequest.h"
 #include "ResourceResponse.h"
 #include "TimelineRecordFactory.h"
-
 #include <wtf/CurrentTime.h>
 
 namespace WebCore {
@@ -69,26 +69,6 @@ void TimelineTimeConverter::reset()
     m_startOffset = monotonicallyIncreasingTime() - currentTime();
 }
 
-void InspectorTimelineAgent::pushGCEventRecords()
-{
-    if (!m_gcEvents.size())
-        return;
-
-    GCEvents events = m_gcEvents;
-    m_gcEvents.clear();
-    for (GCEvents::iterator i = events.begin(); i != events.end(); ++i) {
-        RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(m_timeConverter.fromMonotonicallyIncreasingTime(i->startTime), m_maxCallStackDepth);
-        record->setObject("data", TimelineRecordFactory::createGCEventData(i->collectedBytes));
-        record->setNumber("endTime", m_timeConverter.fromMonotonicallyIncreasingTime(i->endTime));
-        addRecordToTimeline(record.release(), TimelineRecordType::GCEvent);
-    }
-}
-
-void InspectorTimelineAgent::didGC(double startTime, double endTime, size_t collectedBytesCount)
-{
-    m_gcEvents.append(GCEvent(startTime, endTime, collectedBytesCount));
-}
-
 InspectorTimelineAgent::~InspectorTimelineAgent()
 {
     clearFrontend();
@@ -132,7 +112,6 @@ void InspectorTimelineAgent::start(ErrorString*, const int* maxCallStackDepth, c
     m_timeConverter.reset();
 
     m_instrumentingAgents->setInspectorTimelineAgent(this);
-    ScriptGCEvent::addEventListener(this);
     m_state->setBoolean(TimelineAgentState::timelineAgentEnabled, true);
 }
 
@@ -143,10 +122,8 @@ void InspectorTimelineAgent::stop(ErrorString*)
 
     m_weakFactory.revokeAll();
     m_instrumentingAgents->setInspectorTimelineAgent(0);
-    ScriptGCEvent::removeEventListener(this);
 
     clearRecordStack();
-    m_gcEvents.clear();
 
     m_state->setBoolean(TimelineAgentState::timelineAgentEnabled, false);
 }
@@ -528,8 +505,6 @@ static TypeBuilder::Timeline::EventType::Enum toProtocol(TimelineRecordType type
 
     case TimelineRecordType::FunctionCall:
         return TypeBuilder::Timeline::EventType::FunctionCall;
-    case TimelineRecordType::GCEvent:
-        return TypeBuilder::Timeline::EventType::GCEvent;
 
     case TimelineRecordType::RequestAnimationFrame:
         return TypeBuilder::Timeline::EventType::RequestAnimationFrame;
@@ -567,16 +542,14 @@ void InspectorTimelineAgent::innerAddRecordToTimeline(PassRefPtr<InspectorObject
     }
 }
 
-static size_t getUsedHeapSize()
+static size_t usedHeapSize()
 {
-    HeapInfo info;
-    ScriptGCEvent::getHeapSize(info);
-    return info.usedJSHeapSize;
+    return JSDOMWindow::commonVM()->heap.size();
 }
 
 void InspectorTimelineAgent::setDOMCounters(TypeBuilder::Timeline::TimelineEvent* record)
 {
-    record->setUsedHeapSize(getUsedHeapSize());
+    record->setUsedHeapSize(usedHeapSize());
 
     if (m_state->getBoolean(TimelineAgentState::includeDomCounters)) {
         int documentCount = 0;
@@ -609,14 +582,13 @@ void InspectorTimelineAgent::didCompleteCurrentRecord(TimelineRecordType type)
     // An empty stack could merely mean that the timeline agent was turned on in the middle of
     // an event.  Don't treat as an error.
     if (!m_recordStack.isEmpty()) {
-        pushGCEventRecords();
         TimelineRecordEntry entry = m_recordStack.last();
         m_recordStack.removeLast();
         ASSERT(entry.type == type);
         entry.record->setObject("data", entry.data);
         entry.record->setArray("children", entry.children);
         entry.record->setNumber("endTime", timestamp());
-        size_t usedHeapSizeDelta = getUsedHeapSize() - entry.usedHeapSizeAtStart;
+        size_t usedHeapSizeDelta = usedHeapSize() - entry.usedHeapSizeAtStart;
         if (usedHeapSizeDelta)
             entry.record->setNumber("usedHeapSizeDelta", usedHeapSizeDelta);
         addRecordToTimeline(entry.record, type);
@@ -638,7 +610,6 @@ InspectorTimelineAgent::InspectorTimelineAgent(InstrumentingAgents* instrumentin
 
 void InspectorTimelineAgent::appendRecord(PassRefPtr<InspectorObject> data, TimelineRecordType type, bool captureCallStack, Frame* frame)
 {
-    pushGCEventRecords();
     RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(timestamp(), captureCallStack ? m_maxCallStackDepth : 0);
     record->setObject("data", data);
     setFrameIdentifier(record.get(), frame);
@@ -654,11 +625,10 @@ void InspectorTimelineAgent::sendEvent(PassRefPtr<InspectorObject> event)
 
 void InspectorTimelineAgent::pushCurrentRecord(PassRefPtr<InspectorObject> data, TimelineRecordType type, bool captureCallStack, Frame* frame)
 {
-    pushGCEventRecords();
     commitFrameRecord();
     RefPtr<InspectorObject> record = TimelineRecordFactory::createGenericRecord(timestamp(), captureCallStack ? m_maxCallStackDepth : 0);
     setFrameIdentifier(record.get(), frame);
-    m_recordStack.append(TimelineRecordEntry(record.release(), data, InspectorArray::create(), type, getUsedHeapSize()));
+    m_recordStack.append(TimelineRecordEntry(record.release(), data, InspectorArray::create(), type, usedHeapSize()));
 }
 
 void InspectorTimelineAgent::commitFrameRecord()
index 8f3f3c2ae56f5d0f69c5302e35809d3d8c6a76ba..a572f9b58e640960862fd21a708609e36980939c 100644 (file)
@@ -37,8 +37,6 @@
 #include "InspectorFrontend.h"
 #include "InspectorValues.h"
 #include "LayoutRect.h"
-#include "ScriptGCEvent.h"
-#include "ScriptGCEventListener.h"
 #include <wtf/PassOwnPtr.h>
 #include <wtf/Vector.h>
 #include <wtf/WeakPtr.h>
@@ -100,7 +98,6 @@ ENUM_CLASS(TimelineRecordType) {
     XHRLoad,
 
     FunctionCall,
-    GCEvent,
 
     RequestAnimationFrame,
     CancelAnimationFrame,
@@ -127,7 +124,6 @@ private:
 
 class InspectorTimelineAgent
     : public InspectorBaseAgent<InspectorTimelineAgent>
-    , public ScriptGCEventListener
     , public InspectorBackendDispatcher::TimelineCommandHandler {
     WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent);
 public:
@@ -223,9 +219,6 @@ public:
     void didDestroyWebSocket(unsigned long identifier, Frame*);
 #endif
 
-    // ScriptGCEventListener methods.
-    virtual void didGC(double, double, size_t);
-
 private:
     friend class TimelineRecordStack;
 
@@ -249,7 +242,6 @@ private:
 
     void setDOMCounters(TypeBuilder::Timeline::TimelineEvent* record);
     void setFrameIdentifier(InspectorObject* record, Frame*);
-    void pushGCEventRecords();
 
     void didCompleteCurrentRecord(TimelineRecordType);
 
@@ -275,17 +267,6 @@ private:
     Vector<TimelineRecordEntry> m_recordStack;
 
     int m_id;
-    struct GCEvent {
-        GCEvent(double startTime, double endTime, size_t collectedBytes)
-            : startTime(startTime), endTime(endTime), collectedBytes(collectedBytes)
-        {
-        }
-        double startTime;
-        double endTime;
-        size_t collectedBytes;
-    };
-    typedef Vector<GCEvent> GCEvents;
-    GCEvents m_gcEvents;
     int m_maxCallStackDepth;
     RefPtr<InspectorObject> m_pendingFrameRecord;
     InspectorType m_inspectorType;
diff --git a/Source/WebCore/inspector/ScriptGCEventListener.h b/Source/WebCore/inspector/ScriptGCEventListener.h
deleted file mode 100644 (file)
index 0850f0c..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- *     * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- *     * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ScriptGCEventListener_h
-#define ScriptGCEventListener_h
-
-#if ENABLE(INSPECTOR)
-
-namespace WebCore {
-
-class ScriptGCEventListener
-{
-public:
-    virtual void didGC(double startTime, double endTime, size_t collectedBytes) = 0;
-    virtual ~ScriptGCEventListener(){}
-};
-    
-} // namespace WebCore
-
-#endif // !ENABLE(INSPECTOR)
-#endif // !defined(ScriptGCEventListener_h)
index 94158b6cb1efc7e8fbbe81f25f1499ed73ff70ba..d4d298443e1e13ec2d1ab51a7d27da051d7fe8e3 100644 (file)
@@ -31,7 +31,7 @@
 #ifndef MemoryInfo_h
 #define MemoryInfo_h
 
-#include "ScriptGCEvent.h"
+#include "JSDOMWindow.h"
 #include <wtf/PassRefPtr.h>
 #include <wtf/RefCounted.h>
 
@@ -41,16 +41,18 @@ class MemoryInfo : public RefCounted<MemoryInfo> {
 public:
     static PassRefPtr<MemoryInfo> create() { return adoptRef(new MemoryInfo); }
 
-    size_t usedJSHeapSize() const { return m_info.usedJSHeapSize; }
-    size_t totalJSHeapSize() const { return m_info.totalJSHeapSize; }
+    size_t usedJSHeapSize() const { return m_usedJSHeapSize; }
+    size_t totalJSHeapSize() const { return m_totalJSHeapSize; }
 
 private:
-    explicit MemoryInfo()
+    MemoryInfo()
+        : m_usedJSHeapSize(JSDOMWindow::commonVM()->heap.size())
+        , m_totalJSHeapSize(JSDOMWindow::commonVM()->heap.capacity())
     {
-        ScriptGCEvent::getHeapSize(m_info);
     }
 
-    HeapInfo m_info;
+    size_t m_usedJSHeapSize;
+    size_t m_totalJSHeapSize;
 };
 
 } // namespace WebCore
index 9bb655ee8a771f10b3b288896e75b1f06c4a953e..0099242a7cee0b04fa41da047016f53e3571ec37 100644 (file)
@@ -1,3 +1,13 @@
+2013-10-06  Darin Adler  <darin@apple.com>
+
+        Remove unneeded ScriptGCEvent class
+        https://bugs.webkit.org/show_bug.cgi?id=122390
+
+        Reviewed by Anders Carlsson.
+
+        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
+        Replaced symbol from ScriptGCEvent with symbol from JSDOMWindowBase.
+
 2013-10-04  Daniel Bates  <dabates@apple.com>
 
         [iOS] Upstream disk image cache
index 4dbc3f84b99998d53983267c8ca53529bb5b2d03..c7312c39c6b85f744d965acf3d9d1cddf4270775 100644 (file)
@@ -438,7 +438,7 @@ EXPORTS
         symbolWithPointer(?toInt64@WebCore@@YA_JPAVExecState@JSC@@VJSValue@3@W4IntegerConversionConfiguration@1@@Z, ?toInt64@WebCore@@YA_JPEAVExecState@JSC@@VJSValue@3@W4IntegerConversionConfiguration@1@@Z)
         symbolWithPointer(?toUInt32EnforceRange@WebCore@@YAIPAVExecState@JSC@@VJSValue@3@@Z, ?toUInt32EnforceRange@WebCore@@YAIPEAVExecState@JSC@@VJSValue@3@@Z)
         symbolWithPointer(?toUInt64@WebCore@@YA_KPAVExecState@JSC@@VJSValue@3@W4IntegerConversionConfiguration@1@@Z, ?toUInt64@WebCore@@YA_KPEAVExecState@JSC@@VJSValue@3@W4IntegerConversionConfiguration@1@@Z)
-        symbolWithPointer(?getHeapSize@ScriptGCEvent@WebCore@@SAXAAUHeapInfo@2@@Z, ?getHeapSize@ScriptGCEvent@WebCore@@SAXAEAUHeapInfo@2@@Z)
+        ?commonVM@JSDOMWindowBase@WebCore@@SAPAVVM@JSC@@XZ
 
 #if ENABLE(WORKERS)
         ?workerThreadCount@WorkerThread@WebCore@@SAIXZ