New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 769890 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Console reports wrong filename for messages from Worker

Project Member Reported by alph@chromium.org, Sep 28 2017

Issue description

Consider an example from  crbug.com/765666 

In DevTools level 2 there are several warnings (see the screenshot). Some of them are reported as coming from Trie.js while in fact all of them are from HeapSnapshot.js

Mu guess is it is using a wrong target (main one?) to resolve the url from scriptId.
 
Screenshot from 2017-09-28 12:45:06.png
42.3 KB View Download

Comment 1 by l...@chromium.org, Sep 28 2017

Cc: kozyatinskiy@chromium.org
Summary: Console reports wrong filename for messages from Worker (was: Console reports wrong filename for a warning)
Thanks for the report, I can repro when the snapshot is run before DT on DT is opened.  It's also reproducible with a small HTML page loading a single worker with a single log.  Your guess seems to be correct, alph.

The first message with the correct 'HeapSnapshot.js' anchor is generated from _onConsoleAPICalled, while the second incorrect message with 'Trie.js' comes from _logEntryAdded.  It looks like "buildSnapshot" method is called only once, but we incorrectly log the message twice instead of once.

After discussion with kozy@, we seem to store messages in both the Worker's store and the Page's store.  I think an appropriate solution is to prevent these duplicates from being logged, and investigate whether there are other cases when a LogEntry is generated by the incorrect target.
Owner: kozyatinskiy@chromium.org

Comment 3 by kozy@chromium.org, Dec 13 2017

Owner: kozy@chromium.org

Sign in to add a comment