New issue
Advanced search Search tips

Issue 747539 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

longtask in parent iframe fails to be observed by child iframe

Project Member Reported by maxlg@chromium.org, Jul 21 2017

Issue description

This test was disabled due to using SetTime, but when we try to run the test, the test would fails.

https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/external/wpt/longtask-timing/longtask-in-parentiframe.html?dr

Digged down a little bit, I found that the long task in parent iframe is captured but not reported, because GetFrame() return null:

https://cs.chromium.org/chromium/src/third_party/WebKit/Source/core/timing/Performance.cpp?rcl=4ddc452007c67c8280187415c5c4d3cdda061e51&l=250

Observing long task from the same iframe as the long task doesn't have such issue.
 

Comment 1 by maxlg@chromium.org, Jul 21 2017

Description: Show this description

Comment 2 by maxlg@chromium.org, Jul 21 2017

Description: Show this description

Comment 3 by maxlg@chromium.org, Jul 21 2017

Added 3 files as two simple demo. Observe the results from the console. longtask-in-parentiframe.html doesn't log the longtask while demo-longtask-in-same-iframe.html do.
demo-subframe-observing-longtask.html
454 bytes View Download
demo-longtask-in-parentiframe.html
343 bytes View Download
demo-longtask-in-same-iframe.html
487 bytes View Download
I'm unclear on what exactly the symptom is: 
I'd thought the issue is that a long task generated in the parent iframe is not observable by the child iframe (same origin), such as the case in this test:
https://cs.chromium.org/chromium/src/third_party/WebKit/LayoutTests/external/wpt/longtask-timing/longtask-in-parentiframe.html

However I made a simple repro and it works just fine:
https://panicker.users.x20web.corp.google.com/www/longtask/demo/repro747539/child-observes-parent.html

Max, in your demo the long task in parent is likely firing too early, before the observer in the child is ready (that's why I made it on-demand in my demo with a button)
Owner: maxlg@chromium.org
Status: Assigned (was: Untriaged)
Max, feel free to close the bug, unless you can demonstrate the issue

Comment 7 by maxlg@chromium.org, Jul 24 2017

Shubhie, thanks for helping. I have tested using your sample and added a long task at the beginning, and you are right that the original test fires the long task earlier than the iframe is created. 

I think it makes sense that the long task will be filtered if there is no frame attaching to it. 

I should revise the test so that the long task being fired after the creation of iframe.

Comment 8 by maxlg@chromium.org, Jul 25 2017

Status: WontFix (was: Assigned)

Sign in to add a comment