Last Comment Bug 668690 - scripts blocked by CAPS are still fetched, starting with Fx 4
: scripts blocked by CAPS are still fetched, starting with Fx 4
Status: RESOLVED FIXED
: dev-doc-complete
Product: Core
Classification: Components
Component: DOM (show other bugs)
: Trunk
: All All
: P2 normal (vote)
: mozilla8
Assigned To: Boris Zbarsky [:bz] (still a bit busy)
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-06-30 17:42 PDT by al_9x
Modified: 2011-08-22 13:58 PDT (History)
6 users (show)
bzbarsky: in‑testsuite?
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
When scripts are disabled, don't bother preloading them. (1.14 KB, patch)
2011-06-30 20:27 PDT, Boris Zbarsky [:bz] (still a bit busy)
jonas: review+
Details | Diff | Splinter Review

Description al_9x 2011-06-30 17:42:07 PDT
test page: <script src="script.js"></script>
policy: user_pref("capability.policy.default.javascript.enabled", "noAccess");

The above policy prevents script fetching in Fx 3.6 but not in 4 & 5
Comment 1 al_9x 2011-06-30 19:39:22 PDT
Last good nightly: 2010-05-03
First bad nightly: 2010-05-04

Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=83c887dff0da&tochange=d6bb0f9e9519
Comment 2 Boris Zbarsky [:bz] (still a bit busy) 2011-06-30 20:24:53 PDT
Sounds like the HTML5 parser prefetch at work.  The script is not executed, of course.  I suppose we can condition it for scripts on whether script is enabled for the document...

In particular, nsScriptLoader::ProcessScriptElement does an enabled check, but nsScriptLoader::PreloadURI does not.

Jonas, any objections to adding it?
Comment 3 Boris Zbarsky [:bz] (still a bit busy) 2011-06-30 20:27:21 PDT
Created attachment 543332 [details] [diff] [review]
When scripts are disabled, don't bother preloading them.
Comment 4 Boris Zbarsky [:bz] (still a bit busy) 2011-07-05 14:35:40 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/78406c193536
Comment 5 Mounir Lamouri (:mounir) 2011-07-06 06:01:24 PDT
Merged:
http://hg.mozilla.org/mozilla-central/rev/78406c193536
Comment 6 Eric Shepherd [:sheppy] 2011-08-22 13:58:55 PDT
This bug fix is listed on Firefox 8 for developers.

Note You need to log in before you can comment on or make changes to this bug.