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

141 Коммитов

Автор SHA1 Сообщение Дата
Jon Coppeard b5550b5f9f Bug 1759881 - Part 6: Remove use of nsJSUtils layer for module instantiation and evaluation r=smaug
This layer doesn't add much above calling into the JS engine and it's DOM
specific so let's remove it.

Differential Revision: https://phabricator.services.mozilla.com/D141253
2022-03-17 15:22:18 +00:00
Tooru Fujisawa c6920683db Bug 1436400 - Part 3: Remove nsJSUtils::CompileModule and directly use JSAPI with stencil. r=nbp
To add conditional JS::StartIncrementalEncoding, and also to add a bytecode
decoding branch, replace nsJSUtils::CompileModule with raw JSAPI calls with
Stencil.

Differential Revision: https://phabricator.services.mozilla.com/D140291
2022-03-15 19:05:54 +00:00
Csoregi Natalia 6ae31a2e64 Backed out 15 changesets (bug 1757597, bug 1436400) for causing mochitest failures on test_bug1656248.html. CLOSED TREE
Backed out changeset 4be29c1eb5bc (bug 1436400)
Backed out changeset ffd9ddcef6b0 (bug 1436400)
Backed out changeset 5ac844508d8b (bug 1436400)
Backed out changeset 561aeb550892 (bug 1436400)
Backed out changeset 6f473bcf809a (bug 1436400)
Backed out changeset c33620854115 (bug 1436400)
Backed out changeset 8f894ea40eb2 (bug 1436400)
Backed out changeset cce080064d82 (bug 1436400)
Backed out changeset 001d8528ff96 (bug 1436400)
Backed out changeset dd2bb1b46f75 (bug 1436400)
Backed out changeset b1c2084042fa (bug 1436400)
Backed out changeset dd0fea93bcd7 (bug 1436400)
Backed out changeset e38a959648e1 (bug 1436400)
Backed out changeset 40b474d430e9 (bug 1436400)
Backed out changeset 5bef21ef1ba2 (bug 1757597)
2022-03-15 07:23:29 +02:00
Tooru Fujisawa aaeb81d7b9 Bug 1436400 - Part 3: Remove nsJSUtils::CompileModule and directly use JSAPI with stencil. r=nbp
To add conditional JS::StartIncrementalEncoding, and also to add a bytecode
decoding branch, replace nsJSUtils::CompileModule with raw JSAPI calls with
Stencil.

Differential Revision: https://phabricator.services.mozilla.com/D140291
2022-03-15 04:24:49 +00:00
André Bargull d2bbf86876 Bug 1726123 - Part 5: Add missing "js/" includes outside of SM. r=arai
In preparation for the next part, add missing includes to "js/" public headers.

Differential Revision: https://phabricator.services.mozilla.com/D122843
2021-08-17 15:45:39 +00:00
Matthew Gaudet 810f80185c Bug 1702278 - Defer setting debug metadata until after script compilation is finished. r=tcampbell,smaug
Differential Revision: https://phabricator.services.mozilla.com/D110459
2021-04-20 15:31:14 +00:00
Ted Campbell 9b6e632d81 Bug 1700954 - Remove remaining BinAST fragments from ScriptLoader. r=arai,hsivonen,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D109765
2021-03-26 13:01:40 +00:00
yulia 02bcdf5bde Bug 1519100 - Use pref to completely pref-off top-level await in the browser; r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D97184
2020-12-04 08:54:10 +00:00
yulia 0d160e1e0d Bug 1519100 - Implement module promises in html r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D95885
2020-12-04 08:54:03 +00:00
Razvan Maries 8cbedc3a4d Backed out 15 changesets (bug 1519100) as per Yulia's request. CLOSED TREE
Backed out changeset 16dc37dadf05 (bug 1519100)
Backed out changeset 019b00c63941 (bug 1519100)
Backed out changeset 1155eecec034 (bug 1519100)
Backed out changeset 53a792431e11 (bug 1519100)
Backed out changeset 55918f941155 (bug 1519100)
Backed out changeset 683743bd0395 (bug 1519100)
Backed out changeset 63d506024693 (bug 1519100)
Backed out changeset 8b5244786634 (bug 1519100)
Backed out changeset 3a0a021acc08 (bug 1519100)
Backed out changeset d5bff6c95feb (bug 1519100)
Backed out changeset bab7e81a6c2c (bug 1519100)
Backed out changeset b521ccd694f8 (bug 1519100)
Backed out changeset 9f559a616909 (bug 1519100)
Backed out changeset 98146209da6f (bug 1519100)
Backed out changeset a3ea6c49dbf7 (bug 1519100)
2020-12-03 20:37:45 +02:00
yulia f710026703 Bug 1519100 - Use pref to completely pref-off top-level await in the browser; r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D97184
2020-12-03 15:26:04 +00:00
yulia 4883191845 Bug 1519100 - Implement module promises in html r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D95885
2020-12-03 15:25:54 +00:00
Bogdan Tara c1b7803fbd Backed out 15 changesets (bug 1519100) for wpt leaks CLOSED TREE
Backed out changeset 7302ebdbaa35 (bug 1519100)
Backed out changeset 5b89081f0f08 (bug 1519100)
Backed out changeset ee02050e3c97 (bug 1519100)
Backed out changeset 47cf4bde107e (bug 1519100)
Backed out changeset bfd96f55a3bd (bug 1519100)
Backed out changeset c9afefd66eb7 (bug 1519100)
Backed out changeset 90b61247d071 (bug 1519100)
Backed out changeset e0250e4cba61 (bug 1519100)
Backed out changeset 5f90543431cb (bug 1519100)
Backed out changeset d7f3440addc7 (bug 1519100)
Backed out changeset 10194540aff0 (bug 1519100)
Backed out changeset 880873b815a4 (bug 1519100)
Backed out changeset d99f0109da7a (bug 1519100)
Backed out changeset c723f6b16b67 (bug 1519100)
Backed out changeset da24af409d92 (bug 1519100)
2020-12-02 21:14:35 +02:00
yulia 7a2f0f89ab Bug 1519100 - Use pref to completely pref-off top-level await in the browser; r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D97184
2020-12-02 12:40:21 +00:00
yulia 21104289bb Bug 1519100 - Implement module promises in html r=emilio,jonco
Differential Revision: https://phabricator.services.mozilla.com/D95885
2020-12-02 12:40:08 +00:00
Simon Giesecke e9f54e05c6 Bug 1676361 - Move ExecutionContext to a separate header file to avoid pulling in GeckoProfiler.h everywhere. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D97618

Depends on D97617
2020-11-23 16:12:26 +00:00
Simon Giesecke ee949b8e10 Bug 1678374 - Reduce dependencies on js, in particular on jsfriendapi.h. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D97617

Depends on D97616
2020-11-23 16:12:19 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Jeff Walden b5ec4c7eba Bug 1663365 - Create a new js/public/String.h header seeded with the inline string functions previously found in jsfriendapi.h. (More functions ought be added/moved here, but these make a good start.) r=jandem,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D89330
2020-09-08 22:50:52 +00:00
Simon Giesecke f77f8fd84c Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-21 09:54:48 +00:00
Bogdan Tara a904137456 Backed out changeset 0327b662a05f (bug 1659674) for nsStorageStream related central bustage CLOSED TREE 2020-08-20 02:58:41 +03:00
Simon Giesecke 9352526320 Bug 1659674 - Change BulkWrite to return mozilla::Result. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D87419
2020-08-19 14:39:03 +00:00
Kris Maglione 4200cb539c Bug 1464542: Part 2 - Add infrastructure for defining named services exposed to JS. r=mccr8
This builds on the existing static components infrastructure to allow defining
a Services.jsm-type services cache with no runtime memory overhead for any
services until they're accessed.

Any class entry with a 'js_name' attribute automatically becomes available on
the services cache with that name, and any interfaces listed in its
'interfaces' list are automatically queried on it.

Differential Revision: https://phabricator.services.mozilla.com/D81417
2020-07-09 20:42:50 +00:00
Csoregi Natalia b355fcc4bf Backed out 6 changesets (bug 1464542) for xpcshell failures on test_Services.js. CLOSED TREE
Backed out changeset b50af9005851 (bug 1464542)
Backed out changeset 9d3a0ea2cf65 (bug 1464542)
Backed out changeset 71c3475fcbc2 (bug 1464542)
Backed out changeset 51ff93220a95 (bug 1464542)
Backed out changeset e84de1547c09 (bug 1464542)
Backed out changeset bbecc16d08eb (bug 1464542)
2020-07-09 23:19:26 +03:00
Kris Maglione 0ae37bde4e Bug 1464542: Part 2 - Add infrastructure for defining named services exposed to JS. r=mccr8
This builds on the existing static components infrastructure to allow defining
a Services.jsm-type services cache with no runtime memory overhead for any
services until they're accessed.

Any class entry with a 'js_name' attribute automatically becomes available on
the services cache with that name, and any interfaces listed in its
'interfaces' list are automatically queried on it.

Differential Revision: https://phabricator.services.mozilla.com/D81417
2020-07-09 17:59:11 +00:00
Cosmin Sabou 7b22576061 Backed out changeset b2ce549cea27 (bug 1642708) for causing build bustages on PermissionDelegateHandler.cpp. CLOSED TREE 2020-06-18 13:38:29 +03:00
Ted Campbell 821280cceb Bug 1642708 - Add missing StaticPrefs_dom.h include in DocumentLoadListener r=necko-reviewers,nika,valentin
Differential Revision: https://phabricator.services.mozilla.com/D80074
2020-06-18 08:13:14 +00:00
Ted Campbell 8898cf7914 Bug 1642708 - Remove code guarded by JS_BUILD_BINAST r=arai
Also remove js/src/frontend/BinAST* sources.

Differential Revision: https://phabricator.services.mozilla.com/D77945
2020-06-17 14:26:09 +00:00
Csoregi Natalia e722c196bc Backed out 5 changesets (bug 1642708) for build bustages. CLOSED TREE
Backed out changeset d307b00c7e1b (bug 1642708)
Backed out changeset d210a60ad435 (bug 1642708)
Backed out changeset bcc2728b5ca5 (bug 1642708)
Backed out changeset 1c245d4e8244 (bug 1642708)
Backed out changeset ad613fa94a83 (bug 1642708)
2020-06-17 16:51:16 +03:00
Ted Campbell 0d2aa310b5 Bug 1642708 - Remove code guarded by JS_BUILD_BINAST r=arai
Also remove js/src/frontend/BinAST* sources.

Differential Revision: https://phabricator.services.mozilla.com/D77945
2020-06-12 14:25:50 +00:00
Denis Palmeiro d1ffff7a12 Bug 1501608 - Remove the ELEMENT_SLOT in the ScriptSourceObject and instead use a callback function to return the script element based on the value of the privateValue in the SSO. r=jonco,smaug
We can reduce the size of the SSO by removing the element slot entirely, and instead retrieve the element through a callback function.  The callback will take in the value in the private slot of the SSO, which is either a LoadedScript* (from the browser) or a JSObject* (from the shell).  In addition, this removes the requirement of having a script dom element ready when parsing a JS script which can open up new opportunities for performance.

Differential Revision: https://phabricator.services.mozilla.com/D70417
2020-05-12 19:28:15 +00:00
Dorel Luca 159241fe4b Backed out changeset 4107b758e7ae (bug 1501608) as requested by dev 2020-05-02 15:03:19 +03:00
Denis Palmeiro 792169d380 Bug 1501608 - Remove the ELEMENT_SLOT in the ScriptSourceObject and instead use a callback function to return the script element based on the value of the privateValue in the SSO. r=jonco,smaug
We can reduce the size of the SSO by removing the element slot entirely, and instead retrieve the element through a callback function.  The callback will take in the value in the private slot of the SSO, which is either a LoadedScript* (from the browser) or a JSObject* (from the shell).  In addition, this removes the requirement of having a script dom element ready when parsing a JS script which can open up new opportunities for performance.

Differential Revision: https://phabricator.services.mozilla.com/D70417
2020-04-30 16:21:23 +00:00
Simon Giesecke d94419173b Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/base. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63102

--HG--
extra : moz-landing-system : lando
2020-02-21 10:41:47 +00:00
Sylvestre Ledru 187e9bafaf Bug 1519636 - Automatically reformat recent changes using clang-format r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D60354

--HG--
extra : moz-landing-system : lando
2020-01-21 09:51:27 +00:00
Emilio Cobos Álvarez 86a70df5d7 Bug 1607006 - Remove utf-16 versions of nsCSSProps::LookupProperty* and ServoCSSParser::ComputeColor. r=bzbarsky
Now that we have UTF8String in the WebIDL, we can remove quite a few of the
conversions. Do that, and lift the remaining string conversions up as needed.

Also deindent Servo_ComputeColor while touching it.

Most of the remaining copies are because either bug 1606994, or because they're
WebIDL attributes that we still need to serialize back as UTF-16 (bug 1606995).

Differential Revision: https://phabricator.services.mozilla.com/D58687

--HG--
extra : moz-landing-system : lando
2020-01-08 01:21:30 +00:00
Emilio Cobos Álvarez 6bb42bfdf8 Bug 1449861 - Add codegen support for UTF8String. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D58629

--HG--
extra : moz-landing-system : lando
2020-01-04 10:36:49 +00:00
Brian Grinstead 8e592888cb Bug 1593119 - clang-format the files affected by the MOZ_XBL unifdef r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D52057

--HG--
extra : moz-landing-system : lando
2019-11-07 00:35:25 +00:00
Brian Grinstead f19f38776b Bug 1593119 - unifdef MOZ_XBL r=bzbarsky
This was generated with:

```
rg -l -g '*.{cpp,h}' MOZ_XBL . | while read FILE ; do
   echo $FILE
   unifdef -m -UMOZ_XBL $FILE
done
```

After this, I manually removed the directive in nsContentUtils.cpp due to:

  unifdef: ./dom/base/nsContentUtils.cpp: 4630: Unterminated string literal
  unifdef: Output may be truncated

Differential Revision: https://phabricator.services.mozilla.com/D51337

--HG--
extra : moz-landing-system : lando
2019-11-07 00:35:13 +00:00
Boris Zbarsky 168fcede40 Bug 1591514 part 1. Change bindings to use actual literal strings for string constants. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D50692

--HG--
extra : moz-landing-system : lando
2019-10-29 00:26:28 +00:00
Boris Zbarsky 84e60db6d8 Bug 1591481 part 2. Don't force copying when external strings are passed to Web IDL bindings. r=mccr8
The codesize impact is approximately 0 (actually positive by a a few KB),
because AssignJSString is not inlined.

If we were to force-inline AssignJSString, that would actually _save_ ~115KB
based on bloaty measurements for linux64 shippable opt builds (so with LTO),
because then ConvertJSValueToString stops being inlined in bindings.
Given that ConvertJSValueToString pretty much always calls AssignJSString, so
there is no slowdown from changing which of them is inlined, this is _really_
tempting to do, but I don't want to mess with compiler inlining heuristics...
Inlining both AssignJSString and ConvertJSValueToString increases codesize by
~2MB, so that's definitely _not_ desirable.

Differential Revision: https://phabricator.services.mozilla.com/D50627

--HG--
extra : moz-landing-system : lando
2019-10-30 15:52:22 +00:00
Jan de Mooij 6febd292ea Bug 1586683 - Remove flat strings from JSAPI. r=jwalden,bzbarsky
We want to remove flat strings (JSFlatString). With this patch we only expose
linear strings (JSLinearString) to API consumers.

This is very mechanical for the most part, because code typically only cares
about linear strings and not the null-termination aspect.

CTypes's Library.cpp has some Windows-specific code where we relied on null-terminated
strings. This patch adds JS_CopyStringCharsZ for that use case.

Differential Revision: https://phabricator.services.mozilla.com/D48314

--HG--
extra : moz-landing-system : lando
2019-10-14 09:32:07 +00:00
Brendan Dahl c68cd30ef2 Bug 1510785 - Only build XBL related code when MOZ_XBL is defined. r=bzbarsky
When XBL is disabled, no code in dom/xbl will be built. Also, adds ifdefs
to remove any of the XBL related code elsewhere. There's definitely more
that can be done here, but I think it's better to wait to do the rest of
the cleanup when we actually remove the code.

Depends on D45612

Differential Revision: https://phabricator.services.mozilla.com/D45613

--HG--
extra : moz-landing-system : lando
2019-10-08 23:52:14 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

Differential Revision: https://phabricator.services.mozilla.com/D39138

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Jeff Walden 002d6e30e8 Bug 1554362 - Add a UTF-8 overload of nsJSUtils::ExecutionContext::Compile. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D34822

--HG--
extra : moz-landing-system : lando
2019-06-15 20:47:58 +00:00
Jeff Walden 563e73698d Bug 1554362 - Implement nsJSUtils::CompileModule for UTF-8 as well as UTF-16. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D34821

--HG--
extra : moz-landing-system : lando
2019-06-15 20:47:51 +00:00
Andrea Marchesini bb718d74fc Bug 1490044 - Remove DOMPrefs. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33510

--HG--
extra : moz-landing-system : lando
2019-06-13 09:02:03 +00:00
Sylvestre Ledru ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D24168

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Yoshi Cheng-Hao Huang 7f012345b7 Bug 1521732 - Part 5: RootedObjectVector. r=sfink,jonco
s/AutoObjectVector/RootedObjectVector/g

Depends on D23185

Differential Revision: https://phabricator.services.mozilla.com/D23186

--HG--
extra : moz-landing-system : lando
2019-03-26 14:00:51 +00:00
Sylvestre Ledru 14486004b6 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D18488

--HG--
extra : moz-landing-system : lando
2019-02-04 19:10:18 +00:00