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
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
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
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
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
Partial implementation of RTCDtlsTransport (state and onstatechange)
for wfh. Stubbed out methods so everything builds.
Differential Revision: https://phabricator.services.mozilla.com/D84459
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
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
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
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
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
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
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
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