Title: [205161] trunk
Revision
205161
Author
d...@apple.com
Date
2016-08-29 17:15:17 -0700 (Mon, 29 Aug 2016)

Log Message

JSON.stringify returns empty when used with performance.timing.
https://bugs.webkit.org/show_bug.cgi?id=151813
<rdar://problem/28066067>

Reviewed by Sam Weinig.

Source/WebCore:

While we are waiting for our bindings generator to handle
"serializer", add a custom toJSON function that allows
performance.timing to be stringified.

Test: fast/dom/webtiming-performance-timing-stringify.html

* CMakeLists.txt: New file added.
* WebCore.xcodeproj/project.pbxproj: New file added.
* bindings/js/JSPerformanceTimingCustom.cpp: Added. Implements toJSON.
(WebCore::JSPerformanceTiming::toJSON):
* page/PerformanceTiming.idl: Add toJSON().

LayoutTests:

* fast/dom/Window/window-properties-performance-expected.txt:
* fast/dom/Window/window-properties-performance-resource-timing-expected.txt:
* fast/dom/webtiming-document-open-expected.txt:
* fast/dom/webtiming-navigate-within-document-expected.txt:
* fast/dom/webtiming-performance-timing-stringify-expected.txt: Added.
* fast/dom/webtiming-performance-timing-stringify.html: Added.
* http/tests/misc/webtiming-cross-origin-and-back1-expected.txt:
* http/tests/misc/webtiming-cross-origin-redirect-expected.txt:
* http/tests/misc/webtiming-no-origin-expected.txt:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (205160 => 205161)


--- trunk/LayoutTests/ChangeLog	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/LayoutTests/ChangeLog	2016-08-30 00:15:17 UTC (rev 205161)
@@ -1,3 +1,21 @@
+2016-08-29  Dean Jackson  <d...@apple.com>
+
+        JSON.stringify returns empty when used with performance.timing.
+        https://bugs.webkit.org/show_bug.cgi?id=151813
+        <rdar://problem/28066067>
+
+        Reviewed by Sam Weinig.
+
+        * fast/dom/Window/window-properties-performance-expected.txt:
+        * fast/dom/Window/window-properties-performance-resource-timing-expected.txt:
+        * fast/dom/webtiming-document-open-expected.txt:
+        * fast/dom/webtiming-navigate-within-document-expected.txt:
+        * fast/dom/webtiming-performance-timing-stringify-expected.txt: Added.
+        * fast/dom/webtiming-performance-timing-stringify.html: Added.
+        * http/tests/misc/webtiming-cross-origin-and-back1-expected.txt:
+        * http/tests/misc/webtiming-cross-origin-redirect-expected.txt:
+        * http/tests/misc/webtiming-no-origin-expected.txt:
+
 2016-08-29  Chris Dumez  <cdu...@apple.com>
 
         Regression(r204923): It should be possible to set 'Location.href' cross origin

Modified: trunk/LayoutTests/fast/dom/Window/window-properties-performance-expected.txt (205160 => 205161)


--- trunk/LayoutTests/fast/dom/Window/window-properties-performance-expected.txt	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/LayoutTests/fast/dom/Window/window-properties-performance-expected.txt	2016-08-30 00:15:17 UTC (rev 205161)
@@ -32,6 +32,7 @@
 window.performance.timing.responseEnd [number]
 window.performance.timing.responseStart [number]
 window.performance.timing.secureConnectionStart [number]
+window.performance.timing.toJSON [function]
 window.performance.timing.unloadEventEnd [number]
 window.performance.timing.unloadEventStart [number]
 window.performance.timing [printed above as window.performance.timing]

Modified: trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt (205160 => 205161)


--- trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/LayoutTests/fast/dom/Window/window-properties-performance-resource-timing-expected.txt	2016-08-30 00:15:17 UTC (rev 205161)
@@ -38,6 +38,7 @@
 window.performance.timing.responseEnd [number]
 window.performance.timing.responseStart [number]
 window.performance.timing.secureConnectionStart [number]
+window.performance.timing.toJSON [function]
 window.performance.timing.unloadEventEnd [number]
 window.performance.timing.unloadEventStart [number]
 window.performance.timing [printed above as window.performance.timing]

Modified: trunk/LayoutTests/fast/dom/webtiming-document-open-expected.txt (205160 => 205161)


--- trunk/LayoutTests/fast/dom/webtiming-document-open-expected.txt	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/LayoutTests/fast/dom/webtiming-document-open-expected.txt	2016-08-30 00:15:17 UTC (rev 205161)
@@ -22,6 +22,7 @@
 PASS timing.responseEnd is originalTiming.responseEnd
 PASS timing.responseStart is originalTiming.responseStart
 PASS timing.secureConnectionStart is originalTiming.secureConnectionStart
+PASS timing.toJSON is originalTiming.toJSON
 PASS timing.unloadEventEnd is originalTiming.unloadEventEnd
 PASS timing.unloadEventStart is originalTiming.unloadEventStart
 PASS successfullyParsed is true

Modified: trunk/LayoutTests/fast/dom/webtiming-navigate-within-document-expected.txt (205160 => 205161)


--- trunk/LayoutTests/fast/dom/webtiming-navigate-within-document-expected.txt	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/LayoutTests/fast/dom/webtiming-navigate-within-document-expected.txt	2016-08-30 00:15:17 UTC (rev 205161)
@@ -22,6 +22,7 @@
 PASS responseEnd is unchanged.
 PASS responseStart is unchanged.
 PASS secureConnectionStart is unchanged.
+PASS toJSON is unchanged.
 PASS unloadEventEnd is unchanged.
 PASS unloadEventStart is unchanged.
 PASS successfullyParsed is true

Added: trunk/LayoutTests/fast/dom/webtiming-performance-timing-stringify-expected.txt (0 => 205161)


--- trunk/LayoutTests/fast/dom/webtiming-performance-timing-stringify-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/webtiming-performance-timing-stringify-expected.txt	2016-08-30 00:15:17 UTC (rev 205161)
@@ -0,0 +1,22 @@
+PASS: navigationStart has a value.
+PASS: unloadEventStart has a value.
+PASS: unloadEventEnd has a value.
+PASS: redirectStart has a value.
+PASS: redirectEnd has a value.
+PASS: fetchStart has a value.
+PASS: domainLookupStart has a value.
+PASS: domainLookupEnd has a value.
+PASS: connectStart has a value.
+PASS: connectEnd has a value.
+PASS: secureConnectionStart has a value.
+PASS: requestStart has a value.
+PASS: responseStart has a value.
+PASS: responseEnd has a value.
+PASS: domLoading has a value.
+PASS: domInteractive has a value.
+PASS: domContentLoadedEventStart has a value.
+PASS: domContentLoadedEventEnd has a value.
+PASS: domComplete has a value.
+PASS: loadEventStart has a value.
+PASS: loadEventEnd has a value.
+
Property changes on: trunk/LayoutTests/fast/dom/webtiming-performance-timing-stringify-expected.txt
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Date Revision \ No newline at end of property

Added: svn:mime-type

+text/plain \ No newline at end of property

Added: trunk/LayoutTests/fast/dom/webtiming-performance-timing-stringify.html (0 => 205161)


--- trunk/LayoutTests/fast/dom/webtiming-performance-timing-stringify.html	                        (rev 0)
+++ trunk/LayoutTests/fast/dom/webtiming-performance-timing-stringify.html	2016-08-30 00:15:17 UTC (rev 205161)
@@ -0,0 +1,20 @@
+<script>
+window.testRunner && window.testRunner.dumpAsText();
+
+window.addEventListener("load", () => {
+
+    var append = (msg) => { document.body.appendChild(document.createTextNode(msg)); document.body.appendChild(document.createElement("br")); }
+
+    var timing = JSON.parse(JSON.stringify(performance.timing));
+
+    ["navigationStart", "unloadEventStart", "unloadEventEnd", "redirectStart",
+    "redirectEnd", "fetchStart", "domainLookupStart", "domainLookupEnd",
+    "connectStart", "connectEnd", "secureConnectionStart", "requestStart",
+    "responseStart", "responseEnd", "domLoading", "domInteractive",
+    "domContentLoadedEventStart", "domContentLoadedEventEnd", "domComplete",
+    "loadEventStart", "loadEventEnd"].forEach((attr) => {
+        append(timing.hasOwnProperty(attr) ? `PASS: ${attr} has a value.` : `FAIL: ${attr} was missing.`);
+    });
+
+}, false);
+</script>
\ No newline at end of file
Property changes on: trunk/LayoutTests/fast/dom/webtiming-performance-timing-stringify.html
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Date Revision \ No newline at end of property

Added: svn:mime-type

+text/html \ No newline at end of property

Modified: trunk/LayoutTests/http/tests/misc/webtiming-cross-origin-and-back1-expected.txt (205160 => 205161)


--- trunk/LayoutTests/http/tests/misc/webtiming-cross-origin-and-back1-expected.txt	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/LayoutTests/http/tests/misc/webtiming-cross-origin-and-back1-expected.txt	2016-08-30 00:15:17 UTC (rev 205161)
@@ -22,6 +22,7 @@
 PASS timing.responseEnd is non-zero.
 PASS timing.responseStart is non-zero.
 PASS timing.secureConnectionStart is 0
+PASS timing.toJSON is non-zero.
 PASS timing.unloadEventEnd is 0
 PASS timing.unloadEventStart is 0
 PASS navigation.redirectCount is 0

Modified: trunk/LayoutTests/http/tests/misc/webtiming-cross-origin-redirect-expected.txt (205160 => 205161)


--- trunk/LayoutTests/http/tests/misc/webtiming-cross-origin-redirect-expected.txt	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/LayoutTests/http/tests/misc/webtiming-cross-origin-redirect-expected.txt	2016-08-30 00:15:17 UTC (rev 205161)
@@ -22,6 +22,7 @@
 PASS timing.responseEnd is non-zero.
 PASS timing.responseStart is non-zero.
 PASS timing.secureConnectionStart is 0
+PASS timing.toJSON is non-zero.
 PASS timing.unloadEventEnd is 0
 PASS timing.unloadEventStart is 0
 PASS navigation.redirectCount is 0

Modified: trunk/LayoutTests/http/tests/misc/webtiming-no-origin-expected.txt (205160 => 205161)


--- trunk/LayoutTests/http/tests/misc/webtiming-no-origin-expected.txt	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/LayoutTests/http/tests/misc/webtiming-no-origin-expected.txt	2016-08-30 00:15:17 UTC (rev 205161)
@@ -22,6 +22,7 @@
 PASS timing.responseEnd is non-zero.
 PASS timing.responseStart is non-zero.
 PASS timing.secureConnectionStart is 0
+PASS timing.toJSON is non-zero.
 PASS timing.unloadEventEnd is 0
 PASS timing.unloadEventStart is 0
 PASS navigation.redirectCount is 0

Modified: trunk/Source/WebCore/CMakeLists.txt (205160 => 205161)


--- trunk/Source/WebCore/CMakeLists.txt	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/Source/WebCore/CMakeLists.txt	2016-08-30 00:15:17 UTC (rev 205161)
@@ -1218,6 +1218,7 @@
     bindings/js/JSNodeOrString.cpp
     bindings/js/JSNodeListCustom.cpp
     bindings/js/JSPerformanceEntryCustom.cpp
+    bindings/js/JSPerformanceTimingCustom.cpp
     bindings/js/JSPluginElementFunctions.cpp
     bindings/js/JSPopStateEventCustom.cpp
     bindings/js/JSReadableStreamPrivateConstructors.cpp

Modified: trunk/Source/WebCore/ChangeLog (205160 => 205161)


--- trunk/Source/WebCore/ChangeLog	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/Source/WebCore/ChangeLog	2016-08-30 00:15:17 UTC (rev 205161)
@@ -1,3 +1,23 @@
+2016-08-29  Dean Jackson  <d...@apple.com>
+
+        JSON.stringify returns empty when used with performance.timing.
+        https://bugs.webkit.org/show_bug.cgi?id=151813
+        <rdar://problem/28066067>
+
+        Reviewed by Sam Weinig.
+
+        While we are waiting for our bindings generator to handle
+        "serializer", add a custom toJSON function that allows
+        performance.timing to be stringified.
+
+        Test: fast/dom/webtiming-performance-timing-stringify.html
+
+        * CMakeLists.txt: New file added.
+        * WebCore.xcodeproj/project.pbxproj: New file added.
+        * bindings/js/JSPerformanceTimingCustom.cpp: Added. Implements toJSON.
+        (WebCore::JSPerformanceTiming::toJSON):
+        * page/PerformanceTiming.idl: Add toJSON().
+
 2016-08-29  Chris Dumez  <cdu...@apple.com>
 
         Regression(r204923): It should be possible to set 'Location.href' cross origin

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (205160 => 205161)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2016-08-30 00:15:17 UTC (rev 205161)
@@ -1372,6 +1372,7 @@
 		31C0FF3E0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF3A0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h */; };
 		31C0FF3F0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31C0FF3B0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.cpp */; };
 		31C0FF400E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF3C0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.h */; };
+		31C422461D74EB9A00F12342 /* JSPerformanceTimingCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31C422451D74EB9A00F12342 /* JSPerformanceTimingCustom.cpp */; };
 		31D591B316697A6C00E6BF02 /* PlugInClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31D591B116697A6C00E6BF02 /* PlugInClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		31DCD29D1AB4FBDE0072E817 /* AnimationTrigger.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DCD29C1AB4FBDE0072E817 /* AnimationTrigger.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		31DEA4551B39F4D900F77178 /* WebSystemBackdropLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31DEA4531B39F4D900F77178 /* WebSystemBackdropLayer.mm */; };
@@ -8269,6 +8270,7 @@
 		31C0FF3A0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitAnimationEvent.h; sourceTree = "<group>"; };
 		31C0FF3B0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitTransitionEvent.cpp; sourceTree = "<group>"; };
 		31C0FF3C0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebKitTransitionEvent.h; sourceTree = "<group>"; };
+		31C422451D74EB9A00F12342 /* JSPerformanceTimingCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPerformanceTimingCustom.cpp; sourceTree = "<group>"; };
 		31D591B116697A6C00E6BF02 /* PlugInClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlugInClient.h; sourceTree = "<group>"; };
 		31DCD29C1AB4FBDE0072E817 /* AnimationTrigger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationTrigger.h; sourceTree = "<group>"; };
 		31DEA4531B39F4D900F77178 /* WebSystemBackdropLayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebSystemBackdropLayer.mm; sourceTree = "<group>"; };
@@ -21083,6 +21085,7 @@
 				83F1206A1B8C103600D75F63 /* JSNodeFilterCustom.cpp */,
 				1A750DD30A90E729000FF215 /* JSNodeIteratorCustom.cpp */,
 				BCD9C2610C17AA67005C90A2 /* JSNodeListCustom.cpp */,
+				31C422451D74EB9A00F12342 /* JSPerformanceTimingCustom.cpp */,
 				AD20B18C18E9D216005A8083 /* JSNodeListCustom.h */,
 				A85F22081430377D007CC884 /* JSPopStateEventCustom.cpp */,
 				418C395D1C8F0AAB0051C8A3 /* JSReadableStreamSourceCustom.cpp */,
@@ -27445,6 +27448,7 @@
 				FD3160BC12B0272A00C1A359 /* AudioDestinationMac.cpp in Sources */,
 				FD31600712B0267600C1A359 /* AudioDestinationNode.cpp in Sources */,
 				FD31608112B026F700C1A359 /* AudioDSPKernelProcessor.cpp in Sources */,
+				31C422461D74EB9A00F12342 /* JSPerformanceTimingCustom.cpp in Sources */,
 				CD5596911475B678001D0BD0 /* AudioFileReaderIOS.cpp in Sources */,
 				FD3160BE12B0272A00C1A359 /* AudioFileReaderMac.cpp in Sources */,
 				CD2F4A2318D89F700063746D /* AudioHardwareListener.cpp in Sources */,

Added: trunk/Source/WebCore/bindings/js/JSPerformanceTimingCustom.cpp (0 => 205161)


--- trunk/Source/WebCore/bindings/js/JSPerformanceTimingCustom.cpp	                        (rev 0)
+++ trunk/Source/WebCore/bindings/js/JSPerformanceTimingCustom.cpp	2016-08-30 00:15:17 UTC (rev 205161)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2016 Apple 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:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS 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 APPLE INC. OR ITS 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 "JSPerformanceTiming.h"
+
+#include <runtime/IdentifierInlines.h>
+#include <runtime/JSObject.h>
+#include <runtime/ObjectConstructor.h>
+
+namespace WebCore {
+
+using namespace JSC;
+
+JSC::JSValue JSPerformanceTiming::toJSON(ExecState& state)
+{
+    PerformanceTiming& timing = wrapped();
+    VM& vm = state.vm();
+
+    auto object = constructEmptyObject(&state);
+
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("navigationStart")), jsNumber(timing.navigationStart()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("unloadEventStart")), jsNumber(timing.unloadEventStart()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("unloadEventEnd")), jsNumber(timing.unloadEventEnd()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("redirectStart")), jsNumber(timing.redirectStart()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("redirectEnd")), jsNumber(timing.redirectEnd()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("fetchStart")), jsNumber(timing.fetchStart()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("domainLookupStart")), jsNumber(timing.domainLookupStart()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("domainLookupEnd")), jsNumber(timing.domainLookupEnd()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("connectStart")), jsNumber(timing.connectStart()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("connectEnd")), jsNumber(timing.connectEnd()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("secureConnectionStart")), jsNumber(timing.secureConnectionStart()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("requestStart")), jsNumber(timing.requestStart()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("responseStart")), jsNumber(timing.responseStart()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("responseEnd")), jsNumber(timing.responseEnd()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("domLoading")), jsNumber(timing.domLoading()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("domInteractive")), jsNumber(timing.domInteractive()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("domContentLoadedEventStart")), jsNumber(timing.domContentLoadedEventStart()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("domContentLoadedEventEnd")), jsNumber(timing.domContentLoadedEventEnd()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("domComplete")), jsNumber(timing.domComplete()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("loadEventStart")), jsNumber(timing.loadEventStart()));
+    object->putDirect(vm, Identifier::fromString(&vm, ASCIILiteral("loadEventEnd")), jsNumber(timing.loadEventEnd()));
+
+    return object;
+}
+
+}
Property changes on: trunk/Source/WebCore/bindings/js/JSPerformanceTimingCustom.cpp
___________________________________________________________________

Added: svn:eol-style

+native \ No newline at end of property

Added: svn:keywords

+Date Author Id Revision HeadURL \ No newline at end of property

Modified: trunk/Source/WebCore/page/PerformanceTiming.idl (205160 => 205161)


--- trunk/Source/WebCore/page/PerformanceTiming.idl	2016-08-29 23:54:25 UTC (rev 205160)
+++ trunk/Source/WebCore/page/PerformanceTiming.idl	2016-08-30 00:15:17 UTC (rev 205161)
@@ -53,5 +53,8 @@
     readonly attribute unsigned long long domComplete;
     readonly attribute unsigned long long loadEventStart;
     readonly attribute unsigned long long loadEventEnd;
+
+    // FIXME: Should be serializer = { attribute };
+    [Custom] Object toJSON();
 };
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to