Title: [123881] trunk/Source/WebCore
Revision
123881
Author
[email protected]
Date
2012-07-27 10:19:14 -0700 (Fri, 27 Jul 2012)

Log Message

Add runtime flag to enable/disable JS memory information
https://bugs.webkit.org/show_bug.cgi?id=92479

Patch by Zoltan Horvath <[email protected]> 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:

Modified Paths

Property Changed

Diff

Modified: trunk/Source/WebCore/ChangeLog (123880 => 123881)


--- trunk/Source/WebCore/ChangeLog	2012-07-27 17:17:00 UTC (rev 123880)
+++ trunk/Source/WebCore/ChangeLog	2012-07-27 17:19:14 UTC (rev 123881)
@@ -1,3 +1,20 @@
+2012-07-27  Zoltan Horvath  <[email protected]>
+
+        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  <[email protected]>
 
         Microdata: Remove toJs() and toV8Object() custom methods from JSHTMLElementCustom.cpp and V8HTMLElementCustom.cpp respectively.

Modified: trunk/Source/WebCore/testing/InternalSettings.cpp (123880 => 123881)


--- trunk/Source/WebCore/testing/InternalSettings.cpp	2012-07-27 17:17:00 UTC (rev 123880)
+++ trunk/Source/WebCore/testing/InternalSettings.cpp	2012-07-27 17:19:14 UTC (rev 123881)
@@ -591,4 +591,10 @@
     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);
 }
+
+}
Property changes on: trunk/Source/WebCore/testing/InternalSettings.cpp
___________________________________________________________________

Added: svn:executable

Modified: trunk/Source/WebCore/testing/InternalSettings.h (123880 => 123881)


--- trunk/Source/WebCore/testing/InternalSettings.h	2012-07-27 17:17:00 UTC (rev 123880)
+++ trunk/Source/WebCore/testing/InternalSettings.h	2012-07-27 17:19:14 UTC (rev 123881)
@@ -134,6 +134,7 @@
     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; }
Property changes on: trunk/Source/WebCore/testing/InternalSettings.h
___________________________________________________________________

Added: svn:executable

Modified: trunk/Source/WebCore/testing/InternalSettings.idl (123880 => 123881)


--- trunk/Source/WebCore/testing/InternalSettings.idl	2012-07-27 17:17:00 UTC (rev 123880)
+++ trunk/Source/WebCore/testing/InternalSettings.idl	2012-07-27 17:19:14 UTC (rev 123881)
@@ -75,6 +75,7 @@
         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);
     };
 }
 
Property changes on: trunk/Source/WebCore/testing/InternalSettings.idl
___________________________________________________________________

Added: svn:executable

_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to