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

5412 Коммитов

Автор SHA1 Сообщение Дата
Jon Coppeard 6550bf91b1 Bug 1668825 - Remove unused onChild return value r=sfink
This isn't used anywhere so we can make onChild void.

Differential Revision: https://phabricator.services.mozilla.com/D92257
2020-10-05 07:55:13 +00:00
Jon Coppeard 070d9db800 Bug 1668825 - Combine TracerKindTag and TracerKind r=sfink
Currently we have two different enums that determine the tracer kind. Combine
this into a single enum and move it to the JS namespace.

Differential Revision: https://phabricator.services.mozilla.com/D92253
2020-10-05 07:53:38 +00:00
André Bargull 7e04b39310 Bug 1668785: Remove using declarations from namespace level in Proxy.h. r=mgaudet
The `using` declarations in "Proxy.h" make it act like a second
"NamespaceImports.h", introducing names from `JS` into the `js` namespace.

Remove the `using` declarations from "Proxy.h" and then fix up the breakage by:
- Prepend `JS::` in various header files.
- Add "NamespaceImports.h" in cpp files.
- Add `PropertyDescriptor` to "NamespaceImports.h". There are many unqualified
  references to `PropertyDescriptor`, making it a prime candidate for
  "NamespaceImports.h".

Drive-by changes:
- Use local variables in `CheckProxyFlags()` to make the `static_assert`
  conditions more readable.

Differential Revision: https://phabricator.services.mozilla.com/D92207
2020-10-02 12:51:03 +00:00
Christoph Kerschbaumer 359ca7017e Bug 1666419: Assert IsSafeToRunScript. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D91391
2020-09-28 06:29:44 +00:00
Dan Minor 45562522d9 Bug 1665166 - Updates to moz.build files; r=ng
Depends on D91318

Differential Revision: https://phabricator.services.mozilla.com/D91319
2020-09-24 18:40:21 +00:00
Nicholas Nethercote d718f94023 Bug 1665797 - Add a big comment about NativeProperties. r=mccr8 DONTBUILD
I had to draw this on paper to understand how all this stuff works. Might as
well save someone else (possibly me) the trouble in the future.

Differential Revision: https://phabricator.services.mozilla.com/D90668
2020-09-24 05:07:44 +00:00
Simon Giesecke de7bab0f06 Bug 1650145 - Replace all value uses of Empty[C]String by 0-length _ns literals. r=froydnj,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82325
2020-09-23 15:17:15 +00:00
Mihai Alexandru Michis 4177e83b27 Backed out changeset 3c1b9452c0e6 (bug 1665797) for causing bustages in DOMJSClass.h
CLOSED TREE
2020-09-23 11:15:57 +03:00
Nico Grunbaum c9ad55f22d Bug 1664900 - P5 - mv peerconnection to jsapi;r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D90951
2020-09-23 04:28:03 +00:00
Nico Grunbaum f8dd90decb Bug 1664900 - P3 - mv media-conduit to libwebrtcglue;r=dminor
Differential Revision: https://phabricator.services.mozilla.com/D90949
2020-09-23 04:25:07 +00:00
Nico Grunbaum 54d899d308 Bug 1664900 - move /media/webrtc/signaling/src to /dom/media/webrtc;r=dminor,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D90179
2020-09-23 04:22:29 +00:00
Michael Froman 5b942915e9 Bug 1664898 - move media/mtransport to media/transport. r=ng
Differential Revision: https://phabricator.services.mozilla.com/D90309
2020-09-22 21:43:49 +00:00
Nicholas Nethercote c41261279a Bug 1665797 - Add a big comment about NativeProperties. r=mccr8 DONTBUILD
I had to draw this on paper to understand how all this stuff works. Might as
well save someone else (possibly me) the trouble in the future.

Differential Revision: https://phabricator.services.mozilla.com/D90668
2020-09-23 01:34:03 +00:00
Sylvestre Ledru ec8859e69e Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D90793
2020-09-20 10:14:09 +00:00
Nika Layzell b2d811fc35 Bug 1658946 - Wrap non-wrappercached interfaces more precisely in ToJSValue, r=peterv
This will allow resolving DOM promises with non-wrappercached XPIDL interfaces
in a more convenient manner, as the wrapped JS object will have more concrete
interface information without needing to invoke QueryInterface.

Differential Revision: https://phabricator.services.mozilla.com/D87002
2020-09-14 19:30:56 +00:00
Jeff Walden 933368cb18 Bug 1663365 - Move DOM proxy-related details (including expand support) to separate headers out of jsfriendapi.h. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89336
2020-09-08 22:57:14 +00:00
Jeff Walden 6d5beafab1 Bug 1663365 - Move various Object-related functions to a new js/public/Object.h header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89333
2020-09-08 22:55:38 +00:00
Jeff Walden 49d77af36e Bug 1663365 - Move |JSJitInfo| out of jsfriendapi.h to its own experimental header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89332
2020-09-08 22:52:34 +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
Michael Froman ab2c4d061c Bug 1654399 - pt1 - webidl changes for RTCDtlsTransport. r=webidl,smaug
Partial implementation of RTCDtlsTransport (state and onstatechange)
for wfh.  Stubbed out methods so everything builds.

Differential Revision: https://phabricator.services.mozilla.com/D84459
2020-08-31 22:54:29 +00:00
longsonr 4f8808ae6f Bug 1459905 - Merge DOMSVGTranslatePoint and DOMSVGPoint and fix updates r=emilio
SVGSVGElement::SetCurrentScaleTranslate checks that things have changed but if we
manage to update both translate values before we get here then we'll skip the screen update
that we need.

Also
- introduces a tear off for SVGSVGElement.currentTranslate so we hand out the same object as required by the SVG idl
- removes SVGSVGElement::SetCurrentTranslate as dead code
- removes mPreviousScale and mPreviousTranslate from SVGSVGElement as they are no longer necessary

Differential Revision: https://phabricator.services.mozilla.com/D84796
2020-08-25 14:38:32 +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
Jeff Walden babd5bb7fb Bug 1659885 - Define |JS::shadow::Object| in public shadow API in its own minimal header. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D87532
2020-08-20 19:21:53 +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 9bbcae0e83 Bug 1658214: Only construct JS-implemented objects if inner window is current. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D86614
2020-08-14 16:02:25 +00:00
Jeff Gilbert e3e331e9ad Bug 1658433 - Implement WebGL draft extension EXT_texture_norm16. r=lsalzman,webidl,smaug
Differential Revision: https://phabricator.services.mozilla.com/D86630
2020-08-12 15:19:17 +00:00
Matthew Gaudet f1e25e9043 Bug 1654851 - Correctly handle transplanting objects with private fields r=jorendorff,extension-reviewers,zombie
As part of DOM node adoption they are transplanted, and their expando chains are copied over.

This copying uses JS_CopyPropertiesFrom, which until this patch, cannot see
private fields as they are excluded from property iteration. This patch adds
property iteration for private fields, and renames JS_CopyPropertiesFrom to
JS_CopyOwnPropertiesAndPrivateFields which is more accurate.

The users of this method are all doing object manipulation in ways where
preserving the copied private field is the better default.

In addition to testing DOM nodes explicitly, this patch also adds a jit-test
which uses transplantableObject to test similar things with FakeDOMObjects.

Differential Revision: https://phabricator.services.mozilla.com/D84737
2020-08-11 21:35:40 +00:00
Simon Giesecke 1e02318b49 Bug 1653335 - Replace MakeSpan uses by constructor calls. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83817
2020-08-07 07:49:47 +00:00
Simon Giesecke dea5b543db Bug 1653335 - Remove uses of MakeSpan in return statements. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D83812
2020-08-07 07:42:50 +00:00
Nika Layzell 6eacc7257b Bug 1654193 - Avoid getting nsIBrowser when creating nsFrameLoader, r=ckerschb,peterv
This is an alternative approach from D84307, which avoids needing an extra
script runner by avoiding needing to access `nsIBrowser` from
XULFrameElement::LoadSrc.

Differential Revision: https://phabricator.services.mozilla.com/D85446
2020-08-04 20:51:45 +00:00
Nika Layzell ca8ccd9569 Bug 1653407 - Part 2: Fix issue with NoteJSContextException, r=kmag
Previously we would end up throwing an uncatchable exception if actor
construction failed with an exception, due to calling
NoteJSContextException(cx), and then exiting a AutoEntryScript, which will clear
the exception on the JSContext and report it.

Differential Revision: https://phabricator.services.mozilla.com/D84066
2020-08-04 21:38:47 +00:00
Nathan Froyd 0050523469 Bug 1656359 - eliminate needless string flattening when calling JS_ParseJSON; r=peterv
JS_ParseJSON doesn't require a null-terminated buffer, so we shouldn't have
to provide one.

Differential Revision: https://phabricator.services.mozilla.com/D85475
2020-08-04 14:17:37 +00:00
Simon Giesecke 96f3e7e019 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-04 11:27:07 +00:00
Noemi Erli 381fca9783 Backed out 4 changesets (bug 1654992, bug 1654991) for causing timeous in mask-opacity-1e.html
Backed out changeset 11f0f54c6e0a (bug 1654992)
Backed out changeset a353dd5b3f08 (bug 1654991)
Backed out changeset 6a7964ba549f (bug 1654991)
Backed out changeset cf3bfb91d98c (bug 1654991)
2020-08-03 22:09:36 +03:00
Simon Giesecke 032d2ac9d3 Bug 1654992 - Use std::move instead of SwapElements where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D84807
2020-08-03 14:54:18 +00:00
Sylvestre Ledru 843f943758 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D85678
2020-08-02 15:29:15 +00:00
Jeff Walden e8f3f74ef6 Bug 1656411 - Move typed array, ArrayBuffer, and dataview-related functions out of jsfriendapi.h to two new headers. r=mgaudet,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D85524
2020-07-31 16:37:27 +00:00
Jeff Walden 15d7edd1cc Bug 1656411 - Move various stack limit-related functions (including reporting overrecursion) out of jsfriendapi.h to a new header. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D85523
2020-07-31 16:33:40 +00:00
Jeff Walden c9ab0ce005 Bug 1656411 - Move WindowProxy-related functions out of jsfriendapi.h to their own header. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D85521
2020-07-31 16:11:36 +00:00
Nathan Froyd e3ebda1914 Bug 1223932 - delete guard object uses from the tree; r=jwalden
CLOSED TREE

We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Mihai Alexandru Michis a911a108d0 Backed out changeset ac9c811bc427 (bug 1223932) for causing spidermonkey rust failures.
CLOSED TREE
2020-07-30 18:23:21 +03:00
Nathan Froyd bec9f9b93a Bug 1223932 - delete guard object uses from the tree; r=jwalden
We don't need these macros anymore, for two reasons:

1. We have static analysis to provide the same sort of checks via `MOZ_RAII`
   and friends.
2. clang now warns for the "temporary that should have been a declaration" case.

The extra requirements on class construction also show up during debug tests
as performance problems.

This change was automated by using the following sed script:

```
# Remove declarations in classes.
/MOZ_DECL_USE_GUARD_OBJECT_NOTIFIER/d
/MOZ_GUARD_OBJECT_NOTIFIER_INIT/d

# Remove individual macros, carefully.
{
  # We don't have to worry about substrings here because the closing
  # parenthesis "anchors" the match.
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_TO_PARENT)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_PARAM_IN_IMPL)/)/g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_IN_IMPL)/)/g;

  # Remove the longer identifier first.
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM_TO_PARENT//g;
  s/MOZ_GUARD_OBJECT_NOTIFIER_ONLY_PARAM//g;
}

# Remove the actual include.
\@# *include "mozilla/GuardObjects.h"@d
```

and running:

```
find . -name \*.cpp -o -name \*.h | grep -v 'GuardObjects.h' |xargs sed -i -f script 2>/dev/null
mach clang-format
```

Differential Revision: https://phabricator.services.mozilla.com/D85168
2020-07-30 14:22:38 +00:00
Jeff Walden 1de5dca426 Bug 1654927 - Move js.msg and js::GetErrorMessage into a new js/public/friend directory so users of them don't have to depend on all of jsfriendapi.h. r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D84756
2020-07-29 04:44:50 +00:00
Matthew Gaudet 93852ffa51 Bug 1655443 - Redesign private name proxy support to be more clear and simpler r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D84866
2020-07-27 21:08:42 +00:00
Matthew Gaudet fd4664735a Bug 1653567 - Redesign Private Fields implementation to reduce complexity r=jorendorff
Adds CheckPrivateField, and uses it to guard private field access before
calling regular element ops, rather than having custom element ops

CheckPrivateField takes two arguments: A ThrowCondition, a message, then using
the top two elements of the stack determines if a throw is required, and if it
is not, places on top of the stack whether or not the field exists.

This design is nice because it means that we'll be able to easily use this
opcode for implementing private methods and ergonomic brand checks for private
fields.

This patch implements the new opcode, deletes the old PrivateElem ops,
and provides Baseline callVM support. It's future work to provide IC, Ion and
Warp support.

Differential Revision: https://phabricator.services.mozilla.com/D83941
2020-07-27 20:11:25 +00:00
Jon Coppeard 9982da293c Bug 1654526 - Remove support for realm parameter with eRethrowExceptions r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D84501
2020-07-24 08:08:53 +00:00
Simon Giesecke b4b3fdfc78 Bug 1653228 - Move PinnedStringId to a separate header. r=peterv
AtomList uses only PinnedStringId from BindingUtils, and there are no other
dependencies between BindingUtils and PinnedStringId, and BindingUtils is
complex to parse. Moving PinnedStringId to a separate header therefore seems
beneficial.

Differential Revision: https://phabricator.services.mozilla.com/D83769
2020-07-22 15:13:21 +00:00
Matthew Gaudet d05eff0349 Bug 1644160 - Use DOM Proxy Expando to hold private fields, rather than allocating Proxy Expando r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D83556
2020-07-20 13:49:10 +00:00
Butkovits Atila 77046ebd2b Backed out 6 changesets (bug 1644160, bug 1652744) for failure at proxy-ccw.js CLOSED TREE
Backed out changeset ce53b1934083 (bug 1644160)
Backed out changeset 36ea51123a56 (bug 1652744)
Backed out changeset bc43898badcd (bug 1644160)
Backed out changeset 09df89442319 (bug 1644160)
Backed out changeset 3c88625982cf (bug 1644160)
Backed out changeset 598d65b8afb5 (bug 1644160)
2020-07-20 16:46:17 +03:00