New issue
Advanced search Search tips

Issue 922099 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Jan 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

DevTools don't show scripts in sources for restored pages in one render process

Reported by marytara...@yandex-team.ru, Jan 15

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.0 Safari/605.1.15

Steps to reproduce the problem:
0. for simple reproduction run chrome with --renderer-process-limit=1
1. open 2 tabs with one site (simple example: http://guimp.com)
2. close browser
3. open browser again
4. open devtools for both restored tabs and go to "Sources" panel

What is the expected behavior?
You see script.js file in both tabs

What went wrong?
You see script.js file only in one tab

Did this work before? N/A 

Chrome version: 71.0.3578.98  Channel: n/a
OS Version: OS X 10.12.6
Flash Version: 

As I explored, function
void getCompiledScripts(int contextGroupId,
                          std::vector<std::unique_ptr<V8DebuggerScript>>&)
returns no scripts for second tab.
Scripts have the save ContextID in both tabs, but ContextGroupID is different in DevTools sessions for different pages.
 
Labels: Needs-Triage-M71

Comment 2 by viswa.karala@chromium.org, Jan 16 (6 days ago)

Cc: viswa.karala@chromium.org
Labels: Triaged-ET Needs-Feedback
Unable to reproduce the issue on chrome reported version# 71.0.3578.98 using Mac 10.12.6 with steps mentioned below:
1) Launched chrome reported version with --renderer-process-limit=1 from terminal
2) Opened URL: http://guimp.com in two tabs and closed the browser
3) Relaunched chrome and opened Devtools > Sources tab, able to see script.js in two tabs

@Reporter: Please find the above mentioned information  and attached screencast for your reference and let us know if we missed anything in reproducing the issue. Provide your feedback on it which help in further triaging it in better way. Try to test this issue by creating new person with no apps and extensions in it and let us know if the issue still persists.

Thanks!
922099.mp4
657 KB View Download

Comment 3 by marytara...@yandex-team.ru, Jan 16 (6 days ago)

My about version data
Google Chrome	71.0.3578.98 (Official Build) (64-bit)
Revision	15234034d19b85dcd9a03b164ae89d04145d8368-refs/branch-heads/3578@{#897}
OS	Mac OS X
JavaScript	V8 7.1.302.31
Flash	32.0.0.114 /Users/marytarasova/Library/Application Support/Google/Chrome/PepperFlash/32.0.0.114/PepperFlashPlayer.plugin
User Agent	Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
Командная строка	/Applications/Google Chrome.app/Contents/MacOS/Google Chrome --renderer-process-limit=1 --flag-switches-begin --flag-switches-end
Executable Path	/Applications/Google Chrome.app/Contents/MacOS/Google Chrome
Profile Path	/Users/marytarasova/Library/Application Support/Google/Chrome/Default

Maybe this can help: I close browser using Cmd+Q
There is an attached video with reproduction.

video.mov
4.8 MB View Download
Project Member

Comment 4 by sheriffbot@chromium.org, Jan 16 (6 days ago)

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding the requester to the cc list.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 5 by l...@chromium.org, Jan 18 (5 days ago)

Owner: dgozman@chromium.org
Status: Assigned (was: Unconfirmed)
dgozman@, could you please take a look?

Comment 6 by marytara...@yandex-team.ru, Jan 18 (4 days ago)

As I found out:
https://cs.chromium.org/chromium/src/v8/src/compiler.cc?type=cs&q=Compiler::GetSharedFunctionInfoForScript&sq=package:chromium&g=0&l=1745
If script is found in compilation_cache, context id for this script is changed. That is why GetCompiledScripts returns it only for new context. That is why the script is not showed in devtools for page with previous context.
https://cs.chromium.org/chromium/src/v8/src/inspector/v8-debugger.cc?type=cs&sq=package:chromium&g=0&l=122

I do not know if it is possible to show the script for both pages in such kind of situation, but it looks like bug.

Comment 7 by dgozman@chromium.org, Jan 18 (4 days ago)

Status: WontFix (was: Assigned)
Your analysis is absolutely correct: reusing the script from compilation cache breaks its attribution to the original page. That's a known bug which we consider as not worth fixing due to high cost and low impact.

We currently disable compilation cache as soon as debugger attaches, so the workaround is to reload the page after opening DevTools.

Thank you for filing an issue!

Sign in to add a comment