Граф коммитов

147 Коммитов

Автор SHA1 Сообщение Дата
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
Jon Coppeard 556585c65f Bug 1297558 - Remove explicit calls to Expose*ToActiveJS r=mccr8 2016-10-18 17:58:19 +01:00
Andrea Marchesini 0563a867cb Bug 1299686 - Fix crash in nsScriptLoader.cpp. r=smaug
--HG--
extra : rebase_source : 9ba5328cd6d907dec2a4c95b5d557cad0317e44e
2016-09-22 16:58:46 -04:00
Boris Zbarsky ca48a2a2c0 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 5994c71158 Bug 1301251 - Handle GetSpec() failure in nsContentUtils::GetWrapperSafeScriptFilename(), r=smaug 2016-09-19 15:50:22 +02:00
Andi-Bogdan Postelnicu 8f2af4af11 Bug 1302658 - substitute null checks with NS_ENSURE_TRUE. r=baku
MozReview-Commit-ID: GQmfWrmhKNg

--HG--
extra : rebase_source : 50c8dbac10a8b249bccce27616159daec9d9af1a
2016-09-14 12:15:01 +03:00
Andi-Bogdan Postelnicu 3fb6fb25a2 Bug 1302109 - if mDocument is null return from PreloadURI. r=baku
MozReview-Commit-ID: FoSVrK9PT3s

--HG--
extra : rebase_source : 5ce2721bb02d4277008ee97ac4e102f6301ac198
2016-09-12 17:22:15 +03:00
Andrew McCreight 85213c72b0 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

--HG--
extra : rebase_source : a9231a81c2791f1da6918595e2d6329f7ba14e79
2016-09-07 14:39:34 -07:00
Tom Tung db38e2111a 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 78670a91d5 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 363a5143aa 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 85403ede23 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 b258dfaa89 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 2317b2fef5 Bug 1295978 - Eagerly instantiate module dependencies r=bkelly 2016-08-26 11:09:52 +01:00
Kan-Ru Chen b6d880aca1 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


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Jon Coppeard 5b24ece193 Bug 1292614 - Set introductionType correctly for imported modules r=smaug
--HG--
extra : rebase_source : 2e6fc7a12929bb551178878d6797acc8fbfed7d7
2016-08-18 10:26:16 +01:00
Nicholas Nethercote ca40b738e4 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.

--HG--
extra : rebase_source : f82426e7584d0d5cddf7c2524356f0f318fbea7d
2016-08-12 15:19:29 +10:00
Jan de Mooij 0ad12515f4 Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
Nicholas Nethercote e7f10a07fd 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.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Ben Kelly b8e8e264e4 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 930377928e Bug 1286321 - always ignore language attribute when processing script element if type attribute is defined. r=bz
MozReview-Commit-ID: AQV9mkYzLL2

--HG--
extra : transplant_source : %92%96%BC2%0C%CA%C1%14%F4%A4%18B%0E%D5%28%A5NI%15T
2016-07-13 12:10:13 -04:00
Jan de Mooij 0f65c9be84 Bug 1286159 - Clean up FinishOffThread* APIs for off-thread parsing. r=jonco 2016-07-19 09:19:54 +02:00