Closed
Bug 1087054
Opened 10 years ago
Closed 10 years ago
Source map of complex JS file requested 200 times
Categories
(DevTools :: Debugger, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Firefox 36
People
(Reporter: sgoodhew, Assigned: fitzgen)
References
(Blocks 1 open bug)
Details
(Keywords: testcase)
Attachments
(2 files)
(deleted),
application/zip
|
Details | |
(deleted),
patch
|
past
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36
Steps to reproduce:
Load the webpage included in the attached zip
Open Developer Tools
Go to the Debugger tab
Reload the page
Actual results:
The sourcemap (batch.js.map) was request 196 times.
Expected results:
The sourcemap should have been requested once.
I have noticed that this seems to be related to the complexity of the JS file being mapped. If you delete half of batch.js the number of requests that are made drops significantly.
There is this recent bug about sourceMap too: bug 1084534.
Comment 2•10 years ago
|
||
Thanks for the testcase!
I can reproduce using current Nightly on OS X and couldn't find existing bugs about this.
Status: UNCONFIRMED → NEW
Component: Untriaged → Developer Tools: Debugger
Ever confirmed: true
Keywords: testcase
Version: 36 Branch → Trunk
Comment 4•10 years ago
|
||
Same in Firefox 33. Unless there's any indication it's a regression, I wouldn't bother testing older versions.
Assignee | ||
Updated•10 years ago
|
Blocks: dbg-sourcemap
Assignee | ||
Updated•10 years ago
|
Summary: Sourcemap of complex JS file requested 200 times → Source map of complex JS file requested 200 times
Assignee | ||
Comment 5•10 years ago
|
||
Seems like we are _always_ bypassing our cached source map requests inside `ThreadSources.prototype.sourceMap` (or, never checking the cache, only inserting into it)
>.<
Assignee: nobody → nfitzgerald
Status: NEW → ASSIGNED
Assignee | ||
Comment 6•10 years ago
|
||
Attachment #8512222 -
Flags: review?(past)
Assignee | ||
Comment 7•10 years ago
|
||
Comment on attachment 8512222 [details] [diff] [review]
source-map-requested-200x.patch
Review of attachment 8512222 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/devtools/server/actors/script.js
@@ +5107,4 @@
>
> /**
> * Return a promise of a SourceMapConsumer for the source map for
> * |aScript|; if we already have such a promise extant, return that.
Yeah, we definitely weren't doing this: "if we already have such a promise extant, return that."
The rest of the patch is just making a crappy test better.
Comment 8•10 years ago
|
||
Comment on attachment 8512222 [details] [diff] [review]
source-map-requested-200x.patch
Review of attachment 8512222 [details] [diff] [review]:
-----------------------------------------------------------------
::: toolkit/devtools/server/tests/unit/head_dbg.js
@@ +606,5 @@
> + * @returns Promise<response>
> + */
> +function reload(tabClient) {
> + let deferred = promise.defer();
> + tabClient._reload({}, deferred.resolve);
How come you are not using tabClient.reload() instead?
Attachment #8512222 -
Flags: review?(past) → review+
Assignee | ||
Comment 9•10 years ago
|
||
(In reply to Panos Astithas [:past] (overloaded, please needinfo) from comment #8)
> Comment on attachment 8512222 [details] [diff] [review]
> source-map-requested-200x.patch
>
> Review of attachment 8512222 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: toolkit/devtools/server/tests/unit/head_dbg.js
> @@ +606,5 @@
> > + * @returns Promise<response>
> > + */
> > +function reload(tabClient) {
> > + let deferred = promise.defer();
> > + tabClient._reload({}, deferred.resolve);
>
> How come you are not using tabClient.reload() instead?
Because reload doesn't take a callback :/
Assignee | ||
Updated•10 years ago
|
Keywords: checkin-needed
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 36
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•