Commit Graph

67747 Commits

Author SHA1 Message Date
Gurzau Raul
1da9ef02c4 Merge inbound to mozilla-central. a=merge
--HG--
rename : testing/web-platform/tests/content-security-policy/navigate-to/form-action/form-action-blocks-navigate-to-allows.html => testing/web-platform/tests/content-security-policy/navigate-to/form-action/form-action-blocks-navigate-to-allows.sub.html
rename : testing/web-platform/tests/content-security-policy/navigate-to/spv-only-sent-to-initiator.html => testing/web-platform/tests/content-security-policy/navigate-to/spv-only-sent-to-initiator.sub.html
2018-11-06 11:57:49 +02:00
Ehsan Akhgari
6f7b03e600 Bug 1504574 - Remove the XPCOM registration for nsDocumentEncoder; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D10856
2018-11-05 23:16:04 -05:00
Markus Stange
42b0e9f253 Bug 1499507 - Allow the compiler to generate a non-atomic increment instruction for the stack pointer increment. r=njn
This change reduces the binary size on macOS x64 by around 50KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build. It's a bit hard to read because %r12 and %rbx swap their
function, but what happens in this method is that "movq       %r12, %rcx" goes
away, and the two instructions "leal       0x1(%r12) %eax" and
"movl       %eax, 0x10(%rbx)" turn into an "incl       0x10(%r12)".
So the old code was preserving the original value of profilingStack->stackPointer
in a register, and then using it later to compute the incremented stackPointer.
The new code uses an "incl" instruction for the stackPointer increment and
doesn't worry that the stackPointer value might have changed since the stack
size check at the start of the function. (It can't have changed.)

before: %rbx has the ProfilingStack*, %r12 has profilingStack->stackPointer
after: %r12 has the ProfilingStack*, %rbx has profilingStack->stackPointer

@@ -3,37 +3,35 @@
    movq       %rsp, %rbp
    pushq      %r15
    pushq      %r14
    pushq      %r12
    pushq      %rbx
    subq       $0x10, %rsp
    movq       %rcx, %r14
    movq       %rdx, %r15
-   movq       0x80(%rdi), %rbx
-   movq       %rbx, -40(%rbp)
-   testq      %rbx, %rbx
+   movq       0x80(%rdi), %r12
+   movq       %r12, -40(%rbp)
+   testq      %r12, %r12
    je         loc_xxxxx

-   movl       0x10(%rbx), %r12d
-   cmpl       (%rbx), %r12d
+   movl       0x10(%r12), %ebx
+   cmpl       (%r12), %ebx
    jae        loc_xxxxx

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

    movq       %r15, %rdi
    call       __ZNK7mozilla3dom4Attr9SpecifiedEv          ; mozilla::dom::Attr::Specified() const
    movzxl     %al, %eax
    movabsq    $0xfff9000000000000, %rcx
    orq        %rax, %rcx
    movq       %rcx, (%r14)
    movq       -40(%rbp), %rax
@@ -47,11 +45,11 @@
    popq       %rbx
    popq       %r12
    popq       %r14
    popq       %r15
    popq       %rbp
    ret
                         ; endp

-   movq       %rbx, %rdi
+   movq       %r12, %rdi
    call       __ZN14ProfilingStack18ensureCapacitySlowEv  ; ProfilingStack::ensureCapacitySlow()
    jmp        loc_xxxxx

Depends on D9205

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

--HG--
extra : moz-landing-system : lando
2018-11-06 04:35:13 +00:00
Markus Stange
24f3fd501e Bug 1499507 - Add AUTO_PROFILER_LABEL_DYNAMIC_FAST which allows specifying flags. r=njn
Depends on D9203

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

--HG--
extra : moz-landing-system : lando
2018-11-06 04:33:45 +00:00
Markus Stange
75c251de85 Bug 1499507 - Add ProfilingStackFrame flags for to choose the string template that is used to combine the label with the dynamic string. r=njn
These flags will be used by WebIDL APIs in an upcoming patch.

Depends on D9199

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

--HG--
extra : moz-landing-system : lando
2018-11-06 04:33:07 +00:00
Markus Stange
e6c22c99ad Bug 1499507 - Convert the ProfilingStackFrame kind into a set of flags. r=njn
This makes it easier to add more flags.

Depends on D9197

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

--HG--
extra : moz-landing-system : lando
2018-11-06 04:32:29 +00:00
Markus Stange
ab700f9fc0 Bug 1499507 - Don't collect line numbers for profiling stack frames. r=njn
They were not displayed in the UI, and the instructions to initialize the line
field of a stack frame increased code size unnecessarily.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

@@ -20,17 +20,16 @@
    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
-   movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 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

Depends on D9193

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

--HG--
extra : moz-landing-system : lando
2018-11-06 04:31:02 +00:00
Markus Stange
abb7ce1a0a Bug 1499507 - Make ensureCapacitySlow infallible. r=emilio
This eliminates a few instructions from each inlined instance of
AutoProfilerLabel because we no longer need to handle allocation failure in the
inlined code.
I think this allocation should be fine to make infallible: The allocation size
is limited by the thread's stack depth, and we only hit this code path when the
stack is the deepest it's ever been during the thread's life time.

This change reduces the binary size on Linux x64 by around 100KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build, it really just eliminates one test and one jump at the very end
of the method:

@@ -9,30 +9,29 @@
    movq       %rcx, %r14
    movq       %rdx, %r15
    movq       0x80(%rdi), %rbx
    movq       %rbx, -40(%rbp)
    testq      %rbx, %rbx
    je         loc_xxxxx

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

    movq       0x8(%rbx), %rax
    movq       %r12, %rcx
    shlq       $0x5, %rcx
    leaq       aGetAttrspecifi, %rdx                       ; "get Attr.specified"
    movq       %rdx, (%rax,%rcx)
    movq       $0x0, 0x8(%rax,%rcx)
    leaq       -40(%rbp), %rdx
    movq       %rdx, 0x10(%rax,%rcx)
    movl       $0x106, 0x18(%rax,%rcx)
    movl       $0x1c, 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
@@ -50,12 +49,9 @@
    popq       %r14
    popq       %r15
    popq       %rbp
    ret
                         ; endp

    movq       %rbx, %rdi
    call       __ZN14ProfilingStack18ensureCapacitySlowEv  ; ProfilingStack::ensureCapacitySlow()
-   testb      %al, %al
-   jne        loc_xxxxx
-
    jmp        loc_xxxxx

Depends on D9192

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

--HG--
extra : moz-landing-system : lando
2018-11-06 04:30:13 +00:00
Markus Stange
3be6c8467b Bug 1499507 - Fold the 'profiler is active' check into the 'JSContext has a non-null PseudoStack' check. r=sfink
This eliminates a few instructions from every profiler label and saves code size.
We have around 9000 WebIDL constructors + methods + getters + setters which all
have an inlined instance of this code.

This change reduces the binary size on Linux x64 by around 160KB.

Here's a diff of the impact on the code generated for Attr_Binding::get_specified
in the Mac build:

    movq       %rsp, %rbp
    pushq      %r15
    pushq      %r14
    pushq      %r12
    pushq      %rbx
    subq       $0x10, %rsp
    movq       %rcx, %r14
    movq       %rdx, %r15
-   movq       __ZN7mozilla8profiler6detail12RacyFeatures18sActiveAndFeaturesE@GOT, %rax ; __ZN7mozilla8profiler6detail12RacyFeatures18sActiveAndFeaturesE@GOT
-   movl       (%rax), %eax
-   testl      %eax, %eax
-   js         loc_xxxxx
-
-   movq       $0x0, -40(%rbp)
-   jmp        loc_xxxxx
-
-   movq       0x78(%rdi), %rbx
+   movq       0x80(%rdi), %rbx
    movq       %rbx, -40(%rbp)
    testq      %rbx, %rbx
    je         loc_xxxxx

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

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

--HG--
extra : moz-landing-system : lando
2018-11-06 04:29:35 +00:00
Eric Faust
c81e060dda Bug 1494942 - Improve AtomizeUTF8Chars performance. (r=Waldo)
--HG--
extra : source : e726ed0d7b65c3540e1831623284168b39eefac1
extra : amend_source : 044eab05fb32721a0a807ff43dc3eaee9a59848a
2018-11-05 17:37:51 -08:00
shindli
164d7dfb6e Backed out changeset e726ed0d7b65 (bug 1494942) for spidermonkey bustages. 2018-11-06 02:13:29 +02:00
Eric Faust
ea3bcd2b8b Bug 1494942 - Improve AtomizeUTF8Chars performance. (r=Waldo)
--HG--
extra : rebase_source : 520a97331ee2358617acbf9db3bfc9eb425248e0
2018-11-05 16:03:16 -08:00
Kyle Machulis
8ad671c4c0 Bug 1498059 - Tests for CEnums in XPIDL; r=nika,froydnj
Depends on D8594

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

--HG--
extra : moz-landing-system : lando
2018-11-06 00:05:44 +00:00
Ehsan Akhgari
c78ff51afb Bug 1504566 - Remove the XPCOM registration for nsHTMLCopyEncoder; r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D10958
2018-11-05 17:28:54 -05:00
Narcis Beleuzu
9b3f73e696 Merge mozilla-central to inbound. CLOSED TREE 2018-11-05 23:54:03 +02:00
vinoth
e14aa2974e Bug 1504605 - Add Prefs to xpcshell test files for allowing usage of eval. r=ckerschb
Reviewers: ckerschb

Reviewed By: ckerschb

Subscribers: ckerschb

Bug #: 1504605

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

--HG--
extra : rebase_source : 9abb395224bdfa7795516295babfd847ea2553f4
2018-11-05 16:41:45 +02:00
Matthew Gaudet
42e2aee566 Bug 1488763 - Unify stack touch logic across all platforms r=jandem
This incidentally also -adds- the stack touch logic to ARM64.

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

--HG--
extra : moz-landing-system : lando
2018-11-05 09:35:01 +00:00
Ted Campbell
8c500290c1 Bug 1503994 - Fixup js Proxy doc comments r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D10716

--HG--
extra : moz-landing-system : lando
2018-11-05 09:09:45 +00:00
Jonathan Kingston
4248b4c554 Bug 1490257 - Pass triggeringPrincipal to test code. r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D10882

--HG--
extra : moz-landing-system : lando
2018-11-05 14:05:47 +00:00
vinoth
896a7bbbd2 Bug 1504207 - Add Prefs for allowing usage of eval with system principal in test files r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D10696

--HG--
extra : moz-landing-system : lando
2018-11-05 13:39:31 +00:00
Ted Campbell
9fe909e765 Bug 1503885 - Cleanup JOF_ types in Opcodes.h r=jandem
- Add JOF_ARGC, JOF_RESUMEINDEX instead of bare integer tags
- Fix some inconsistencies of JOF_ type and opcode size
- Reorganize JOF_ type list

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

--HG--
extra : moz-landing-system : lando
2018-11-04 21:50:14 +00:00
Ted Campbell
734e0038de Bug 1503885 - Fix top-level comments in vm/Opcodes.h r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D10761

--HG--
extra : moz-landing-system : lando
2018-11-04 21:41:41 +00:00
Ted Campbell
8403e89b6f Bug 1503885 - Fix formatting in vm/Opcodes.h r=jandem
- Wrap comments to 80 cols
- Use consistent formatting for opcode comments

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

--HG--
extra : moz-landing-system : lando
2018-11-04 21:41:32 +00:00
Ted Campbell
9b026718a5 Bug 1503885 - Fix whitespace (only) in vm/Opcodes.h r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D10566

--HG--
extra : moz-landing-system : lando
2018-11-04 21:41:18 +00:00
Jason Orendorff
fb86f885cc Bug 1501502 - Assertion failure: IsObjectValueInCompartment(v, compartment()) with bogus queuing strategy object. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10773

--HG--
extra : moz-landing-system : lando
2018-11-03 13:13:55 +00:00
shindli
7c0a5e2aef Merge inbound to mozilla-central. a=merge 2018-11-03 11:40:50 +02:00
arthur.iakab
890cf8bcf7 Backed out changeset 2a3a7c533bc0 (bug 1501502) for spidermonkey bustages on non262/ReadableStream/bug-1501502.js CLOSED TREE 2018-11-03 01:02:35 +02:00
Jason Orendorff
92221647b4 Bug 1501502 - Assertion failure: IsObjectValueInCompartment(v, compartment()) with bogus queuing strategy object. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10773

--HG--
extra : moz-landing-system : lando
2018-11-02 21:52:23 +00:00
Jason Orendorff
cadfbab250 Bug 1503867 - Change layout for state bits in class ReadableStream. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10587

--HG--
extra : moz-landing-system : lando
2018-11-02 21:09:52 +00:00
Jason Orendorff
a61f6d6249 Bug 1503006 - Part 12: Eliminate Maybe<AutoRealm> from Stream.cpp. r=tcampbell
Depends on D10436

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:09:21 +00:00
Jason Orendorff
2f86eb3f31 Bug 1503006 - Part 11: Rename two remaining static methods to toplevel functions. r=tcampbell
This also reorders the remaining members of class ReadableStream a bit.

Depends on D10435

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:08:58 +00:00
Jason Orendorff
4474c4783c Bug 1503006 - Part 10: Eliminate some static methods that are one-to-one with API entry points. r=tcampbell
Depends on D10434

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:08:30 +00:00
Jason Orendorff
bc8918eb92 Bug 1503006 - Part 9: Code motion only. Move some static Stream methods immediately after their sole callers. r=tcampbell
Depends on D10433

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:08:02 +00:00
Jason Orendorff
387184986d Bug 1503006 - Part 8: Move implementation of public Stream API functions from jsapi.cpp to builtin/Stream.cpp. r=tcampbell
Depends on D10432

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:07:34 +00:00
Jason Orendorff
61ace3d5c1 Bug 1503006 - Part 7: Clean up remaining slot constants. r=tcampbell
Depends on D10431

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:07:06 +00:00
Jason Orendorff
7e62261edd Bug 1503006 - Part 6: Trivial slot accessor methods for class ReadableByteStreamController. r=tcampbell
In passing, change ReadableStreamControllerPullSteps to use explicit downcasts,
so it's a little more obvious what's going on.

Depends on D10430

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:06:39 +00:00
Jason Orendorff
cf6cb82e24 Bug 1503006 - Part 5: Trivial slot accessor methods for class ReadableStreamDefaultController. r=tcampbell
Depends on D10429

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:06:16 +00:00
Jason Orendorff
d3de531e9f Bug 1503006 - Part 4: Trivial slot accessor methods for class ReadableStreamController. r=tcampbell
Depends on D10428

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:05:48 +00:00
Jason Orendorff
95f809aae4 Bug 1503006 - Part 3: Trivial slot accessor methods for class ReadableStreamReader. r=tcampbell
This commit changes ReadableStreamReaderGenericRelease to use
UnwrapInternalSlot when accessing reader.[[closedPromise]]. Before this commit,
the code assumed that there would be a promise in the slot, not a wrapper.
I think that was actually correct, because it's impossible for the stream to
still be readable and the reader to have a [[closedPromise]] that's a wrapper.
Still, it's a bit precarious (and I'm still not 100% sure about that), so I just
changed it to unwrap.

Depends on D10374

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

--HG--
extra : moz-landing-system : lando
2018-11-02 21:05:20 +00:00
Jason Orendorff
f0f4233f95 Bug 1503006 - Part 2: Trivial slot accessor methods for class ReadableStream. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10374

--HG--
extra : moz-landing-system : lando
2018-11-02 21:05:18 +00:00
Ciure Andrei
26f3fc7fec Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-11-02 18:48:12 +02:00
Ciure Andrei
83010e5db0 Merge inbound to mozilla-central. a=merge 2018-11-02 18:44:43 +02:00
Jan de Mooij
7d9c159b47 Bug 1503170 part 3 - Remove unused CGResumeOffsetList::numAwaits, move numYields to BytecodeEmitter. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D10686

--HG--
extra : moz-landing-system : lando
2018-11-02 13:38:32 +00:00
Jan de Mooij
8f3823c37a Bug 1503170 part 2 - Use resume{Index,Offset} for JSOP_GOSUB/JSOP_RETSUB, remove RetSub IC. r=tcampbell
Note: JSOP_GOSUB has a use count of 2 even though it doesn't push/pop anything.
This isn't great but was done to match the old behavior (def count of 0, pushed
2 values).

Depends on D10571

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

--HG--
extra : moz-landing-system : lando
2018-11-02 13:37:34 +00:00
Ciure Andrei
f93ee62611 Backed out 11 changesets (bug 1503006) for landing the wrong version of patches CLOSED TREE
Backed out changeset f45aeb07cca6 (bug 1503006)
Backed out changeset 5782af4a237c (bug 1503006)
Backed out changeset ca8bd4e2151e (bug 1503006)
Backed out changeset 4fc5492e340c (bug 1503006)
Backed out changeset bb238cffc154 (bug 1503006)
Backed out changeset d1580501b0d1 (bug 1503006)
Backed out changeset b54266154e56 (bug 1503006)
Backed out changeset 8f0bef2f1dfb (bug 1503006)
Backed out changeset 64f5848790f7 (bug 1503006)
Backed out changeset 3f91b9f1dd38 (bug 1503006)
Backed out changeset 98c55ece0f42 (bug 1503006)
2018-11-02 13:31:03 +02:00
Jason Orendorff
9d84494236 Bug 1503006 - Part 12: Eliminate Maybe<AutoRealm> from Stream.cpp. r=tcampbell
Depends on D10436

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

--HG--
extra : moz-landing-system : lando
2018-11-01 00:06:43 +00:00
Jason Orendorff
c5bda45c8d Bug 1503006 - Part 11: Rename two remaining static methods to toplevel functions. r=tcampbell
This also reorders the remaining members of class ReadableStream a bit.

Depends on D10435

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

--HG--
extra : moz-landing-system : lando
2018-11-01 00:01:07 +00:00
Jason Orendorff
730fc1a771 Bug 1503006 - Part 10: Eliminate some static methods that are one-to-one with API entry points. r=tcampbell
Depends on D10434

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

--HG--
extra : moz-landing-system : lando
2018-11-01 00:00:08 +00:00
Jason Orendorff
85cde918e8 Bug 1503006 - Part 9: Code motion only. Move some static Stream methods immediately after their sole callers. r=tcampbell
Depends on D10433

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

--HG--
extra : moz-landing-system : lando
2018-10-31 23:56:39 +00:00
Jason Orendorff
dc80131e37 Bug 1503006 - Part 8: Move implementation of public Stream API functions from jsapi.cpp to builtin/Stream.cpp. r=tcampbell
Depends on D10432

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

--HG--
extra : moz-landing-system : lando
2018-10-31 23:54:55 +00:00