Add runtime flag to enable/disable JS memory information
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2012 17:19:14 +0000 (17:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jul 2012 17:19:14 +0000 (17:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=92479

Patch by Zoltan Horvath <zoltan@webkit.org> on 2012-07-27
Reviewed by Simon Hausmann.

We need console.memory JS object to be accessible because of the memory consumption
measurements of the performance tests, so I added a toggle to InternalSettings.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setMemoryInfoEnabled):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

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

Source/WebCore/ChangeLog
Source/WebCore/testing/InternalSettings.cpp [changed mode: 0644->0755]
Source/WebCore/testing/InternalSettings.h [changed mode: 0644->0755]
Source/WebCore/testing/InternalSettings.idl [changed mode: 0644->0755]

index 9c0565c..70d5827 100644 (file)
@@ -1,3 +1,20 @@
+2012-07-27  Zoltan Horvath  <zoltan@webkit.org>
+
+        Add runtime flag to enable/disable JS memory information
+        https://bugs.webkit.org/show_bug.cgi?id=92479
+
+        Reviewed by Simon Hausmann.
+
+        We need console.memory JS object to be accessible because of the memory consumption
+        measurements of the performance tests, so I added a toggle to InternalSettings.
+
+        * testing/InternalSettings.cpp:
+        (WebCore::InternalSettings::setMemoryInfoEnabled):
+        (WebCore):
+        * testing/InternalSettings.h:
+        (InternalSettings):
+        * testing/InternalSettings.idl:
+
 2012-07-27  Arko Saha  <arko@motorola.com>
 
         Microdata: Remove toJs() and toV8Object() custom methods from JSHTMLElementCustom.cpp and V8HTMLElementCustom.cpp respectively.
old mode 100644 (file)
new mode 100755 (executable)
index 531b04f..3568dc9
@@ -591,4 +591,10 @@ String InternalSettings::configurationForViewport(float devicePixelRatio, int de
     return "viewport size " + String::number(attributes.layoutSize.width()) + "x" + String::number(attributes.layoutSize.height()) + " scale " + String::number(attributes.initialScale) + " with limits [" + String::number(attributes.minimumScale) + ", " + String::number(attributes.maximumScale) + "] and userScalable " + (attributes.userScalable ? "true" : "false");
 }
 
+void InternalSettings::setMemoryInfoEnabled(bool enabled, ExceptionCode& ec)
+{
+    InternalSettingsGuardForSettings();
+    settings()->setMemoryInfoEnabled(enabled);
+}
+
 }
old mode 100644 (file)
new mode 100755 (executable)
index f04b1fa..c3d0cb5
@@ -134,6 +134,7 @@ public:
     bool shouldDisplayTrackKind(const String& kind, ExceptionCode&);
     void setEnableMockPagePopup(bool, ExceptionCode&);
     String configurationForViewport(float devicePixelRatio, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight, ExceptionCode&);
+    void setMemoryInfoEnabled(bool, ExceptionCode&);
 private:
     explicit InternalSettings(Page*);
     virtual void hostDestroyed() OVERRIDE { m_page = 0; }
old mode 100644 (file)
new mode 100755 (executable)
index 3b95c65..dd139c0
@@ -75,6 +75,7 @@ module window {
         void setShouldDisplayTrackKind(in DOMString kind, in boolean enabled) raises (DOMException);
         boolean shouldDisplayTrackKind(in DOMString trackKind) raises (DOMException);
 #endif
+        void setMemoryInfoEnabled(in boolean enabled) raises(DOMException);
     };
 }