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

727 Коммитов

Автор SHA1 Сообщение Дата
Tom Schuster f77a3af47a Bug 1277799 - Define @@toStringTag on all DOM interface prototype objects. r=peterv
Instead of manually defining toStringTag we now add the toStringTag symbol to the list of properties.
This is also how we usually define toStringTag in the JS engine.
Even though this changes more code I like this approach better. Everything is centralized in the generated bindings file.

Differential Revision: https://phabricator.services.mozilla.com/D72179
2020-05-05 17:54:51 +00:00
Tom Schuster bd161088e3 Bug 1633145 - Replace INTERNED_STRING_TO_JSID. r=jandem
I am honstely still not convinced that this function should actually exists.
It seems like a convulted way of saying AtomToId, while also asserting that the atom is pinned.

Differential Revision: https://phabricator.services.mozilla.com/D72563
2020-04-30 18:18:12 +00:00
Jon Coppeard 7cf55278e0 Bug 1425450 - Ensure that we call Drop/HoldJSObjects when a preserved wrapper is changed for one in a different zone r=mccr8
So that we can update the holders table correctly we will need to remove the wrapper from its original vector and add it to the one associated with the new zone.

I tried to make SetPreservingWrapper private but there's still a use in layout/style/Rule.cpp that I couldn't see an obvious fix for.

Differential Revision: https://phabricator.services.mozilla.com/D68521
2020-04-20 17:08:14 +00:00
Bogdan Tara eddea671e7 Backed out 6 changesets (bug 1425450) for hazard failure complaining about nsWrapperCacheInlines CLOSED TREE
Backed out changeset c57ac2e125e8 (bug 1425450)
Backed out changeset 4238c59af7bb (bug 1425450)
Backed out changeset 2a00272e72ba (bug 1425450)
Backed out changeset 3e4a52d596bb (bug 1425450)
Backed out changeset 5da68de67491 (bug 1425450)
Backed out changeset efac091a3ba4 (bug 1425450)
2020-04-06 21:22:51 +03:00
Jon Coppeard eff4a09dd5 Bug 1425450 - Ensure that we call Drop/HoldJSObjects when a preserved wrapper is changed for one in a different zone r=mccr8
So that we can update the holders table correctly we will need to remove the wrapper from its original vector and add it to the one associated with the new zone.

I tried to make SetPreservingWrapper private but there's still a use in layout/style/Rule.cpp that I couldn't see an obvious fix for.

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

--HG--
extra : moz-landing-system : lando
2020-04-06 16:13:51 +00:00
Tom Schuster 97d9a753fc Bug 1170775 - Rename DOM Xray DefineProperty parameter from *defined to *done. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D68721

--HG--
extra : moz-landing-system : lando
2020-04-02 05:44:22 +00:00
André Bargull 73a498ec0c Bug 1625138 - Part 38: Replace mozilla::IsSame with std::is_same in dom/. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68557

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:21 +00:00
André Bargull 9de017ffb8 Bug 1625138 - Part 33: Replace mozilla::IntegralConstant with std::integral_constant. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68552

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:19 +00:00
André Bargull cae4e1fdbc Bug 1606962: Replace mozilla::EnableIf with std::enable_if. r=froydnj,jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D68401

--HG--
extra : moz-landing-system : lando
2020-03-28 13:35:31 +00:00
André Bargull 1be056677a Bug 1625138 - Part 26: Replace mozilla::Conditional with std::conditional. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D68381

--HG--
extra : moz-landing-system : lando
2020-03-28 13:57:18 +00:00
Boris Zbarsky da6fb20d19 Bug 1618011 part 8. Switch ByteString conversions to having a method name prefix. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D64889

--HG--
extra : moz-landing-system : lando
2020-03-06 23:05:16 +00:00
Boris Zbarsky 0082f55dee Bug 1618011 part 7. Switch most error messages used in bindings to having a method name prefix. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D64888

--HG--
extra : moz-landing-system : lando
2020-03-06 23:05:16 +00:00
Boris Zbarsky f612519949 Bug 1618011 part 2. Add a BindingCallContext class. r=peterv
We instantiate this class in various binding methods.  Future patches will make
use of it to throw errors.

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

--HG--
extra : moz-landing-system : lando
2020-03-06 23:05:15 +00:00
Arthur Iakab 14247fb057 Backed out 11 changesets (bug 1618011)for Linting failure.
CLOSED TREE

Backed out changeset 8b11ddd8999f (bug 1618011)
Backed out changeset 11df2f359473 (bug 1618011)
Backed out changeset c50121035d50 (bug 1618011)
Backed out changeset 8b8c4c60c34b (bug 1618011)
Backed out changeset b01f8c66110b (bug 1618011)
Backed out changeset 433fdf04058c (bug 1618011)
Backed out changeset 29a9227d08ac (bug 1618011)
Backed out changeset b2dfa2e66d24 (bug 1618011)
Backed out changeset 85650ee945c4 (bug 1618011)
Backed out changeset 278a213e5304 (bug 1618011)
Backed out changeset 9119aeb72ea4 (bug 1618011)
2020-03-07 00:15:57 +02:00
Boris Zbarsky 2564974432 Bug 1618011 part 8. Switch ByteString conversions to having a method name prefix. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D64889

--HG--
extra : moz-landing-system : lando
2020-03-06 20:39:23 +00:00
Boris Zbarsky bc068d0e54 Bug 1618011 part 7. Switch most error messages used in bindings to having a method name prefix. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D64888

--HG--
extra : moz-landing-system : lando
2020-03-06 20:39:10 +00:00
Boris Zbarsky 0dbc444246 Bug 1618011 part 2. Add a BindingCallContext class. r=peterv
We instantiate this class in various binding methods.  Future patches will make
use of it to throw errors.

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

--HG--
extra : moz-landing-system : lando
2020-03-06 20:30:22 +00:00
Andrew McCreight 4babb2b5ab Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 17:39:15 +00:00
Boris Zbarsky f6cdd2b50e Bug 911444 part 4. Expose a print method on PDF viewer windows. r=bholley
The method is exposed only if the consumer has the same principal as the PDF
would have if it were not getting the PDF viewer treatment.

The method just calls the print() method in the PDF viewer window.

It's enough to expose this on nsOuterWindowProxy, not RemoteOuterWindowProxy,
because PDF documents end up in the process they would have been in based on
their pre-PDF-viewer principal, since we do process determination in the parent
process but only run the pdfjs stream converter in the content process, once we
have decided which one to use.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 14:54:53 +00:00
Ciure Andrei 00dd87f6f4 Backed out changeset d407a28318e6 (bug 1609815) for causing windows ming bustages CLOSED TREE
--HG--
extra : histedit_source : b2c748e31e0f6ba8fcf9960a336e0bbd361b07e6
2020-02-27 07:05:19 +02:00
Andrew McCreight b197e1f783 Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

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

--HG--
extra : moz-landing-system : lando
2020-02-27 04:43:48 +00:00
Tetsuharu OHZEKI bc1492747e Bug 1496147 - part 1: Remove nsAutoPtr usages from dom/bindings. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64057

--HG--
extra : moz-landing-system : lando
2020-02-25 17:20:34 +00:00
Tetsuharu OHZEKI 2a9b28c762 Bug 1496147 - part 0: Use alias template to define StrongPtrForMember<T>. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D64056

--HG--
extra : moz-landing-system : lando
2020-02-25 16:49:58 +00:00
Dorel Luca 1def5d818a Backed out 4 changesets (bug 911444) for Mochitest failures in dom/base/test/test_pdf_print.html. CLOSED TREE
Backed out changeset d156bbaabbd5 (bug 911444)
Backed out changeset a32592af0b11 (bug 911444)
Backed out changeset b96d0a37ed1a (bug 911444)
Backed out changeset fd2e3e8728d9 (bug 911444)
2020-02-25 00:11:50 +02:00
Boris Zbarsky b4ea855936 Bug 911444 part 4. Expose a print method on PDF viewer windows. r=bholley
The method is exposed only if the consumer has the same principal as the PDF
would have if it were not getting the PDF viewer treatment.

The method just calls the print() method in the PDF viewer window.

It's enough to expose this on nsOuterWindowProxy, not RemoteOuterWindowProxy,
because PDF documents end up in the process they would have been in based on
their pre-PDF-viewer principal, since we do process determination in the parent
process but only run the pdfjs stream converter in the content process, once we
have decided which one to use.

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

--HG--
extra : moz-landing-system : lando
2020-02-22 05:25:35 +00:00
Boris Zbarsky 09a1a6496e Bug 1613013 part 2. Change ThrowErrorMessage to be templated on the error number. r=peterv
This makes it easier to static_assert correct use.  It caught several bugs in
the next patch in this stack.

I had to disambiguate some calls to the templated ThrowDOMException that are
inside the binding_detail namespace, because otherwise they were trying to call
teh non-template function of the same name that's declared in binding_detail.

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

--HG--
extra : moz-landing-system : lando
2020-02-06 20:40:36 +00:00
Emilio Cobos Álvarez f210527c4f Bug 1607595 - Manual fixups, and remove mozilla::IsBaseOf. r=froydnj
This is manual, but hopefully trivial.

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

--HG--
extra : moz-landing-system : lando
2020-01-08 14:52:18 +00:00
Emilio Cobos Álvarez e363a41bd4 Bug 1607595 - Remove uses of mozilla::IsBaseOf. r=froydnj
Automatically generated by:

$ rg 'IsBaseOf<' | cut -d : -f 1 | xargs sed -i 's/mozilla::IsBaseOf</std::is_base_of</g'
$ rg 'IsBaseOf<' | cut -d : -f 1 | xargs sed -i 's/IsBaseOf</std::is_base_of</g

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

--HG--
extra : moz-landing-system : lando
2020-01-08 14:52:10 +00:00
Emilio Cobos Álvarez 400567dcde Bug 1606958 - Use FakeString for UTF8String. r=bzbarsky,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D58683

--HG--
extra : moz-landing-system : lando
2020-01-07 21:37:12 +00:00
Arthur Iakab dbec32e5b0 Backed out changeset 05d084629569 (bug 1606958) for causing Valgrind bustages. 2020-01-07 03:07:00 +02:00
Emilio Cobos Álvarez ae30f1a7bb Bug 1606958 - Use FakeString for UTF8String. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D58683

--HG--
extra : moz-landing-system : lando
2020-01-06 21:24:10 +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
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Edgar Chen 3b92c91a78 Bug 1202706 - Part 3: Hook up worker use counters to WebIDL bindings; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53749

--HG--
extra : moz-landing-system : lando
2019-12-04 23:21:58 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Arthur Iakab 9d31553698 Backed out 4 changesets (bug 1202706) for causing mochitest assertion failures on BindingUtils.cpp
Backed out changeset 10409e01c086 (bug 1202706)
Backed out changeset 5b8427cf16b3 (bug 1202706)
Backed out changeset b8068238928b (bug 1202706)
Backed out changeset 38419ebb5494 (bug 1202706)
2019-11-28 01:13:02 +02:00
Edgar Chen a8a12bf5b1 Bug 1202706 - Part 3: Hook up worker use counters to WebIDL bindings; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53749

--HG--
extra : moz-landing-system : lando
2019-11-26 05:08:39 +00:00
Simon Giesecke a715570cd9 Bug 1599114 - Allow StrongOrRawPtr to accept RefPtr. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D54533

--HG--
extra : moz-landing-system : lando
2019-11-25 16:33:38 +00:00
Jon Coppeard 38be2e615e Bug 1597543 - Don't try and associate memory if we failed to create the reflector object r=bzbarsky
The problem is we're still calling JS::AddAssociatedMemory with a null object pointer. There's an asssertion for this in the JS engine but this doesn't happen in our tests.

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

--HG--
extra : moz-landing-system : lando
2019-11-19 15:41:31 +00:00
Nazım Can Altınova bc87c9100f Bug 1468789 - Part 1: Add window id inside realm creation options. r=jandem,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D51859

--HG--
extra : moz-landing-system : lando
2019-11-14 12:26:25 +00:00
Boris Zbarsky 40d45356a8 Bug 1591481 part 1. Make NormalizeUSVString fallible. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D50691

--HG--
extra : moz-landing-system : lando
2019-10-29 00:24:10 +00:00
Sylvestre Ledru 7c309095ea Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
Please note that it is the first reformat with clang-format 9
I only saw a fix in the .mm file

# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-10-21 14:13:44 +00:00
Boris Zbarsky dd7b61f437 Bug 1568249. Remove all the LegacyQueryInterface machinery from Web IDL. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D48250

--HG--
extra : moz-landing-system : lando
2019-10-11 21:15:57 +00:00
shindli e7b5981fa2 Backed out 2 changesets (bug 1568883, bug 1568249) for causing c1 failures in dom/base/test/chrome/test_cpows.xul CLOSED TREE
Backed out changeset b1a2422a6fa0 (bug 1568249)
Backed out changeset d3f5f69f38a8 (bug 1568883)
2019-10-12 00:07:48 +03:00
Boris Zbarsky 092c3345a8 Bug 1568249. Remove all the LegacyQueryInterface machinery from Web IDL. r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D48250

--HG--
extra : moz-landing-system : lando
2019-10-07 13:12:55 +00:00
Boris Zbarsky 5f2a4a2274 Bug 1584630. Implement missing property use counters for HTMLDocument. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D47504

--HG--
extra : moz-landing-system : lando
2019-10-11 16:56:36 +00:00
Steve Fink 91b1ffaac3 Bug 1560667 - Collection of fixes for things uncovered by improvements to the hazard analysis. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D46534

--HG--
extra : moz-landing-system : lando
2019-10-02 03:20:33 +00:00
Boris Zbarsky 44c015a4b0 Bug 1584431 part 4. Use the new length-aware versions of JS_StringEqualsAscii and JS_FlatStringEqualsAscii where possible. r=jwalden
Differential Revision: https://phabricator.services.mozilla.com/D47393

--HG--
extra : moz-landing-system : lando
2019-09-27 21:25:23 +00:00
Boris Zbarsky e5497b955e Bug 1423562 part 3. Remove [PrimaryGlobal] and require explicit [Exposed] annotations on everything. r=edgar
For review purposes, the important changes are in dom/bindings/Configuration.py
and dom/bindings/parser.

The changes to the IDL files were done by running these in dom/webidl
and dom/bindings/test:

  perl -pi -e 's/^interface ([A-Za-z0-9_]+)($| [:{])/[Exposed=Window]\ninterface \1\2/' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[HTMLConstructor\]\n\[Exposed=Window\]/[HTMLConstructor,\n Exposed=Window]/g' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[NoInterfaceObject\]\n\[Exposed=Window\]/[NoInterfaceObject,\n Exposed=Window]/g' *.webidl

  perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\n\[Exposed=Window\]/[ChromeOnly,\n Exposed=Window]/g' *.webidl

And running this in dom/chrome-webidl:

  perl -pi -e 'BEGIN { $/ = undef; } s/\[ChromeOnly\]\ninterface/[ChromeOnly, Exposed=Window]\ninterface/g' *.webidl

and then fixing all the resulting parser failures.  I then verified that the
generated code is the same as before this change.

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

--HG--
extra : moz-landing-system : lando
2019-09-27 15:26:14 +00:00