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

5756 Коммитов

Автор SHA1 Сообщение Дата
Tom Schuster 10a63fedf7 Bug 1773242 - Add better error message when consuming non-Uint8Array. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D148633
2022-06-14 07:42:29 +00:00
Mats Palmgren 6b2f046373 Bug 1590376 part 1 - Add a XULResizerElement and move all nsResizerFrame's event handling code there. r=ntim,smaug
I'm mostly moving the code verbatim, but I excluded a few bits
that handled resizers inside menu popup frames, e.g.
https://searchfox.org/mozilla-central/rev/7bb1cc6abf6634b2a20f71935e1e519e73402b63/layout/xul/nsResizerFrame.cpp#165-170
I don't think we need that functionallity anymore and it
simplifies the code to exclude it.

Differential Revision: https://phabricator.services.mozilla.com/D105926
2022-06-07 09:30:01 +00:00
Butkovits Atila e3b4113a08 Backed out 4 changesets (bug 1694056, bug 1590376) for causing failures at test_resizer_ctrl_click.xhtml. CLOSED TREE
Backed out changeset 656906f99173 (bug 1590376)
Backed out changeset 15e9b4e9070c (bug 1694056)
Backed out changeset f137d6e73641 (bug 1590376)
Backed out changeset 00ed65f43cb2 (bug 1590376)
2022-06-07 02:12:40 +03:00
Mats Palmgren 17801441dd Bug 1590376 part 1 - Add a XULResizerElement and move all nsResizerFrame's event handling code there. r=ntim,smaug
I'm mostly moving the code verbatim, but I excluded a few bits
that handled resizers inside menu popup frames, e.g.
https://searchfox.org/mozilla-central/rev/7bb1cc6abf6634b2a20f71935e1e519e73402b63/layout/xul/nsResizerFrame.cpp#165-170
I don't think we need that functionallity anymore and it
simplifies the code to exclude it.

Differential Revision: https://phabricator.services.mozilla.com/D105926
2022-06-06 20:00:45 +00:00
Emilio Cobos Álvarez 793601b4c0 Bug 1772562 - Use nsIContent.h for Node in the WebIDL bindings. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D148276
2022-06-03 15:56:24 +00:00
Peter Van der Beken 72e77b6025 Bug 1771756 - Stop forward-declaring undefined *Atoms structs in bindings. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D147667
2022-05-30 15:59:48 +00:00
Peter Van der Beken e948d549b0 Bug 1769588 - Remove unused NativePropertyHooks::mProtoHooks. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D146465
2022-05-18 09:01:42 +00:00
Kagami Sascha Rosylight 9d5386b0ce Bug 1769290 - Part 2: Apply mozilla-js-handle-rooted-typedef against dom/bindings r=edgar
Changes done by `./mach static-analysis check --checks="-*,mozilla-js-handle-rooted-typedef" --fix --header-filter=dom dom/bindings; ./mach clang-format --outgoing`.

Differential Revision: https://phabricator.services.mozilla.com/D146439
2022-05-18 08:43:09 +00:00
Kagami Sascha Rosylight 5bf1db4f71 Bug 1769290 - Part 1: Apply mozilla-js-handle-rooted-typedef against dom/streams r=smaug
Changes done by `./mach static-analysis check --checks="-*,mozilla-js-handle-rooted-typedef" --fix --header-filter=dom dom/streams; ./mach clang-format --outgoing`.

Differential Revision: https://phabricator.services.mozilla.com/D146329
2022-05-18 08:43:08 +00:00
Emilio Cobos Álvarez 9e02f38a2e Bug 1766909 - Wrap ObservableArray proxy on getter, rather than throwing. r=peterv
This will still prevent them from accessing stuff (.length will be
undefined, etc), but seems better than unexpectedly throwing. This fixes
the issue at hand at least.

With this patch, we reject length accesses here:

  https://searchfox.org/mozilla-central/rev/86c98c486f03b598d0f80356b69163fd400ec8aa/js/xpconnect/wrappers/XrayWrapper.cpp#229-233

Your call on whether this patch is enough as-is, or more work is needed.
Also your call on whether if more work is needed that needs to happen on
this bug or somewhere else.

I'm not sure what we'd need to do to support this more "properly",
presumably we'd need to add special XRay support to
ObservableArrayProxyHandler or so? Pointers (or patches of course ;))
welcome.

Also unsure about the setter situation, I _think_ it's fine not to throw
given the code I read, but please sanity-check.

Differential Revision: https://phabricator.services.mozilla.com/D145045
2022-05-12 07:36:03 +00:00
Byron Campen 918543a8e9 Bug 1586109: Move RTCRtpTransceiver to c++. r=mjf,emilio
Differential Revision: https://phabricator.services.mozilla.com/D145679
2022-05-10 18:07:19 +00:00
Butkovits Atila 6683515559 Backed out changeset c11ccbe584a2 (bug 1586109) for causing toolchains bustages on central. CLOSED TREE 2022-05-10 08:19:09 +03:00
Kagami Sascha Rosylight 2b5d45e396 Bug 1768189 - Part 6: Apply modernize-concat-nested-namespaces to dom/bindings/RootedDictionary.h ... r=andi
Depends on D145739

Differential Revision: https://phabricator.services.mozilla.com/D145740
2022-05-09 20:41:05 +00:00
Kagami Sascha Rosylight ccd8a17bd4 Bug 1768189 - Part 5: Apply modernize-concat-nested-namespaces to dom/base/nsNodeInfoManager.h ... r=andi
Depends on D145738

Differential Revision: https://phabricator.services.mozilla.com/D145739
2022-05-09 20:41:05 +00:00
Byron Campen 3a6dbeb8f4 Bug 1586109: Move RTCRtpTransceiver to c++. r=mjf,emilio
Differential Revision: https://phabricator.services.mozilla.com/D145679
2022-05-09 14:30:41 +00:00
Mike Hommey a3e1d0e570 Bug 1766371 - Fix class-varargs warnings in Windows builds. r=nika,mjf
dom/bindings/BindingUtils.cpp(202,62): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
                         static_cast<unsigned>(errorNumber), funcNameStr.get(),
                                                             ^
dom/bindings/BindingUtils.cpp(203,26): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
                         ifaceName.get());
                         ^
dom/media/webrtc/transport/third_party/nICEr/src/ice/ice_component.c(582,15): error: passing object of class type 'nr_transport_addr' (aka 'struct nr_transport_addr_') through variadic function [-Werror,-Wclass-varargs]
              component->stream->turn_servers[j].turn_server.addr);
              ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(44,45): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
        wprintf(L"%s is not registered.\n", aNames[i].get());
                                            ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(49,30): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
        wprintf(L"%s:%4d\n", aNames[i].get(), *entry);
                             ^
toolkit/xre/dllservices/tests/gtest/TestUntrustedModules.cpp(248,30): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
      wprintf(L"JSON: %s\n", json.get());
                             ^
xpcom/io/nsLocalFileWin.cpp(1647,20): error: passing object of class type 'typename raw_type<char16_t, int>::type' (aka 'char16ptr_t') through variadic function [-Werror,-Wclass-varargs]
                   NS_ConvertASCIItoUTF16(nsDependentCString(aField)).get());
                   ^

Differential Revision: https://phabricator.services.mozilla.com/D144665
2022-05-03 21:48:22 +00:00
Peter Van der Beken d9be07f2fd Bug 1766574 - Clean up generated DOM binding code. r=edgar
- Remove break-after-return
- Remove empty TraceUnion implementations
- Remove unused friend declaration
- Remove some whitespace

Differential Revision: https://phabricator.services.mozilla.com/D144856
2022-04-28 10:03:14 +00:00
Michael Comella b6153dda2b Bug 1724645 - update PerformanceMark to User Timing L3. r=sefeng,smaug
To follow the spec more closely, some functionality moved from
`performance.mark` to the PerformanceMark constructor.

I verified the new fingerprinting protection behavior with :tjr: they said it's
okay to return a PerformanceMark as long as it uses the same reduced precision
of `performance.now`.

Differential Revision: https://phabricator.services.mozilla.com/D142625
2022-04-26 19:30:52 +00:00
Emilio Cobos Álvarez 4930002631 Bug 1766227 - Forward-declare ObservableArray types correctly. r=edgar
Without this changing constructable stylesheets to be an ObservableArray
causes compile errors because StyleSheet isn't correctly forward-declared.

Differential Revision: https://phabricator.services.mozilla.com/D144546
2022-04-26 10:53:08 +00:00
Sean Feng 5042a856cf Bug 1734997 - Prototype the Prioritized Task Scheduling API r=smaug
Spec: https://wicg.github.io/scheduling-apis/

Differential Revision: https://phabricator.services.mozilla.com/D133494
2022-04-21 18:47:52 +00:00
Marian-Vasile Laza 8615f36226 Backed out 7 changesets (bug 1734997) for causing bustages on WebTaskSchedulerMainThread.cpp. CLOSED TREE
Backed out changeset 7ab1e7cc8f6a (bug 1734997)
Backed out changeset 0846da0f5ab1 (bug 1734997)
Backed out changeset 3a138b8501ec (bug 1734997)
Backed out changeset 55c6e7862298 (bug 1734997)
Backed out changeset 724cccd1d595 (bug 1734997)
Backed out changeset 5e624d630397 (bug 1734997)
Backed out changeset 09469f7dd10e (bug 1734997)
2022-04-19 12:54:00 -07:00
Sean Feng ec21b3c0a4 Bug 1734997 - Prototype the Prioritized Task Scheduling API r=smaug
Spec: https://wicg.github.io/scheduling-apis/

Differential Revision: https://phabricator.services.mozilla.com/D133494
2022-04-19 19:08:44 +00:00
Matthew Gaudet f1ae8a3f13 Bug 1757241 - Remove special case handling for ReadableStream in WebIDL generator r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D143074
2022-04-13 18:57:49 +00:00
Matthew Gaudet d07e459e7b Bug 1757241 - Remove !MOZ_DOM_STREAMS code from most files r=smaug
I've also tested to verify that JS Streams remains enabled in the JS Shell package

Differential Revision: https://phabricator.services.mozilla.com/D142620
2022-04-13 18:57:48 +00:00
Calixte d49143cc92 Bug 1763424 - Limit ImageData typed array to 2Gb when created using its constructor r=edgar
- it's likely an oblivion from the fix for bug 1716622;
 - so just add a check on the final length of the buffer to be under the limit of 2Gb.

Differential Revision: https://phabricator.services.mozilla.com/D143066
2022-04-07 19:46:47 +00:00
Kagami Sascha Rosylight 53fdd4ec19 Bug 1762993 - Merge Interface{Is,Has}Instance implementation r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D142896
2022-04-05 22:20:35 +00:00
Kagami Sascha Rosylight 4aa5ef393a Bug 1762965 - Handle RemoteObjectProxies in isInstance() r=peterv
Applying what bug 1576787 did in InterfaceHasInstance.

Differential Revision: https://phabricator.services.mozilla.com/D142892
2022-04-05 22:20:35 +00:00
Byron Campen d15909a769 Bug 1616937: Move RTCRtpSender to c++ r=mjf,webidl,smaug
Also involves moving identity-related stuff to MediaPipelineTransmit.

Differential Revision: https://phabricator.services.mozilla.com/D141770
2022-04-05 18:39:13 +00:00
Kagami Sascha Rosylight def205fdcd Bug 1734886 - Part 8: Implement TransformStreamDefaultController methods r=mgaudet
Differential Revision: https://phabricator.services.mozilla.com/D142013
2022-03-30 06:31:58 +00:00
Jan de Mooij 7aa25ac84c Bug 1270746 part 5 - Remove hasInstance class hook. r=iain
Code should use `Symbol.hasInstance` to customize `instanceof` behavior.

Differential Revision: https://phabricator.services.mozilla.com/D141346
2022-03-20 11:28:04 +00:00
Peter Van der Beken f794ee2947 Bug 1603157 - Stop using nsIVariant for XSLTProcessor.getParameter/setParameter. r=smaug
This removes the last usage of variant in WebIDL. Because the conversion to
the WebIDL union now takes place in the generated argument conversion, it's
ok to make the conversion to the right XSLT type (txVariable::convert)
happen lazily again. At that point we're dealing with primitive types
(double/bool/nsString), a Node, a sequence of nodes or an XPathResult, so
txVariable::convert shouldn't have any side-effects. I removed storing a
NodeList, it gets converted to a sequence<Node> during argument conversion.
That, together with cloning XPathResults, makes the parameters stay constant
after they're set, which I think is saner.

Differential Revision: https://phabricator.services.mozilla.com/D140364
2022-03-17 21:52:57 +00:00
Emilio Cobos Álvarez 2b25e0298a Bug 1758702 - Avoid including RemoteWorkerChild in WorkerPrivate.h. r=asuth
This avoids having to include PRemoteBrowser* headers etc, which are not
exported otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D140659
2022-03-17 19:06:51 +00:00
criss 9302fa739c Backed out 2 changesets (bug 1758702) for causing build bustages. CLOSED TREE
Backed out changeset 3e00d9203851 (bug 1758702)
Backed out changeset 66625baf0875 (bug 1758702)
2022-03-17 15:21:31 +02:00
Emilio Cobos Álvarez dd7770da6c Bug 1758702 - Avoid including RemoteWorkerChild in WorkerPrivate.h. r=asuth
This avoids having to include PRemoteBrowser* headers etc, which are not
exported otherwise.

Differential Revision: https://phabricator.services.mozilla.com/D140659
2022-03-17 12:15:20 +00:00
Emilio Cobos Álvarez 2dd7088690 Bug 1759163 - Add origin trial support for worklets. r=asuth
Move the trial getter to nsIGlobalObject, make every implementation
provide a reasonable value, and add a test.

Differential Revision: https://phabricator.services.mozilla.com/D140848
2022-03-15 23:16:14 +00:00
Marian-Vasile Laza f0b42c159c Backed out changeset 558e256fcb31 (bug 1759163) for causing mochitest failures on test_header_simple.html. 2022-03-15 15:23:04 -07:00
Emilio Cobos Álvarez 7961a431ef Bug 1759163 - Add origin trial support for worklets. r=asuth
Move the trial getter to nsIGlobalObject, make every implementation
provide a reasonable value, and add a test.

Differential Revision: https://phabricator.services.mozilla.com/D140848
2022-03-15 17:50:03 +00:00
Edgar Chen 11905ca5f3 Bug 1759074 - Make generated bindings include necessary headers for ObservableArray type; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D140832
2022-03-14 15:45:32 +00:00
Edgar Chen 4f64d5369a Bug 1683281 - Part 7: Generate example code for ObservableArray; r=peterv
Depends on D113862

Differential Revision: https://phabricator.services.mozilla.com/D115747
2022-03-10 22:44:29 +00:00
Edgar Chen 74c8ac1951 Bug 1683281 - Part 6-2: C++ helper function for ObservableArray; r=peterv
Generate helper function for C++ to perform operations on backing objects for
each observable array attribute,
- ElementAt: Get the item at that index. Throw error if fail to get the element.
- ReplaceElementAt: Replace the item at the index, this will also trigger OnDelete
  and OnSet callback. Throw error if fail to replace the element.
- AppendElement: Append one element to the end of the array, this will also trigger
  OnSet callback. Throw error if fail to append the element.
- RemoveLastElement: Remove the element at the last index, this will also trigger
  OnDelete callback. Throw error if fail to remove the element.
- Length: Get the number of the indexd value. Throw error if fail to get the length.

Depends on D113728

Differential Revision: https://phabricator.services.mozilla.com/D113862
2022-03-10 22:44:29 +00:00
Edgar Chen d70b01fd77 Bug 1683281 - Part 6-1: Create CGHelperFunctionGenerator and refactor into more generic base class; r=peterv
So we could reuse it to generate helper function for observable array type

Depends on D112280

Differential Revision: https://phabricator.services.mozilla.com/D113728
2022-03-10 22:44:29 +00:00
Edgar Chen ebd37b74c8 Bug 1683281 - Part 5: Generate binding code for ObservableArray type; r=peterv
The highlevel architecture:
- Each observable array attribute has corresponding ES proxy exotic object stored
  in DOM reflector's reserved slot. It use the ObservableArrayProxyHandler as
  proxy handler which implements the behaviour defined in the spec.
- Each observable array exotic objects has 2 reserved slots:
  * one is to store the raw pointer of the interface, it is cleaned up when the
    DOM reflector is finalized. It is used to run the SetAlgorithm and
    DeleteAlgorithm defined in the spec.
  * one is to store the backing list used to store the indexed value. The additional
    properties are stored in the proxy target instead.

Depends on D112279

Differential Revision: https://phabricator.services.mozilla.com/D112280
2022-03-10 22:44:28 +00:00
Edgar Chen f56fbb0c77 Bug 1683281 - Part 4: Add helper method to get ObservableArray backing object; r=peterv
Depends on D112278

Differential Revision: https://phabricator.services.mozilla.com/D112279
2022-03-10 22:44:28 +00:00
Edgar Chen 2ecc5e3af1 Bug 1683281 - Part 3: Add ObservableArrayProxyHandler base class; r=peterv
This implements the base class for proxy handler of observable array exotic
objects, it implments the proxy behaviour define in
https://webidl.spec.whatwg.org/#es-observable-arrays, the virtual functions
, OnDeleteItem() and OnSetItem(), are for SetAlgorithm and DeleteAlgorithm that
are defined and implemented per interface.

Depends on D112277

Differential Revision: https://phabricator.services.mozilla.com/D112278
2022-03-10 22:44:27 +00:00
Edgar Chen 88a7cf9866 Bug 1683281 - Part 2: Move proxy handler utility functions from DOMJSProxyHandler.h to ProxyHandlerUtils.h; r=peterv
Depends on D103469

Differential Revision: https://phabricator.services.mozilla.com/D112277
2022-03-10 22:44:27 +00:00
Edgar Chen 8434221dbc Bug 1683281 - Part 1: Make WebIDL parser support ObservableArray type; r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D103469
2022-03-10 22:44:27 +00:00
Emilio Cobos Álvarez b0b09030bf Bug 1758552 - Shrink PrefableDisablers in 32-bit builds. r=peterv
As per suggestion raised in bug 1756500.

Differential Revision: https://phabricator.services.mozilla.com/D140557
2022-03-10 15:25:17 +00:00
Jon Coppeard d40ccf2be0 Bug 1757956 - Part 3: Rename JSFreeOp to JS::GCContext in the JS engine r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D140525
2022-03-10 08:40:03 +00:00
Barret Rennie 71030266fb Bug 1757846 - Treat BackstagePass as Window when checking for unexposed globals r=nika
Differential Revision: https://phabricator.services.mozilla.com/D140124
2022-03-09 20:55:36 +00:00
Emilio Cobos Álvarez 5e5d0c42da Bug 1756500 - Add origin trial tests for interfaces. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D140193
2022-03-08 15:24:16 +00:00