Closed Bug 889530 Opened 8 years ago Closed 8 years ago

Source maps are permanently cached


(DevTools :: Debugger, defect, P3)



(Not tracked)

Firefox 26


(Reporter: thomas, Assigned: fitzgen)




(2 files, 1 obsolete file)

Attached file
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

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 to pass in { loadFromCache: false } to |fetch|'s will fix this problem.
Assignee: nobody → nfitzgerald
Priority: -- → P3
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]

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.
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:
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.
Attachment #793687 - Attachment is obsolete: true
Closed: 8 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.