Closed Bug 889530 Opened 6 years ago Closed 6 years ago

Source maps are permanently cached

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 26

People

(Reporter: thomas, Assigned: fitzgen)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached file dev-tools-tests5.zip
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:25.0) Gecko/20130702 Firefox/25.0 (Nightly/Aurora)
Build ID: 20130702031131

Steps to reproduce:

Using 25.0a1 (2013-07-02)

1. Unizip the attached zip to a standard apache http server public folder
2. Open the debugger and check the Show original sources in the debugger's configuration menu
2. With the browser navigate to http://localhost/~{$user}/path/to/dev-tools-tests5/
3. Everything is working as expected. The .ts file is displayed in the source list etc.
4. Rename the file dev-tools-tests5/ts/Greeter.ts to dev-tools-tests5/ts/Greeter2.ts
5. Recompile  tsc ts/* --sourcemap --out ./all.js
6. Refresh the test case

If you do not have the TypeScript compiler at hand I guess you can:

4. Rename the file dev-tools-tests5/ts/Greeter.ts to dev-tools-tests5/ts/Greeter2.ts
5. Manually manipulate the sources property in all.js.map

I guess this also applies to eg. Coffee Script




Actual results:

After the renaming and re-compiling, the debugger tries to load ts/Greeter.ts resulting with a 404 response in the source code view


Expected results:

The debugger should have loaded ts/Greeter2.ts
Component: Untriaged → Developer Tools: Debugger
We haven't been loading the original sources from cache since bug 865252, but we are loading the source map from cache which points at the old source.

I suspect just changing http://mxr.mozilla.org/mozilla-central/source/toolkit/devtools/server/actors/script.js#2655 to pass in { loadFromCache: false } to |fetch|'s will fix this problem.
Assignee: nobody → nfitzgerald
Priority: -- → P3
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Mac OS X → All
Hardware: x86 → All
Version: 25 Branch → Trunk
Depends on: 878307
Summary: Original sources are loaded from cache → Source maps are permanently cached
Comment on attachment 793687 [details] [diff] [review]
bug-889530-source-maps-cached.patch

Review of attachment 793687 [details] [diff] [review]:
-----------------------------------------------------------------

r+ with green try run.
Attachment #793687 - Flags: review?(vporof) → review+
Grrr, tests pass locally, but it looks like bug 907839 is bigger than I thought and NetUtil.asyncFetch won't grab .json files in xpcshell tests on some platforms or something. It passes locally :-/

(Removing other dep because it only depends on that bug to avoid test file name clashes).
Depends on: 907839
No longer depends on: 878307
Still working locally. Here's another try push, this time with some logging so if it fails on try, maybe we can get some incite into why.

https://tbpl.mozilla.org/?tree=Try&rev=0c6c210b0668
I think that this isn't actually asyncFetch's fault, but when we access the contentType of the request it goes through nsBlocklistService. New attempt: https://tbpl.mozilla.org/?tree=Try&rev=14cd44de9519
After talking with bz, figured out that attempting to get the content type of an unknown extension was the fault here, so I renamed the source map with .txt.

https://tbpl.mozilla.org/?tree=Try&rev=05a22066479b
Attachment #793687 - Attachment is obsolete: true
https://hg.mozilla.org/mozilla-central/rev/668d5c3eec49
Status: NEW → RESOLVED
Closed: 6 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 26
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.