Commit Graph

186 Commits

Author SHA1 Message Date
Jon Coppeard
47ff6460be Bug 1480966 - Make ScriptLoader::GetScriptSource faillible on OOM r=baku 2018-08-08 10:40:03 +01:00
Jon Coppeard
7e4b3bcb99 Bug 1480720 - Factor out script fetch options from script load request classes r=baku 2018-08-06 10:54:28 +01:00
Jan de Mooij
e0ef865217 Bug 1479363 part 5 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in remaining dom/ directories. r=mccr8 2018-08-02 08:49:00 +02:00
Jon Coppeard
43dbbc475e Bug 1477090 - Only instantiate modules when it's safe to run script r=baku 2018-08-01 11:47:04 +01:00
Jon Coppeard
b64ad562af Bug 1475228 - Allocate script loader source buffers on the JS heap and pass ownership when compiling r=baku 2018-07-17 14:30:24 +01:00
Jon Coppeard
d3c569854b Bug 1475228 - Don't ignore errors returned from ScriptLoader::AttemptAsyncScriptCompile() r=baku 2018-07-17 14:30:23 +01:00
Jon Coppeard
d45eed4795 Bug 1475228 - Refactor ScriptLoader::GetScriptSource() to remove inline data argument r=baku 2018-07-17 14:30:23 +01:00
Jon Coppeard
4ff436874c Bug 1475228 - Make asynchronous compile APIs take SourceBufferHolders r=jandem 2018-07-17 14:30:23 +01:00
Andreea Pavel
840f785b1e Backed out 8 changesets (bug 1475228) for wpt failures e.g. html/semantics/scripting-1/the-script-element/execution-timing/088.html on a CLOSED TREE
Backed out changeset b2d18ea619ec (bug 1475228)
Backed out changeset 45d3ffe3308e (bug 1475228)
Backed out changeset 02b27f8441be (bug 1475228)
Backed out changeset b82c2cf4b3f1 (bug 1475228)
Backed out changeset 2bc8f24dc3fc (bug 1475228)
Backed out changeset 6104ea971587 (bug 1475228)
Backed out changeset 7c83633262db (bug 1475228)
Backed out changeset 34fb24d52f08 (bug 1475228)
2018-07-30 16:49:02 +03:00
Jon Coppeard
7c613e5ab4 Bug 1475228 - Allocate script loader source buffers on the JS heap and pass ownership when compiling r=baku 2018-07-17 14:30:24 +01:00
Jon Coppeard
6fdbbb556c Bug 1475228 - Don't ignore errors returned from ScriptLoader::AttemptAsyncScriptCompile() r=baku 2018-07-17 14:30:23 +01:00
Jon Coppeard
a694b41a5e Bug 1475228 - Refactor ScriptLoader::GetScriptSource() to remove inline data argument r=baku 2018-07-17 14:30:23 +01:00
Jon Coppeard
cdfffa27fe Bug 1475228 - Make asynchronous compile APIs take SourceBufferHolders r=jandem 2018-07-17 14:30:23 +01:00
Jan de Mooij
80adc67aba Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Jan de Mooij
fad02aba7d Bug 1474540 - Assert we don't pass cross-compartment wrappers to AutoJSAPI::Init. r=bholley 2018-07-24 09:19:25 +02:00
Jan de Mooij
0ae9863373 Bug 1474541 part 2 - Assert we don't pass cross-compartment wrappers to AutoEntryScript. r=bz 2018-07-25 10:42:40 +02:00
Brian Hackett
f594284848 Bug 1470795 Part 5 - Update content parse users for API movement, r=froydnj.
--HG--
extra : rebase_source : 856eecd3568adc9873b899a38ad96bbf24ebe955
2018-07-23 21:45:33 +00:00
Brian Hackett
06d1d0dddb Bug 1465292 Part 3 - Track parsed content from loaded script files, r=smaug.
--HG--
extra : rebase_source : 6ccda629306428c65eb4d2e912b5ee41b91019bf
2018-07-23 21:42:20 +00:00
Csoregi Natalia
f03960010a Backed out changeset 438598073b9b (bug 1474540) for assertion failure at ScriptSettings.cpp:493 on Android. CLOSED TREE 2018-07-24 11:34:09 +03:00
Jan de Mooij
9100d22449 Bug 1474540 - Assert we don't pass cross-compartment wrappers to AutoJSAPI::Init. r=bholley 2018-07-24 09:19:25 +02:00
Jan de Mooij
8c93c6e9e8 Bug 1475559 part 5 - Pass a global object to nsScriptErrorWithStack. r=bz
The stack object might be a CCW and we want to make it impossible to get a CCW's global. Now the caller has to supply a same-compartment global object, so we no longer rely on getting the CCW's global.
2018-07-21 14:34:37 +02:00
Nazım Can Altınova
7fc9a27753 Bug 1474341 - Add AutoProfilerLabel to ScriptLoader::ProcessScriptElement r=mstange
MozReview-Commit-ID: 4wcSDgz3x0E

--HG--
extra : rebase_source : 3769c681908df9b94120ab58f982ac88b4badf56
2018-07-09 18:06:20 +02:00
Nazım Can Altınova
7dd60d07b7 Bug 1475006 - Remove mAutoProfilerLabel from AutoEntryScript in non-MOZ_GECKO_PROFILER builds r=mstange
MozReview-Commit-ID: 66mZK4q2ATK

--HG--
extra : rebase_source : ae72897b128731b8d721a3db230009a605b1560a
2018-07-12 11:01:08 +02:00
Jan de Mooij
7967870e29 Bug 1473865 part 4 - Use xpc::WindowOrNull instead of xpc::WindowGlobalOrNull in a few places. r=bz 2018-07-12 16:17:44 +02:00
Jan de Mooij
4f7b2378dc Bug 1474273 - Add xpc::CurrentNativeGlobal and use it instead of NativeGlobal(JS::CurrentGlobalOrNull(cx)). r=bz 2018-07-11 14:07:02 +02:00
Cosmin Sabou
26e792fe42 Merge autoland to mozilla-central. a=merge 2018-07-11 00:50:32 +03:00
Nazım Can Altınova
c51d375549 Bug 1473303 - Add a AutoProfilerLabel member to AutoEntryScript class to add a label frame for evaluating scripts r=bz
MozReview-Commit-ID: CqfO7r7JoPS

--HG--
extra : rebase_source : 44f85f3b698ddb539134f75ea2bbc324b7ce8627
2018-07-04 15:35:07 +02:00
Andrea Marchesini
5fff1762ad Bug 1418236 - Correct EventTarget for CSP violation events, r=ckerschb 2018-07-10 17:40:21 +02:00
Andrea Marchesini
14d462eeb3 Bug 1418246 - Return valid columnNumber value in CSP violation events, r=ckerschb 2018-07-05 08:21:04 +02:00
Emilio Cobos Álvarez
c7d35aa526 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Jan de Mooij
09c4068fa0 Bug 1464134 part 1 - Fix various places to use Realm instead of JSCompartment. r=luke 2018-05-31 11:28:48 +02:00
Olli Pettay
ae2b960685 Bug 1459309 - currentScript should be null when evaluating scripts from shadow DOM, r=peterv
--HG--
extra : rebase_source : 53979237d9d94438966ef470cc9ff80d612ef4ee
2018-05-11 20:24:50 +03:00
Jon Coppeard
a844ec84c4 Bug 1427610 - Implement import.meta in the browser r=bkelly 2018-05-23 09:30:13 +01:00
Nicolas B. Pierron
bdd58b3482 Bug 1461672 - Remove Telemetry probe added to tune the JSBC. r=francois,bkelly 2018-05-21 17:17:18 +00:00
Jon Coppeard
8d493df52b Bug 1444956 - Support BinAST decoding in the script loader r=baku 2018-05-16 15:58:13 +01:00
Jon Coppeard
65b2944794 Bug 1461751 - Simplify module resolve hook to be a function pointer r=luke r=baku 2018-05-16 11:59:09 +01:00
Jan de Mooij
9cfbaa7e06 Bug 1461292 part 2 - Rename JSAutoNullableCompartment to JSAutoNullableRealm. r=bz 2018-05-16 10:53:45 +02:00
Jan de Mooij
80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Jon Coppeard
0924042900 Bug 1456774 - Remove linear search for finished parse task and type off thread parse token r=jandem r=baku 2018-05-10 14:51:14 +01:00
Chris Peterson
71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Michal Novotny
ee8f43208a Bug 1448476 - Cache entry corruption after writing the alternate data. r=honzab
When writing to alt-data output stream fails for whatever reason, we now try to
truncate alternative data and keep the original data instead of dooming the
whole entry. The patch also changes how is the predicted size passed to the
cache. Instead of a dedicated method it's now an argument of openOutputStream
and openAlternativeOutputStream methods which fail in case the entry would
exceed the allowed limit.
2018-04-25 07:01:00 +03:00
Andrew McCreight
269f53f8b6 Bug 1451985 - Tell the cycle collector about ScriptLoadRequest::mElement. r=baku
Not doing this can cause a leak because there is a cycle between the
load request and the script element.

MozReview-Commit-ID: E7GbH5iDBP6

--HG--
extra : rebase_source : b9c16b5a40bf465f28f792cbf727909d1f976c31
2018-04-19 16:33:12 -07:00
Jon Coppeard
96a3f31ff4 Bug 1453559 - Don't use channel URI for loading modules from resource: scheme r=baku 2018-04-13 14:15:33 +01:00
Karl Tomlinson
2405fe930c bug 1328964 use nsContentUtils::GetCurrentJSContext() on all threads r=smaug
nsContentUtils::GetCurrentJSContextForThread() originally needed to use
workers::GetCurrentThreadJSContext() in
https://hg.mozilla.org/mozilla-central/rev/366a45b41539#l2.18
because CycleCollectedJS*()->Context() did not exist until
https://hg.mozilla.org/mozilla-central/rev/1a0cd542e1e9#l7.12

nsContentUtils::GetCurrentJSContext() is thread-safe since these changes:
https://hg.mozilla.org/mozilla-central/rev/e636c7186286#l3.12
https://hg.mozilla.org/mozilla-central/rev/c8029c072776#l2.12

MozReview-Commit-ID: 2f1eGS9uBBO

--HG--
extra : rebase_source : dad1d2084a63413c3975f9e7c66c6b06857c9f23
2018-04-09 12:11:18 +12:00
Nicolas B. Pierron
d8df648fc6 Bug 1448194 - Substract the mBytecodeOffset from the bytecode length, as this could cause some assertion failures. r=mrbkap 2018-04-06 09:47:47 +00:00
Jon Coppeard
1ce8789ad0 Bug 1440827 - Cancel preloaded requests if we decide not to use them r=baku 2018-03-29 17:11:41 +01:00
Christoph Kerschbaumer
a929955d1f Bug 1439713 - Change nsIContentPolicy shouldLoad to take an <uri, loadInfo> pair instead of the various args. r=bz 2018-03-29 12:16:23 +02:00
Kris Maglione
83371fe0b5 Bug 1445551: Part 4 - Remove compartment-per-addon. r=mccr8
The compartment-per-addon code was added so that we could segregate at least
some of the code from system-privileged add-ons into tagged compartments, even
when it ran in browser windows. That allowed us to apply certain special
behavior to them, such as enabling e10s shims, and to track some performance
characteristics.

The only remaining chrome-privileged add-ons now are system add-ons controlled
by us, and the shim system and per-compartment performance metrics are gone,
it no longer serves a purpose.

MozReview-Commit-ID: Ap186bWAaqP

--HG--
extra : rebase_source : c5bf81b44dd42b7cebce2784b7dd98480b41b593
2018-03-13 19:43:30 -07:00
Olli Pettay
2439836b37 Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00