Commit graph

168 commits

Author SHA1 Message Date
Andrea Marchesini
1981f67eb3 Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00
Carsten "Tomcat" Book
f0d6de60d7 Backed out changeset 5d77f6b14633 (bug 1362119) for android bustage in nsCCUncollectableMarker.cpp:500:7: error: 'TraceScriptHolder' is not a member of 'mozilla'
--HG--
rename : dom/script/ScriptSettings.cpp => dom/base/ScriptSettings.cpp
rename : dom/script/ScriptSettings.h => dom/base/ScriptSettings.h
rename : dom/script/nsIScriptElement.h => dom/base/nsIScriptElement.h
rename : dom/script/nsIScriptLoaderObserver.idl => dom/base/nsIScriptLoaderObserver.idl
rename : dom/script/ScriptElement.cpp => dom/base/nsScriptElement.cpp
rename : dom/script/ScriptElement.h => dom/base/nsScriptElement.h
rename : dom/script/ScriptLoader.cpp => dom/base/nsScriptLoader.cpp
rename : dom/script/ScriptLoader.h => dom/base/nsScriptLoader.h
2017-05-08 09:54:38 +02:00
Andrea Marchesini
7a4ef797cb Bug 1362119 - part 1 - Moving dom/base/Script{Loader,Element}.* in dom/script, r=ehsan
This patch does these things:

1. it moves nsScriptElement, nsScriptLoader, ScriptSettings, nsIScriptElement
   and nsIScriptLoaderObserver in dom/script
2. it renames nsScriptElement to mozilla::dom::ScriptElement
3. it renames nsScriptLaoder to mozilla::dom::ScriptLoader

--HG--
rename : dom/base/nsScriptElement.cpp => dom/script/ScriptElement.cpp
rename : dom/base/nsScriptElement.h => dom/script/ScriptElement.h
rename : dom/base/nsScriptLoader.cpp => dom/script/ScriptLoader.cpp
rename : dom/base/nsScriptLoader.h => dom/script/ScriptLoader.h
rename : dom/base/ScriptSettings.cpp => dom/script/ScriptSettings.cpp
rename : dom/base/ScriptSettings.h => dom/script/ScriptSettings.h
rename : dom/base/nsIScriptElement.h => dom/script/nsIScriptElement.h
rename : dom/base/nsIScriptLoaderObserver.idl => dom/script/nsIScriptLoaderObserver.idl
2017-05-08 08:24:22 +02:00
Andrea Marchesini
2743450ad5 Bug 1330900 - Implement <script nomodule>, r=bz
This patch implements:
. noModule getter/setter for HTMLScriptElement
. the nomodule attribute for HTMLScriptElement
. and the logic in nsScriptLoader that denies the loading of a nomodule script
. with tests
2017-05-04 10:24:13 +02:00
Sebastian Hengst
d94e350008 Backed out changeset d40e448b1a33 and 195d6bc4e2ca (bug 1358882) for asserting and failing in wpt circular-module-import-with-syntax-error.html. r=backout 2017-05-02 21:18:02 +02:00
Jon Coppeard
756162222b Bug 1358882 - Fix android bustage r=me 2017-05-02 18:23:38 +01:00
Jon Coppeard
639071303d Bug 1358882 - Check for failed instantiation when starting to fetch module dependencies r=smaug 2017-05-02 18:01:51 +01:00
Nicolas B. Pierron
cf3fce3eb4 Bug 900784 part 1.6 - Add a test case for the JS start-up bytecode cache. r=mrbkap 2017-04-21 16:57:58 +00:00
Nicolas B. Pierron
c6509f9e01 Bug 900784 part 1.5 - Encode JS bytecode when no more scripts are executed. r=mrbkap 2017-04-21 16:57:58 +00:00
Nicolas B. Pierron
5b59221f67 Bug 900784 part 1.4 - Decode JS bytecode either off/on-main-thread. r=mrbkap 2017-04-21 16:57:58 +00:00
Nicolas B. Pierron
86094a7a6d Bug 900784 part 1.3 - Add SRI hash import/export code from/to JS bytecode cache. r=francois,mrbkap 2017-04-21 16:57:57 +00:00
Nicolas B. Pierron
287c866026 Bug 900784 part 1.2 - Request JS bytecode if any is present in the cache. r=mrbkap 2017-04-21 16:57:57 +00:00
Nicolas B. Pierron
d52b01efa3 Bug 900784 part 1.1 - Add nsScriptLoader::mDataType to track the type of the loaded content. r=mrbkap 2017-04-21 16:57:57 +00:00
Nicolas B. Pierron
49b55aae35 Bug 900784 part 1.0 - Add nsJSUtils functions for encoding and decoding the bytecode. r=mrbkap 2017-04-21 16:57:57 +00:00
Nicolas B. Pierron
0e685e0450 Bug 900784 part 0.12 - Assert nsScriptLoadRequest::mProgress state in nsScriptLoader methods. r=mrbkap 2017-04-21 16:57:57 +00:00
Nicolas B. Pierron
39741d711a Bug 1331662 part 2 - Replace nsJSUtils::EvaluateString calls by ExecutionContext scopes. r=bz 2017-03-22 13:42:27 +00:00
Kris Maglione
437f4e37d4 Bug 1333990: Part 1a - Add an async script pre-loading utility. r=billm,shu
MozReview-Commit-ID: 4vJF2drLeHS

--HG--
extra : rebase_source : 8adaa22d6d91ac6ef1804cf4c8d5698cf304b141
2017-03-16 19:10:40 -07:00
Kerem KAT
0d9b07ec14 Bug 247996 - Add JS console warnings for every script element with an src that fails to load/execute it. r=bzbarsky
MozReview-Commit-ID: 4fH6UFqUhfY
2017-03-09 19:54:26 +03:00
David Teller
556a4f4db5 Bug 1345437 - Gather telemetry for the encoding of external scripts;r=hsivonen
MozReview-Commit-ID: 2zjxBWxBGPK

--HG--
extra : rebase_source : 641d4e6f22acab3649e04743ebd0836eab085b8e
2017-03-08 14:08:36 +01:00
Andrea Marchesini
e9195daa8d Bug 1345168 - Get rid of OriginAttributes::Inherit, r=tjr 2017-03-08 07:41:51 +01:00
Wei-Cheng Pan
510ba75c20 Bug 1310127 - Part 17: Use MOZ_MUST_USE in netwerk/protocol/http r=smaug
MozReview-Commit-ID: 5gvVZtsa3yS

--HG--
extra : rebase_source : 5e1ab2fc06ae58f18abb8909ac93f9512abbe220
2016-12-20 11:49:32 +08:00
Jon Coppeard
67ff09d80c Bug 1342810 - Check for instantiation failure when a previously-loaded module is requested r=smaug 2017-02-28 10:47:19 +00:00
Jon Coppeard
2c2e96fdc0 Bug 1340865 - Handle non-parser-created module scripts r=smaug 2017-02-27 15:04:21 +00:00
Tim Huang
756cf900c9 Bug 1336802 - Part 2: Updating the whole code base to make sure nsILoadInfo get null check. r=smaug
--HG--
extra : rebase_source : 22149fd540fd02119afe9fe5c9a815d01cf959c1
2017-02-07 11:49:34 +08:00
Jon Coppeard
97b56e2adf Bug 1330657 - Enable <script type="module"> behind a pref r=bkelly 2017-02-08 17:08:33 +00:00
Jon Coppeard
9fa0007ac3 Bug 1330682 - Use CORS when loading modules as per current spec r=bkelly 2017-02-08 14:31:49 +00:00
Tom Tung
e185f7bc4c Bug 1220936 - Flush console report to innerWindowID by using nsIDocument and nsILoadGroup. r=bkelly. 2017-02-06 09:19:34 +08:00
Tim Huang
a7c11235fd Bug 1312954 - Part 6: Update all callers of network predictor, and the docshell will update the first party domain if it is a typeContent mozbrowser. r=smaug 2017-02-02 22:16:00 -05:00
Nicolas B. Pierron
ca59a6685f Bug 900784 part 0.10 - Fix MOZ_LOG arguments indentation in nsScriptLoader.cpp. r=nbp 2017-01-31 20:03:57 +00:00
Nicolas B. Pierron
4c286a9c0c Bug 900784 part 0.9 - Add ScriptLoader LazyLogModule. r=jonco 2017-01-31 20:03:57 +00:00
Nicolas B. Pierron
2acbb289f0 Bug 900784 part 0.6 - Remove useless static_cast from nsScriptLoader::OnStreamComplete. r=bkelly 2017-01-31 20:03:57 +00:00
Nicolas B. Pierron
cee2c0f92d Bug 900784 part 0.5 - Replace manual handling of the ScriptText buffer of nsScriptLoadRequest. r=bkelly
Replace mScriptTextBug and mScriptTextLEngth of the nsScriptLoadRequest by an
equivalent Vector.

Also remove the aString argument from the nsScriptLoader::PrepareLoadedRequest
and nsScriptLoader::OnStreamComplete, as the nsScriptLoadHandler is now writing
to the Vector held by the nsScriptLoadRequest.

Doing so is needed to avoid adding more arguments to OnStreamComplete, as we are
going to add the bytecode cache input in a similar way as the text input.
2017-01-31 20:03:57 +00:00
Nicolas B. Pierron
e2298251e0 Bug 900784 part 0.4 - Move aScriptFromHead to the ScriptLoadRequest. r=bkelly
Moving aScriptFromHead to a field of the ScriptLoadRequest ensure that all the
state to call StartLoad is either in the ScriptLoader or in the
ScriptLoadRequest.

Thus, we can later add new calls to StartLoad, if we have to restart a request
because of some decoding issues.
2017-01-31 20:03:57 +00:00
Nicolas B. Pierron
56de00a22d Bug 900784 part 0.3 - Remove unused aType argument from nsScriptLoader::StartLoad. r=bkelly
This is a clean-up patch comming after Bug 1194526 and Bug 1268147 which removed
the need for the aType argument which used to be required by the CSP.
2017-01-31 20:03:57 +00:00
Nicolas B. Pierron
f21b4e724a Bug 900784 part 0.2 - Rename nsScriptLoadHandler::TryDecodeRawData to DecodeRawData. r=jonco 2017-01-31 20:03:57 +00:00
Nicolas B. Pierron
57981315de Bug 900784 part 0.1 - Fix typo in nsScriptLoader::StartLoad. r=jonco 2017-01-31 20:03:56 +00:00
Bill McCloskey
a1715e6737 Bug 1331804 - New naming scheme for runnables (r=ehsan)
MozReview-Commit-ID: FOfrUXwGYws
2017-01-24 16:34:37 -08:00
Wes Kocher
f7ccafcb58 Backed out 8 changesets (bug 1331804, bug 1332100) for windows vm debug dt5 failures a=backout
Backed out changeset 8bf7f0e27c6c (bug 1331804)
Backed out changeset 600c0b9026c2 (bug 1331804)
Backed out changeset 3a5b5b9ecace (bug 1331804)
Backed out changeset c76432c9954e (bug 1331804)
Backed out changeset 46a9096745e7 (bug 1332100)
Backed out changeset 8b751230fa23 (bug 1331804)
Backed out changeset 2810212347fd (bug 1331804)
Backed out changeset be72b7763910 (bug 1331804)

MozReview-Commit-ID: Ywdsr4GZ4a
2017-01-24 15:12:21 -08:00
Bill McCloskey
187dedfae8 Bug 1331804 - New naming scheme for runnables (r=ehsan)
MozReview-Commit-ID: FOfrUXwGYws
2017-01-24 10:04:55 -08:00
Olli Pettay
0364dbc792 Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8
--HG--
extra : rebase_source : 3ae1207308de120b7299b13ecaa95dd1612b3459
2017-01-03 21:47:55 +02:00
Ehsan Akhgari
a0fd21a161 Bug 1321874 - Part 2: Use the passive tracking protection API to determine whether a script is tracking; r=bkelly 2016-12-23 15:38:43 -05:00
Ehsan Akhgari
f89384d1a3 Bug 1321874 - Part 1: Revert the script loader changes from bug 1321868; r=bkelly 2016-12-23 15:38:40 -05:00
Ehsan Akhgari
3cade99c10 Bug 1321868 - Add an API to nsIDocument to determine whether a script is on the tracking protection list; r=bkelly
In order to be able to put timeouts in the correct bucket as soon as
they are scheduled, we need to be able to synchronously tell whether a
timeout is coming from a script that is on the tracking protection list.
But the URL Classifier API which we use for this task is asynchronous.
Because of this, and to avoid unnecessary IPC from the content to the
parent process every time we need to know where a script came from, we
cache this information in nsIDocument.  The hash table mTrackingScripts
will have one entry per script loaded in the document which is on the
tracking protection list.

For performance reasons, we coalesce querying whether a script source
URL is on the tracking protection list with the load of the script from
the network.  In most cases we'll have the response from the URL
Classifier service before the script load is finished, but on the off
chance that the load finishes first, we wait before finishing the script
load to get the response from the URL Classifier service.
2016-12-02 15:37:11 -05:00
Bill McCloskey
0331382a72 Bug 1318506 - Assign DocGroup for ScriptLoader runnable (r=ehsan)
MozReview-Commit-ID: G8nQdpq11bR
2016-12-01 15:00:13 -08:00
Bill McCloskey
2336b52695 Bug 1318506 - Label some common runnables with a DocGroup (r=ehsan)
MozReview-Commit-ID: 19gyZRfbzXP
2016-12-01 15:00:13 -08:00
Sebastian Hengst
bc90f7a8c9 Backed out changeset ee28526a9033 (bug 1318506) for frequent failure in clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys.html. r=backout 2016-12-01 13:36:31 +01:00
Sebastian Hengst
fc5cc275d5 Backed out changeset bb19a439bfbd (bug 1318506) 2016-12-01 13:35:11 +01:00
Bill McCloskey
4f5758d3cf Bug 1318506 - Assign DocGroup for ScriptLoader runnable (r=ehsan)
MozReview-Commit-ID: G8nQdpq11bR
2016-11-30 18:01:59 -08:00
Bill McCloskey
4143046195 Bug 1318506 - Label some common runnables with a DocGroup (r=ehsan)
MozReview-Commit-ID: 19gyZRfbzXP
2016-11-30 18:01:59 -08:00
Christoph Kerschbaumer
c267f70f91 Bug 1299483 - CSP: Implement 'strict-dynamic', enforcement changes. r=dveditz,freddyb 2016-11-08 12:55:23 +01:00