Editing a @require line doesn't make the different version of the relevant file to be downloaded anymore #2311

Closed
darkred opened this Issue Oct 26, 2015 · 4 comments

Projects

None yet

3 participants

@darkred
darkred commented Oct 26, 2015

To reproduce
(using GM 3.5beta4 stable in Nightly 44 x64)
(it doesn't occur in GM 3.5 stable in Firefox 41.0.2 stable) :

create an empty userscript, e.g. test, containing just this line:
// @require http://code.jquery.com/jquery-1.11.3.min.js
and reload the page.
You'll see in gm_scripts\test that the jquery-1.11.3.min.js is downloaded

Now edit that line into
// @require http://code.jquery.com/jquery-2.1.4.min.js
and reload the page.
You'll see now that the new file is not downloaded (the previous, query-1.11.3.min.js remains).

@janekptacijarabaci
Contributor

http://wiki.greasespot.net/Metadata_Block#.40require
Each @require is downloaded once, when the script is installed

See also #2250

@arantius arantius added this to the 3.6 milestone Oct 26, 2015
@arantius
Collaborator

Editing the metadata to specify a different require should cause them to be downloaded again.

@darkred You said "reproduce using GM 3.5beta4" and "doesn't occur in GM 3.5 stable" but also changed the Firefox versions. Testing all combinations would be helpful.

@janekptacijarabaci
Contributor

GM 3.5 stable + df7654b

Confirmed on:
Firefox 44.0a1 Nightly x64 (2015-10-23) (e10s: on/off)
Firefox 44.0a1 Nightly (2015-10-25) (e10s: on/off)

Not confirmed on:
Firefox 43.0a2 Developer Edition (2015-10-25)
Firefox 41.0.2

@janekptacijarabaci
Contributor

The problem is this line:
https://github.com/greasemonkey/greasemonkey/blob/3.5/modules/requestObserver.js#L20

Firefox 43.0a2 Developer Edition (2015-10-25)
Firefox 41.0.2
channel.loadInfo.contentPolicyType == Ci.nsIContentPolicy.TYPE_(SUB)DOCUMENT

Firefox 44.0a1 Nightly x64 (2015-10-23) (e10s: on/off)
Firefox 44.0a1 Nightly (2015-10-25) (e10s: on/off)
channel.loadInfo.contentPolicyType == undefined

@arantius arantius closed this in d7d5413 Nov 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment