Commit Graph
147 Commits
Author SHA1 Message Date
Jon Coppeard 1e46db1862 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 2e319c145e Bug 1340865 - Handle non-parser-created module scripts r=smaug 2017-02-27 15:04:21 +00:00
Tim Huang b3fb2c8458 Bug 1336802 - Part 2: Updating the whole code base to make sure nsILoadInfo get null check. r=smaug 2017-02-07 11:49:34 +08:00
Jon Coppeard 3cd7d4f00c Bug 1330657 - Enable <script type="module"> behind a pref r=bkelly 2017-02-08 17:08:33 +00:00
Jon Coppeard 7e28f016b5 Bug 1330682 - Use CORS when loading modules as per current spec r=bkelly 2017-02-08 14:31:49 +00:00
Tom Tung c08930401f Bug 1220936 - Flush console report to innerWindowID by using nsIDocument and nsILoadGroup. r=bkelly. 2017-02-06 09:19:34 +08:00
Tim Huang 82837b12cd 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 d1f0c8c18d 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 3844a167f5 Bug 900784 part 0.9 - Add ScriptLoader LazyLogModule. r=jonco 2017-01-31 20:03:57 +00:00
Nicolas B. Pierron f2afe10655 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 2d81b6aba1 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 9cd0cd5544 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 ab9c382f87 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 17b56a8aa9 Bug 900784 part 0.2 - Rename nsScriptLoadHandler::TryDecodeRawData to DecodeRawData. r=jonco 2017-01-31 20:03:57 +00:00
Nicolas B. Pierron 562d2d58db Bug 900784 part 0.1 - Fix typo in nsScriptLoader::StartLoad. r=jonco 2017-01-31 20:03:56 +00:00
Bill McCloskey fd6bcfe3ff Bug 1331804 - New naming scheme for runnables (r=ehsan)
MozReview-Commit-ID: FOfrUXwGYws
2017-01-24 16:34:37 -08:00
Wes Kocher ac78cfc4f2 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 724a87f692 Bug 1331804 - New naming scheme for runnables (r=ehsan)
MozReview-Commit-ID: FOfrUXwGYws
2017-01-24 10:04:55 -08:00
Olli Pettay 3898f7d882 Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8 2017-01-03 21:47:55 +02:00
Ehsan Akhgari 4bedef6264 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 f1e7960684 Bug 1321874 - Part 1: Revert the script loader changes from bug 1321868; r=bkelly 2016-12-23 15:38:40 -05:00
Ehsan Akhgari 7e0be11ac6 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 53fd89e484 Bug 1318506 - Assign DocGroup for ScriptLoader runnable (r=ehsan)
MozReview-Commit-ID: G8nQdpq11bR
2016-12-01 15:00:13 -08:00
Bill McCloskey d2a1c646a4 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 36aa13771a 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 11f67c3d9d Backed out changeset bb19a439bfbd (bug 1318506) 2016-12-01 13:35:11 +01:00
Bill McCloskey 2a440513bd Bug 1318506 - Assign DocGroup for ScriptLoader runnable (r=ehsan)
MozReview-Commit-ID: G8nQdpq11bR
2016-11-30 18:01:59 -08:00
Bill McCloskey 084d7db7cd 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 315b38541b Bug 1299483 - CSP: Implement 'strict-dynamic', enforcement changes. r=dveditz,freddyb 2016-11-08 12:55:23 +01:00
Jon Coppeard 863d796e4b Bug 1297558 - Remove explicit calls to Expose*ToActiveJS r=mccr8 2016-10-18 17:58:19 +01:00
Andrea Marchesini 2a319d0a79 Bug 1299686 - Fix crash in nsScriptLoader.cpp. r=smaug 2016-09-22 16:58:46 -04:00
Boris Zbarsky e3ea4ad157 Bug 1303397. nsScriptLoader should just use nsContentUtils::CheckForBOM instead of rolling its own copy. r=bkelly 2016-09-20 13:24:06 +01:00
Andrea Marchesini ee5bbec51a Bug 1301251 - Handle GetSpec() failure in nsContentUtils::GetWrapperSafeScriptFilename(), r=smaug 2016-09-19 15:50:22 +02:00
Andi-Bogdan Postelnicu 6e8e2782ab Bug 1302658 - substitute null checks with NS_ENSURE_TRUE. r=baku
MozReview-Commit-ID: GQmfWrmhKNg
2016-09-14 12:15:01 +03:00
Andi-Bogdan Postelnicu d9d5e1823c Bug 1302109 - if mDocument is null return from PreloadURI. r=baku
MozReview-Commit-ID: FoSVrK9PT3s
2016-09-12 17:22:15 +03:00
Andrew McCreight 7552aeae76 Bug 1301189 - Use ExposeObjectToActiveJS in nsModuleScript. r=smaug
These GC things can be passed to the JS engine, so we should make sure
they are not marked gray.

MozReview-Commit-ID: GJDogXSuqYh
2016-09-07 14:39:34 -07:00
Tom Tung 611a19f2d2 Bug 1187335 - P6 - Support script/css to set integrity metadata to serviceWorker. r=bkelly. r=francois. 2016-09-07 10:30:21 +08:00
Tom Tung c47f624bce Bug 1187335 - P2 - Modify the way to report to console for worker and use LoadTainting to decide CORS or not. r=bkelly. r=francois. 2016-09-08 09:59:40 +08:00
Boris Zbarsky 49993e0363 Bug 1297125. Make sure the parser insertion point is defined when firing the load event for external <scripts> or firing the error event on a failed external script load (but not other cases, like bogus script URL). r=hsivonen
If we have a creator parser, then we were a parser-inserted script and should
presumably be able to set a valid insertion point when we run or fire our
load/error events.  For the error event case, we do this in
nsScriptElement::ScriptAvailable, so that async error events due to things like
bogus script URLs do not end up with a valid insertion point.  For the load
event case, we just do this in ScriptEvaluated directly.

ScriptEvaluated is called while the scriptloader has our script set as the
current parser-inserted script.  But for the error event case we need to
maintain that state around the ScriptAvailable call that will fire the event.
2016-09-02 17:55:38 -04:00
Henri Sivonen 5c4d19ec9c Bug 619109 - Define the insertion point before and undefine after the synchronous script execution events. r=bzbarsky.
MozReview-Commit-ID: FAriD6I2m2L
2010-10-29 12:22:10 +03:00
Michael Layzell 5b51c96616 Bug 1297802 - Remove unused RefPtr<> and COMPtr<> types in dom/, r=baku
MozReview-Commit-ID: CLUJZdbN7sW
2016-08-29 11:40:02 -04:00
Jon Coppeard aa202960f9 Bug 1295978 - Eagerly instantiate module dependencies r=bkelly 2016-08-26 11:09:52 +01:00
Kan-Ru Chen a9b19d0584 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES
2016-08-24 14:47:04 +08:00
Jon Coppeard deba9d8c40 Bug 1292614 - Set introductionType correctly for imported modules r=smaug 2016-08-18 10:26:16 +01:00
Nicholas Nethercote 1cef4f427a Bug 1294620 - Use infallible XPIDL attribute getters more. r=erahm.
This makes a lot of code more compact, and also avoids some redundant nsresult
checks.

The patch also removes a handful of redundant checks on infallible setters.
2016-08-12 15:19:29 +10:00
Jan de Mooij bd0f1c9018 Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
Nicholas Nethercote 1f65390cc9 Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.
2016-08-08 12:18:10 +10:00
Ben Kelly d908ba6709 Bug 1287547 Don't leak HTMLScriptElement wrapper when page is closed during off-thread script parsing. r=bz 2016-07-25 15:16:58 -07:00
Decky Coss 6a02d8e0fd Bug 1286321 - always ignore language attribute when processing script element if type attribute is defined. r=bz
MozReview-Commit-ID: AQV9mkYzLL2
2016-07-13 12:10:13 -04:00
Jan de Mooij 0dfc221719 Bug 1286159 - Clean up FinishOffThread* APIs for off-thread parsing. r=jonco 2016-07-19 09:19:54 +02:00