Commit Graph

4685 Commits

Author SHA1 Message Date
Markus Stange
b2c3ca5adb Bug 1499507 - Use AUTO_PROFILER_LABEL_DYNAMIC_FAST for WebIDL APIs. r=bzbarsky
This means that our binary does not need to include concatenated strings such
as "set CanvasRenderingContext2D.fillStyle". It only needs to contain the
individual strings "CanvasRenderingContext2D" and "fillStyle" which are most
likely already present in the binary.

This change reduces the binary size on macOS x64 by around 200KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build. This change makes us generate slightly more code, which is
very much offset by the reduction in the amount of strings we ship.

@@ -15,22 +15,23 @@

    movl       0x10(%rbx), %r12d
    cmpl       (%rbx), %r12d
    jae        loc_xxxxx

    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
-   leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
+   leaq       aAttr, %rdx                                 ; "Attr"
    movq       %rdx, (%rax,%rcx)
-   movq       $0x0, 0x8(%rax,%rcx)
+   leaq       aSpecified, %rdx                            ; "specified"
+   movq       %rdx, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x71, 0x1c(%rax,%rcx)
+   movl       $0x3a1, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx
    orq        %rax, %rcx

Depends on D9204

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

--HG--
extra : moz-landing-system : lando
2018-11-06 04:34:58 +00:00
Brindusan Cristian
ab89743379 Backed out 9 changesets (bug 1499507) for build bustages on /profiler/core/platform.cpp. CLOSED TREE
Backed out changeset 4c79a5557d7b (bug 1499507)
Backed out changeset 35d05a53e0a9 (bug 1499507)
Backed out changeset 9254e6c721b3 (bug 1499507)
Backed out changeset cf40b044af3f (bug 1499507)
Backed out changeset 76dd85b9aaf7 (bug 1499507)
Backed out changeset 6256446f16c4 (bug 1499507)
Backed out changeset 41cede6bc7d2 (bug 1499507)
Backed out changeset 30476b824eb4 (bug 1499507)
Backed out changeset 24a9494155fe (bug 1499507)
2018-11-05 23:24:49 +02:00
Markus Stange
42d8bddb50 Bug 1499507 - Use AUTO_PROFILER_LABEL_DYNAMIC_FAST for WebIDL APIs. r=bzbarsky
This means that our binary does not need to include concatenated strings such
as "set CanvasRenderingContext2D.fillStyle". It only needs to contain the
individual strings "CanvasRenderingContext2D" and "fillStyle" which are most
likely already present in the binary.

This change reduces the binary size on macOS x64 by around 200KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build. This change makes us generate slightly more code, which is
very much offset by the reduction in the amount of strings we ship.

@@ -15,22 +15,23 @@

    movl       0x10(%rbx), %r12d
    cmpl       (%rbx), %r12d
    jae        loc_xxxxx

    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
-   leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
+   leaq       aAttr, %rdx                                 ; "Attr"
    movq       %rdx, (%rax,%rcx)
-   movq       $0x0, 0x8(%rax,%rcx)
+   leaq       aSpecified, %rdx                            ; "specified"
+   movq       %rdx, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x71, 0x1c(%rax,%rcx)
+   movl       $0x3a1, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx
    orq        %rax, %rcx

Depends on D9204

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

--HG--
extra : moz-landing-system : lando
2018-11-05 21:00:01 +00:00
Narcis Beleuzu
2c6edfdde8 Backed out 9 changesets (bug 1499507) for bustages on ProfileBuffer.cpp . CLOSED TREE
Backed out changeset 541186291b88 (bug 1499507)
Backed out changeset 8a3f4acbad3b (bug 1499507)
Backed out changeset f427afc392b0 (bug 1499507)
Backed out changeset 58dc19fb2b76 (bug 1499507)
Backed out changeset 9225e9aea377 (bug 1499507)
Backed out changeset ca23a517da63 (bug 1499507)
Backed out changeset 16d6c90333de (bug 1499507)
Backed out changeset bc134fe1722a (bug 1499507)
Backed out changeset 4a9c9a91182c (bug 1499507)
2018-11-05 21:48:11 +02:00
Markus Stange
5701f220f1 Bug 1499507 - Use AUTO_PROFILER_DYNAMIC_FAST for WebIDL APIs. r=bzbarsky
This means that our binary does not need to include concatenated strings such
as "set CanvasRenderingContext2D.fillStyle". It only needs to contain the
individual strings "CanvasRenderingContext2D" and "fillStyle" which are most
likely already present in the binary.

This change reduces the binary size on macOS x64 by around 200KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build. This change makes us generate slightly more code, which is
very much offset by the reduction in the amount of strings we ship.

@@ -15,22 +15,23 @@

    movl       0x10(%rbx), %r12d
    cmpl       (%rbx), %r12d
    jae        loc_xxxxx

    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
-   leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
+   leaq       aAttr, %rdx                                 ; "Attr"
    movq       %rdx, (%rax,%rcx)
-   movq       $0x0, 0x8(%rax,%rcx)
+   leaq       aSpecified, %rdx                            ; "specified"
+   movq       %rdx, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x71, 0x1c(%rax,%rcx)
+   movl       $0x3a1, 0x1c(%rax,%rcx)
    leal       0x1(%r12), %eax
    movl       %eax, 0x10(%rbx)

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx
    orq        %rax, %rcx

Depends on D9204

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

--HG--
extra : moz-landing-system : lando
2018-11-05 19:11:46 +00:00
Kris Maglione
288ea557d8 Bug 1482091: Part 1 - Add native TelemetryStopwatch implementation. r=chutten,mccr8
This implementation is considerably more memory efficient than the existing JS
implementation. Migrating to it fully saves us about 28K per base content
process.

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

--HG--
extra : source : a19c6b3e0402d16a77185f82d9fedab83a7ca52e
extra : intermediate-source : 28a19b7290ab288a1cb2cbf6d49f905cecc9682b
2018-10-26 13:17:55 -07:00
arthur.iakab
0c81738411 Backed out 2 changesets (bug 1482091) for bc failures on browser_domFullscreen_fullscreenMode.js
Backed out changeset bc03f101937e (bug 1482091)
Backed out changeset 28a19b7290ab (bug 1482091)
2018-11-03 01:08:36 +02:00
Kris Maglione
bee3f68fdc Bug 1482091: Part 1 - Add native TelemetryStopwatch implementation. r=chutten,mccr8
This implementation is considerably more memory efficient than the existing JS
implementation. Migrating to it fully saves us about 28K per base content
process.

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

--HG--
extra : source : a19c6b3e0402d16a77185f82d9fedab83a7ca52e
2018-10-26 13:17:55 -07:00
arthur.iakab
cf2aa54f83 Backed out 2 changesets (bug 1482091)for failing browser chrome failures on browser_panelUINotifications_fullscreen_noAutoHideToolbar.js
Backed out changeset afd0a13bcfff (bug 1482091)
Backed out changeset a19c6b3e0402 (bug 1482091)
2018-11-02 23:01:15 +02:00
Kris Maglione
4bd1fb01dd Bug 1482091: Part 1 - Add native TelemetryStopwatch implementation. r=chutten,mccr8
This implementation is considerably more memory efficient than the existing JS
implementation. Migrating to it fully saves us about 28K per base content
process.

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

--HG--
extra : rebase_source : f358f1f7097eaa8cd62ae916d048a58489e9f5ff
extra : histedit_source : c44c42de02750d71e23e70fdf22d3c3a40b91d3d
2018-10-26 13:17:55 -07:00
Boris Zbarsky
006e812485 Bug 1503664. Keep trying to pin down why ClearDocumentDependentSlots is crashing. r=mccr8 2018-10-31 20:25:35 -04:00
Andrew McCreight
137838b760 Bug 1500200 - Add non-default implementations of various ways to construct NonRefcountedDOMObject r=peterv
The Rule of Three means that a class with a non-default dtor should
also have a non-default copy constructor and copy assignment operator.
If the default versions of any of these constructors are used, then
you end up with negative leaks.

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

--HG--
extra : moz-landing-system : lando
2018-10-31 10:45:15 +00:00
Nika Layzell
84828b5af3 Bug 1501124 - Switch BackstagePass to use WebIDLGlobalNameHash, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D9736
2018-10-25 10:24:36 -04:00
Nika Layzell
1ec79f98ec Bug 1500926 - Part 3: Remove unused WebIDL Codegen items, r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D9465
2018-10-24 20:11:01 -04:00
Nika Layzell
65b231b95c Bug 1500926 - Part 2: Support a test-only edgecase in Codegen.py, r=bzbarsky
When running tests, we can build a WebIDL environment with no interfaces
exposed on the primary global. Unfortunately, due to the perfecthash.py logic
not handling empty tables, this causes an assertion to be raised. 

We can work around this by generating some dummy code for that situation, as we
will never try to build it.

Differential Revision: https://phabricator.services.mozilla.com/D9407
2018-10-24 20:11:01 -04:00
Nika Layzell
23c990d165 Bug 1500926 - Part 1: Use a statically generated perfect hash in WebIDLGlobalNameHash, r=bzbarsky
This strategy allows us to dodge dynamic allocations in WebIDLGlobalNameHash.
This removes the Init() and Shutdown() methods, as well as Register. The
RegisterBindings.cpp file now only contains static data and one method
declaration for the WebIDLGlobalNameHash class.

This should also be faster by making the hashtable lookup infallible.

Differential Revision: https://phabricator.services.mozilla.com/D9406
2018-10-24 20:11:01 -04:00
Mark Banner
a26105ff45 Bug 1501662 - Add more .eslintrc.js files for test directories (dom, modules, netwerk and parser). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D9661

--HG--
extra : moz-landing-system : lando
2018-10-24 19:11:17 +00:00
Boris Zbarsky
e8f0c35cc3 Bug 1501479. Add instrumentation to figure out why Document.prototype creation is failing. r=mccr8 2018-10-24 02:00:49 +02:00
Andrea Marchesini
39a76c5462 Bug 1500733 - Remove ImageBitmap.mapDataInto, r=aosmond 2018-10-23 23:35:44 +02:00
Nika Layzell
4bf2b2ecb0 Bug 1489301 - Part 6: Remove references to 'System' from WebIDL.py, r=bzbarsky
'Exposed=System' is no longer used in any webidl files, so we can kill it.

Differential Revision: https://phabricator.services.mozilla.com/D9401
2018-10-23 16:03:52 -04:00
Nika Layzell
91ec325721 Bug 1489301 - Part 1: Expose Window interfaces on System by default, r=bzbarsky
This is done by adding BackstagePass the exposure set of Window.

Differential Revision: https://phabricator.services.mozilla.com/D9398
2018-10-23 16:03:50 -04:00
Daniel Varga
5255e1718f Backed out 6 changesets (bug 1489301) for Linting opt failure at /builds/worker/checkouts/gecko/dom/bindings/parser/WebIDL.py
Backed out changeset 1c0823540b44 (bug 1489301)
Backed out changeset 529524df76a6 (bug 1489301)
Backed out changeset f34bc8a40bec (bug 1489301)
Backed out changeset 168cf9cea716 (bug 1489301)
Backed out changeset 19ca10fa3772 (bug 1489301)
Backed out changeset ff8fb091198e (bug 1489301)
2018-10-23 03:49:00 +03:00
Nika Layzell
b4cc020355 Bug 1489301 - Part 6: Remove references to 'System' from WebIDL.py, r=bzbarsky
'Exposed=System' is no longer used in any webidl files, so we can kill it.

Differential Revision: https://phabricator.services.mozilla.com/D9401
2018-10-22 20:17:14 -04:00
Nika Layzell
cc852930f1 Bug 1489301 - Part 1: Expose Window interfaces on System by default, r=bzbarsky
This is done by adding BackstagePass the exposure set of Window.

Differential Revision: https://phabricator.services.mozilla.com/D9398
2018-10-22 20:12:55 -04:00
Boris Zbarsky
5a0e236dba Bug 1497301 part 4. Simplify Location::CheckURL. r=bholley
The main change is to just use the principal bindings pass us to do our
CheckLoadURI check.  If we do that, we don't have to care about the current
JSContext.
2018-10-12 11:07:18 -04:00
Noemi Erli
a52231df87 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-10-16 01:22:27 +03:00
Bogdan Tara
48993ddce1 Backed out 2 changesets (bug 1497301) for /url/failure.html failures CLOSED TREE
Backed out changeset 45ba0943d666 (bug 1497301)
Backed out changeset 0bd7470927d2 (bug 1497301)
2018-10-16 00:30:00 +03:00
Andreas Pehrson
7561a1fdef Bug 1258143 - Remove LocalMediaStream. r=jib,smaug
Differential Revision: https://phabricator.services.mozilla.com/D8064

--HG--
extra : moz-landing-system : lando
2018-10-15 08:17:07 +00:00
Boris Zbarsky
bf4550903b Bug 1499150. Add some more ClearDocumentDependentSlots crash instrumentation. r=mccr8 2018-10-15 14:40:14 -04:00
Boris Zbarsky
6071f7bc07 Bug 1497301 part 4. Simplify Location::CheckURL. r=bholley
The main change is to just use the principal bindings pass us to do our
CheckLoadURI check.  If we do that, we don't have to care about the current
JSContext.
2018-10-12 11:07:18 -04:00
Bogdan Tara
db185e5d31 Backed out 2 changesets (bug 1258143) for dom/media/tests/crashtests/791330.html failures CLOSED TREE
Backed out changeset 514420f15a67 (bug 1258143)
Backed out changeset 905c871bcf03 (bug 1258143)
2018-10-12 17:42:26 +03:00
Andreas Pehrson
ecdb48777f Bug 1258143 - Remove LocalMediaStream. r=jib,smaug
Differential Revision: https://phabricator.services.mozilla.com/D8064

--HG--
extra : moz-landing-system : lando
2018-10-11 12:43:34 +00:00
Andreas Pehrson
f5f6f6fdb4 Bug 1377146 - Remove AudioStreamTrack and VideoStreamTrack from js. r=jib,smaug
Differential Revision: https://phabricator.services.mozilla.com/D8063

--HG--
extra : moz-landing-system : lando
2018-10-11 15:36:11 +00:00
Andrew McCreight
53217795fe Bug 1493237 - Use a test-only non-nsISupports wrapper cached WebIDL class in a weak map test r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D8134

--HG--
extra : moz-landing-system : lando
2018-10-11 23:02:10 +00:00
Jeff Gilbert
dd4766f2a3 Bug 1494809 - Remove WebGL ATC support. - r=kvark,qdot
The WG rejected this extension.


--HG--
rename : dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_es3.html => dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_etc.html
2018-10-10 18:13:14 -07:00
Jeff Gilbert
f7941731a5 Bug 1494809 - Support WebGL exts for BPTC and RGTC. - r=kvark,qdot 2018-10-10 18:13:11 -07:00
Coroiu Cristina
9a1a60c7fb Backed out 7 changesets (bug 1494809) for build bustage at build/src/dom/canvas/WebGLTextureUpload.cpp on a CLOSED TREE
Backed out changeset 89e092c992ae (bug 1494809)
Backed out changeset 076aed819da6 (bug 1494809)
Backed out changeset 101b4c98aad8 (bug 1494809)
Backed out changeset a2612f006753 (bug 1494809)
Backed out changeset be2ec3c05d10 (bug 1494809)
Backed out changeset 6106836daf58 (bug 1494809)
Backed out changeset e98c2a51aa8f (bug 1494809)

--HG--
rename : dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_etc.html => dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_es3.html
2018-10-10 08:15:09 +03:00
Jeff Gilbert
1e459429ff Bug 1494809 - Remove WebGL ATC support. - r=kvark,qdot
The WG rejected this extension.


--HG--
rename : dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_es3.html => dom/canvas/test/webgl-mochitest/ensure-exts/test_WEBGL_compressed_texture_etc.html
2018-10-09 21:39:17 -07:00
Jeff Gilbert
3cbaf8002c Bug 1494809 - Support WebGL exts for BPTC and RGTC. - r=kvark,qdot 2018-10-09 21:39:14 -07:00
Masayuki Nakano
06267cb849 Bug 1479964 - Set KeyboardEvent.keyCode and KeyboardEvent.charCode to same value if the event is "keypress" event r=smaug
Chrome sets both KeyboardEvent.keyCode and KeyboardEvent.charCode of "keypress"
event to same value.  On the other hand, our traditional behavior is, sets
one of them to 0.

Therefore, we need to set keyCode value to charCode value if the keypress
event is caused by a non-function key, i.e., it may be a printable key with
specific modifier state and/or different keyboard layout for compatibility
with Chrome.  Similarly, we need to set charCode value to keyCode value if
the keypress event is caused by a function key which is not mapped to producing
a character.

Note that this hack is for compatibility with Chrome.  So, for now, it's enough
to change the behavior only for "keypress" event handlers in web content.  If
we completely change the behavior, we need to fix a lot of default handlers
and mochitests too.  However, it's really difficult because default handlers
check whether keypress events are printable or not with following code:

> if (event.charCode &&
>     !event.altKey && !event.ctrlKey && !event.metaKey) {

or

> if (!event.keyCode &&
>     !event.altKey && !event.ctrlKey && !event.metaKey) {

So, until we stop dispatching "keypress" events for non-printable keys,
we need complicated check in each of them.

And also note that this patch changes the behavior of KeyboardEvent::KeyCode()
when spoofing is enabled and the instance is initialized by initKeyEvent() or
initKeyboardEvent().  That was changed by bug 1222285 unexpectedly and keeping
the behavior makes patched code really ugly.  Therefore, this takes back the
old behavior even if spoofing is enabled.

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

--HG--
extra : moz-landing-system : lando
2018-10-09 04:43:37 +00:00
Arnaud Bienner
bb6b29da9d Bug 1473467: implement AudioWorkletGlobalScope::RegisterProcessor(). r=baku,karlt
Differential Revision: https://phabricator.services.mozilla.com/D6368

--HG--
extra : moz-landing-system : lando
2018-10-08 19:15:13 +00:00
Boris Zbarsky
c7f7303059 Bug 1496805. Add some more instrumentation to try to pin down why ClearDocumentDependentSlots crashes. r=mccr8 2018-10-05 15:59:43 -04:00
Brian Hackett
faaf9d447d Bug 1495272 Part 1 - Don't register deferred finalizer in BindingJSObjectCreator until initialization succeeds, r=bz.
--HG--
extra : rebase_source : 9824eee43c6c4b1949c2e2ad2168262bc4342b45
2018-10-03 15:03:02 -10:00
Jon Coppeard
a9899af8b1 Bug 1490009 - Clear CallbackObject fields after use for promise job to avoid tenuring objects unnecessarily r=bz 2018-09-20 13:28:59 +01:00
Andrea Marchesini
4be054a731 Bug 1390801 - FeaturePolicy - part 2 - WebIDL + DOM integration, r=ckerschb 2018-10-01 08:09:44 +02:00
Alexander Surkov
bdd3f4e880 Bug 1494230 - replace #text-base binding by webidl control, r=smaug 2018-10-01 11:37:39 +08:00
arthur.iakab
f0410f8d4b Merge mozilla-central to mozilla-inbound 2018-09-29 01:00:35 +03:00
Boris Zbarsky
7d6b9e16ef Bug 1396482 part 2. Enumerate JS standard classes on Window Xrays, just like we enumerateWebIDL interfaces. r=bholley 2018-09-28 10:49:44 -04:00
Andreea Pavel
b49640be9b Backed out 2 changesets (bug 1396482) for failing dom/tests/mochitest/general/test_interfaces.html on a CLOSED TREE
Backed out changeset 8c9b27320d6e (bug 1396482)
Backed out changeset c23086c12393 (bug 1396482)
2018-09-28 19:45:27 +03:00
Boris Zbarsky
918ee28a32 Bug 1396482 part 2. Enumerate JS standard classes on Window Xrays, just like we enumerateWebIDL interfaces. r=bholley 2018-09-28 10:49:44 -04:00