Bug 151813

Summary: JSON.stringify returns empty when used with performance.timing.
Product: WebKit Reporter: Guilherme <guilhermezz>
Component: JavaScriptCoreAssignee: Dean Jackson <dino>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, dino, euskadi31, ossy, rniwa, tpessato, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 9   
Hardware: Mac   
OS: OS X 10.10   
Attachments:
Description Flags
Patch
sam: review+, buildbot: commit-queue-
Archive of layout-test-results from ews101 for mac-yosemite none

Guilherme
Reported 2015-12-03 11:45:13 PST
> performance.timing < PerformanceTiming {navigationStart: 1449169187074, unloadEventStart: 0, unloadEventEnd: 0, redirectStart: 0, redirectEnd: 0, …} = $1 > JSON.stringify(performance.timing) < "{}" = $2
Attachments
Patch (17.67 KB, patch)
2016-08-29 16:30 PDT, Dean Jackson
sam: review+
buildbot: commit-queue-
Archive of layout-test-results from ews101 for mac-yosemite (982.16 KB, application/zip)
2016-08-29 17:05 PDT, Build Bot
no flags
euskadi31
Comment 1 2016-07-13 10:00:55 PDT
I confirm the problem. Safari Version 9.1.1 (11601.6.17)
tpessato
Comment 2 2016-08-26 12:31:15 PDT
I'm having the same problem. Are there any plans to fix this anytime soon? Really need this.
Radar WebKit Bug Importer
Comment 3 2016-08-29 16:24:51 PDT
Dean Jackson
Comment 4 2016-08-29 16:26:15 PDT
(In reply to comment #2) > I'm having the same problem. > > Are there any plans to fix this anytime soon? Really need this. Yes, because you asked nicely!!! :)
tpessato
Comment 5 2016-08-29 16:29:04 PDT
(In reply to comment #4) > (In reply to comment #2) > > I'm having the same problem. > > > > Are there any plans to fix this anytime soon? Really need this. > > Yes, because you asked nicely!!! :) Yey, Thank you! :)
Dean Jackson
Comment 6 2016-08-29 16:30:05 PDT
Sam Weinig
Comment 7 2016-08-29 16:39:04 PDT
Comment on attachment 287347 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=287347&action=review > Source/WebCore/bindings/js/JSPerformanceTimingCustom.cpp:46 > + CodeBlock* codeBlock = state.codeBlock(); > + PutPropertySlot slot(object, codeBlock ? codeBlock->isStrictMode() : false); I don't think you need to set the isStrictMode bit here. Just set it to false and remove the code block. Probably also want to use putDirect.
Build Bot
Comment 8 2016-08-29 17:05:37 PDT
Comment on attachment 287347 [details] Patch Attachment 287347 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/1968461 New failing tests: http/tests/misc/webtiming-no-origin.html http/tests/misc/webtiming-cross-origin-redirect.php http/tests/misc/webtiming-cross-origin-and-back1.html
Build Bot
Comment 9 2016-08-29 17:05:40 PDT
Created attachment 287354 [details] Archive of layout-test-results from ews101 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-yosemite Platform: Mac OS X 10.10.5
Dean Jackson
Comment 10 2016-08-29 17:17:38 PDT
Csaba Osztrogonác
Comment 11 2016-09-01 03:10:13 PDT
(In reply to comment #10) > Committed r205161: <http://trac.webkit.org/changeset/205161> It broke the !ENABLE(WEB_TIMING) build: ../../Source/WebCore/bindings/js/JSPerformanceTimingCustom.cpp:38:14: error: 'JSPerformanceTiming' has not been declared ../../Source/WebCore/bindings/js/JSPerformanceTimingCustom.cpp: In function 'JSC::JSValue WebCore::toJSON(JSC::ExecState&)': ../../Source/WebCore/bindings/js/JSPerformanceTimingCustom.cpp:40:5: error: 'PerformanceTiming' was not declared in this scope ../../Source/WebCore/bindings/js/JSPerformanceTimingCustom.cpp:40:24: error: 'timing' was not declared in this scope ../../Source/WebCore/bindings/js/JSPerformanceTimingCustom.cpp:40:41: error: 'wrapped' was not declared in this scope Source/WebCore/page/PerformanceTiming.idl is guarded, so JSPerformanceTimingCustom.cpp should be guarded too.
Note You need to log in before you can comment on or make changes to this bug.