Title: [164730] trunk
Revision
164730
Author
[email protected]
Date
2014-02-26 11:34:34 -0800 (Wed, 26 Feb 2014)

Log Message

Web Inspector: Remove console.profiles from window.console API
https://bugs.webkit.org/show_bug.cgi?id=116883

Reviewed by Timothy Hatcher.

Source/WebCore:

console.profiles has been removed or never implemented by other
browsers. We should remove it as well. However, since tests
rely on it, keep it as window.internals.consoleProfiles.

* WebCore.exp.in:
* page/Console.idl:
* testing/Internals.cpp:
(WebCore::Internals::consoleProfiles):
* testing/Internals.h:
* testing/Internals.idl:

Source/WebKit:

* WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:

LayoutTests:

* fast/profiler/resources/profiler-test-JS-resources.js:
(printHeavyProfilesDataWithoutTime):
(printProfilesDataWithoutTime):

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (164729 => 164730)


--- trunk/LayoutTests/ChangeLog	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/LayoutTests/ChangeLog	2014-02-26 19:34:34 UTC (rev 164730)
@@ -1,3 +1,14 @@
+2014-02-26  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Remove console.profiles from window.console API
+        https://bugs.webkit.org/show_bug.cgi?id=116883
+
+        Reviewed by Timothy Hatcher.
+
+        * fast/profiler/resources/profiler-test-JS-resources.js:
+        (printHeavyProfilesDataWithoutTime):
+        (printProfilesDataWithoutTime):
+
 2014-02-26  Sergio Villar Senin  <[email protected]>
 
         [CSS Grid Layout] Check default getComputedStyle() return values for grid properties

Modified: trunk/LayoutTests/fast/profiler/resources/profiler-test-JS-resources.js (164729 => 164730)


--- trunk/LayoutTests/fast/profiler/resources/profiler-test-JS-resources.js	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/LayoutTests/fast/profiler/resources/profiler-test-JS-resources.js	2014-02-26 19:34:34 UTC (rev 164730)
@@ -49,7 +49,7 @@
     var preElement = document.createElement("pre");
     preElement.appendChild(document.createTextNode("\n"));
 
-    var profiles = console.profiles;
+    var profiles = internals.consoleProfiles;
     for (var i = 0; i < profiles.length; ++i) {
         preElement.appendChild(document.createTextNode("Profile title: " + profiles[i].title + "\n"));
         printProfileNodeWithoutTime(preElement, profiles[i].heavyProfile.head, 0);
@@ -64,7 +64,7 @@
     var preElement = document.createElement("pre");
     preElement.appendChild(document.createTextNode("\n"));
 
-    var profiles = console.profiles;
+    var profiles = internals.consoleProfiles;
     for (var i = 0; i < profiles.length; ++i) {
         preElement.appendChild(document.createTextNode("Profile title: " + profiles[i].title + "\n"));
         printProfileNodeWithoutTime(preElement, profiles[i].head, 0);

Modified: trunk/Source/WebCore/ChangeLog (164729 => 164730)


--- trunk/Source/WebCore/ChangeLog	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/Source/WebCore/ChangeLog	2014-02-26 19:34:34 UTC (rev 164730)
@@ -1,3 +1,21 @@
+2014-02-26  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Remove console.profiles from window.console API
+        https://bugs.webkit.org/show_bug.cgi?id=116883
+
+        Reviewed by Timothy Hatcher.
+
+        console.profiles has been removed or never implemented by other
+        browsers. We should remove it as well. However, since tests
+        rely on it, keep it as window.internals.consoleProfiles.
+
+        * WebCore.exp.in:
+        * page/Console.idl:
+        * testing/Internals.cpp:
+        (WebCore::Internals::consoleProfiles):
+        * testing/Internals.h:
+        * testing/Internals.idl:
+
 2014-02-26  Martin Hock  <[email protected]>
 
         Create SessionID value-style class for session IDs.

Modified: trunk/Source/WebCore/WebCore.exp.in (164729 => 164730)


--- trunk/Source/WebCore/WebCore.exp.in	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/Source/WebCore/WebCore.exp.in	2014-02-26 19:34:34 UTC (rev 164730)
@@ -1078,6 +1078,7 @@
 __ZN7WebCore4coreEP28NSURLAuthenticationChallenge
 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_10ClientRectE
 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_13DOMStringListE
+__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_13ScriptProfileE
 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_14ClientRectListE
 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_19CSSStyleDeclarationE
 __ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_5RangeE
@@ -1869,6 +1870,7 @@
 __ZNK7WebCore8Settings19sansSerifFontFamilyE11UScriptCode
 __ZNK7WebCore8Settings20pictographFontFamilyE11UScriptCode
 __ZNK7WebCore9DOMWindow27pendingUnloadEventListenersEv
+__ZNK7WebCore9DOMWindow7consoleEv
 __ZNK7WebCore9FloatQuad11boundingBoxEv
 __ZNK7WebCore9FloatRect10intersectsERKS0_
 __ZNK7WebCore9FloatRectcv6CGRectEv

Modified: trunk/Source/WebCore/page/Console.idl (164729 => 164730)


--- trunk/Source/WebCore/page/Console.idl	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/Source/WebCore/page/Console.idl	2014-02-26 19:34:34 UTC (rev 164730)
@@ -43,10 +43,6 @@
     [CallWith=ScriptArguments&ScriptState, ImplementedAs=assertCondition] void assert(boolean condition);
     [CallWith=ScriptArguments&ScriptState] void count();
 
-    // As per spec: http://www.w3.org/TR/WebIDL/#idl-sequence
-    // "Sequences must not be used as the type of an attribute, constant or exception field."
-    // FIXME: this will lead to BUG console.profiles !== console.profiles as profile will always returns new array.
-    readonly attribute ScriptProfile[] profiles;
     [CallWith=ScriptState] void profile([TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString title);
     [CallWith=ScriptState] void profileEnd([TreatNullAs=NullString, TreatUndefinedAs=NullString] optional DOMString title);
 

Modified: trunk/Source/WebCore/testing/Internals.cpp (164729 => 164730)


--- trunk/Source/WebCore/testing/Internals.cpp	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/Source/WebCore/testing/Internals.cpp	2014-02-26 19:34:34 UTC (rev 164730)
@@ -36,6 +36,7 @@
 #include "ChromeClient.h"
 #include "ClientRect.h"
 #include "ClientRectList.h"
+#include "Console.h"
 #include "ContentDistributor.h"
 #include "Cursor.h"
 #include "DOMStringList.h"
@@ -1435,6 +1436,11 @@
     document->frame()->editor().toggleOverwriteModeEnabled();
 }
 
+const ProfilesArray& Internals::consoleProfiles() const
+{
+    return contextDocument()->domWindow()->console()->profiles();
+}
+
 #if ENABLE(INSPECTOR)
 unsigned Internals::numberOfLiveNodes() const
 {

Modified: trunk/Source/WebCore/testing/Internals.h (164729 => 164730)


--- trunk/Source/WebCore/testing/Internals.h	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/Source/WebCore/testing/Internals.h	2014-02-26 19:34:34 UTC (rev 164730)
@@ -50,17 +50,19 @@
 class Frame;
 class InspectorFrontendChannelDummy;
 class InternalSettings;
+class MallocStatistics;
 class MemoryInfo;
 class Node;
 class Page;
 class Range;
 class ScriptExecutionContext;
-class MallocStatistics;
+class ScriptProfile;
 class SerializedScriptValue;
 class TimeRanges;
 class TypeConversions;
 
 typedef int ExceptionCode;
+typedef Vector<RefPtr<ScriptProfile>> ProfilesArray;
 
 class Internals : public RefCounted<Internals>
                 , public ContextDestructionObserver {
@@ -222,6 +224,8 @@
     void insertAuthorCSS(const String&, ExceptionCode&) const;
     void insertUserCSS(const String&, ExceptionCode&) const;
 
+    const ProfilesArray& consoleProfiles() const;
+
 #if ENABLE(INSPECTOR)
     unsigned numberOfLiveNodes() const;
     unsigned numberOfLiveDocuments() const;

Modified: trunk/Source/WebCore/testing/Internals.idl (164729 => 164730)


--- trunk/Source/WebCore/testing/Internals.idl	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/Source/WebCore/testing/Internals.idl	2014-02-26 19:34:34 UTC (rev 164730)
@@ -186,6 +186,11 @@
     [RaisesException] void setDeviceProximity(DOMString eventType, double value, double min, double max);
 #endif
 
+    // As per spec: http://www.w3.org/TR/WebIDL/#idl-sequence
+    // "Sequences must not be used as the type of an attribute, constant or exception field."
+    // FIXME: this will lead to BUG interals.consoleProfiles !== interals.consoleProfiles as profile will always returns new array.
+    readonly attribute ScriptProfile[] consoleProfiles;
+
     [Conditional=INSPECTOR] unsigned long numberOfLiveNodes();
     [Conditional=INSPECTOR] unsigned long numberOfLiveDocuments();
     [Conditional=INSPECTOR] sequence<DOMString> consoleMessageArgumentCounts();

Modified: trunk/Source/WebKit/ChangeLog (164729 => 164730)


--- trunk/Source/WebKit/ChangeLog	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/Source/WebKit/ChangeLog	2014-02-26 19:34:34 UTC (rev 164730)
@@ -1,3 +1,12 @@
+2014-02-26  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Remove console.profiles from window.console API
+        https://bugs.webkit.org/show_bug.cgi?id=116883
+
+        Reviewed by Timothy Hatcher.
+
+        * WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in:
+
 2014-02-24  Martin Robinson  <[email protected]>
 
         [GTK] generate-gtkdoc should not generate documentation for source files for unbuilt source files

Modified: trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in (164729 => 164730)


--- trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/Source/WebKit/WebKit.vcxproj/WebKitExportGenerator/WebKitExports.def.in	2014-02-26 19:34:34 UTC (rev 164730)
@@ -357,6 +357,8 @@
         symbolWithPointer(?pageProperty@PrintContext@WebCore@@SA?AVString@WTF@@PAVFrame@2@PBDH@Z, ?pageProperty@PrintContext@WebCore@@SA?AVString@WTF@@PEAVFrame@2@PEBDH@Z)
         symbolWithPointer(?pageSizeAndMarginsInPixels@PrintContext@WebCore@@SA?AVString@WTF@@PAVFrame@2@HHHHHHH@Z, ?pageSizeAndMarginsInPixels@PrintContext@WebCore@@SA?AVString@WTF@@PEAVFrame@2@HHHHHHH@Z)
         symbolWithPointer(?close@DOMWindow@WebCore@@QAEXPAVScriptExecutionContext@2@@Z, ?close@DOMWindow@WebCore@@QEAAXPEAVScriptExecutionContext@2@@Z)
+        symbolWithPointer(?console@DOMWindow@WebCore@@QBEPAVConsole@2@XZ, ?console@DOMWindow@WebCore@@QBEPAVConsole@2@XZ)
+        symbolWithPointer(?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVScriptProfile@1@@Z, ?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVScriptProfile@1@@Z)
         symbolWithPointer(?document@DOMWindow@WebCore@@QBEPAVDocument@2@XZ, ?document@DOMWindow@WebCore@@QEBAPEAVDocument@2@XZ)
         symbolWithPointer(?open@DOMWindow@WebCore@@QAE?AV?$PassRefPtr@VDOMWindow@WebCore@@@WTF@@ABVString@4@ABVAtomicString@4@0AAV12@2@Z, ?open@DOMWindow@WebCore@@QEAA?AV?$PassRefPtr@VDOMWindow@WebCore@@@WTF@@AEBVString@4@AEBVAtomicString@4@0AEAV12@2@Z)
         symbolWithPointer(?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVDOMWindow@1@@Z, ?toJS@WebCore@@YA?AVJSValue@JSC@@PEAVExecState@3@PEAVJSDOMGlobalObject@1@PEAVDOMWindow@1@@Z)

Modified: trunk/Source/WebKit/gtk/ChangeLog (164729 => 164730)


--- trunk/Source/WebKit/gtk/ChangeLog	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/Source/WebKit/gtk/ChangeLog	2014-02-26 19:34:34 UTC (rev 164730)
@@ -1,3 +1,14 @@
+2014-02-26  Joseph Pecoraro  <[email protected]>
+
+        Web Inspector: Remove console.profiles from window.console API
+        https://bugs.webkit.org/show_bug.cgi?id=116883
+
+        Reviewed by Timothy Hatcher.
+
+        * webkit/webkitwebinspector.cpp:
+        (webkit_web_inspector_class_init):
+        Removed stale part of comment.
+
 2014-02-26  Martin Robinson  <[email protected]>
 
         [GTK] generate-gtkdoc can fail with WebKit1 or WebKit2 only builds

Modified: trunk/Source/WebKit/gtk/webkit/webkitwebinspector.cpp (164729 => 164730)


--- trunk/Source/WebKit/gtk/webkit/webkitwebinspector.cpp	2014-02-26 19:22:45 UTC (rev 164729)
+++ trunk/Source/WebKit/gtk/webkit/webkitwebinspector.cpp	2014-02-26 19:34:34 UTC (rev 164730)
@@ -292,8 +292,7 @@
     /**
     * WebKitWebInspector:_javascript_-profiling-enabled:
     *
-    * This is enabling _javascript_ profiling in the Inspector. This means
-    * that Console.profiles will return the profiles.
+    * This is enabling _javascript_ profiling in the Inspector.
     *
     * Since: 1.1.1
     */
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to