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

158 Коммитов

Автор SHA1 Сообщение Дата
Paul Bone 8b4c7c407f Bug 1584892 - Remove CycleCollectedJSContext::Initialize's nursery size param r=karlt
Differential Revision: https://phabricator.services.mozilla.com/D47873

--HG--
extra : moz-landing-system : lando
2019-12-16 04:14:55 +00:00
Paul Bone 89a1b3056a Bug 1584892 - Use the default max nursery size for workers r=baku,karlt
This patch updates this for workers and worklets.

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

--HG--
extra : moz-landing-system : lando
2019-12-16 03:55:24 +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
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
Karl Tomlinson 48dfa50a7b Bug 1565956 close BackgroundChild before deleting CycleCollectedJSContext r=baku
Depends on D53131

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

--HG--
extra : moz-landing-system : lando
2019-11-17 21:16:53 +00:00
Karl Tomlinson f93dadfd79 Bug 1593766 relax assertion to handle case of no CycleCollectedJSContext created r=baku
This can happen when addModule() has not be called, but the thread is created
just to send a NotifyWorkletFinished message.

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

--HG--
extra : moz-landing-system : lando
2019-11-06 12:36:41 +00:00
Boris Zbarsky 033a03eb89 Bug 1591491. Add more use of FakeString::ShareOrDependUpon. r=froydnj
If someone then saves the resulting string, this will let us avoid a copy.

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

--HG--
extra : moz-landing-system : lando
2019-10-28 20:41:59 +00:00
Tom Ritter 446f05f035 Bug 1576254 - Add isSystemOrAddonPrincipal to WorkletPrincipal r=baku
WorkletPrincipal inherits JSPrincipals so we need to add the isSystemOrAddonPrincipal
method to it. As of Bug 1578623 rev a83797ed249c - Worklets are always NullPrincipal,
so we can just return false.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 17:36:40 +00:00
Karl Tomlinson 5c05372199 Bug 1578623 remove OriginAttributes duplication by reading from PrincipalInfo r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44918

--HG--
extra : moz-landing-system : lando
2019-09-09 00:41:59 +00:00
Karl Tomlinson 5ad63ce113 Bug 1578623 include stack with console message for uncaught exception in worklet script r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44609

--HG--
extra : moz-landing-system : lando
2019-09-09 00:41:44 +00:00
Karl Tomlinson fb83797145 Bug 1578623 implement WorkletPrincipals::write() r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D44605

--HG--
extra : moz-landing-system : lando
2019-09-09 00:41:50 +00:00
Karl Tomlinson a931bb8408 bug 1578623 store PrincipalInfo on WorkletImpl for off-main-thread use r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44603

--HG--
extra : moz-landing-system : lando
2019-09-09 00:41:57 +00:00
Karl Tomlinson 6e1b3f1262 Bug 1578623 use an opaque origin for WorkletGlobalScope r=baku
The environment settings object for a WorkletGlobalScope derives from the
relevant settings object of the main-thread Worklet object, but the origin is
a unique opaque origin.
https://drafts.css-houdini.org/worklets/#set-up-a-worklet-environment-settings-object

Depends on D44775

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

--HG--
extra : moz-landing-system : lando
2019-09-09 00:42:01 +00:00
Karl Tomlinson 17b569260a Bug 1578623 move principal-related data from LoadInfo to WorkletImpl r=baku
The principals used in worklet scripts derive from the relevant settings object
of the main thread Worklet object, rather than the network loads of the scripts.
Moving the data off LoadInfo removes any implication that the principals might
depend on script module loads.

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

--HG--
extra : moz-landing-system : lando
2019-09-09 00:42:05 +00:00
Noemi Erli d988a687b9 Backed out 9 changesets (bug 1578623) for causing Windows build bustages CLOSED TREE
Backed out changeset 52a86c60c866 (bug 1578623)
Backed out changeset e4fddd3d24b4 (bug 1578623)
Backed out changeset 65a7c4daec27 (bug 1578623)
Backed out changeset 3badf9215788 (bug 1578623)
Backed out changeset 71e58ee8f684 (bug 1578623)
Backed out changeset 0128e12a910f (bug 1578623)
Backed out changeset 8242877392bd (bug 1578623)
Backed out changeset 6d7be8a22f8b (bug 1578623)
Backed out changeset 3be609a9be36 (bug 1578623)

--HG--
extra : amend_source : b76d374926d247982773b58d12cb26e33d9972e8
2019-09-09 03:37:09 +03:00
Karl Tomlinson 2a772f968e Bug 1578623 remove OriginAttributes duplication by reading from PrincipalInfo r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44918

--HG--
extra : moz-landing-system : lando
2019-09-08 23:44:05 +00:00
Karl Tomlinson 934b121f44 Bug 1578623 include stack with console message for uncaught exception in worklet script r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44609

--HG--
extra : moz-landing-system : lando
2019-09-06 02:10:32 +00:00
Karl Tomlinson 18d04e5d8f Bug 1578623 implement WorkletPrincipals::write() r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D44605

--HG--
extra : moz-landing-system : lando
2019-09-06 02:10:31 +00:00
Karl Tomlinson 079bad8d41 bug 1578623 store PrincipalInfo on WorkletImpl for off-main-thread use r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44603

--HG--
extra : moz-landing-system : lando
2019-09-08 23:44:05 +00:00
Karl Tomlinson e9f3cabd45 Bug 1578623 use an opaque origin for WorkletGlobalScope r=baku
The environment settings object for a WorkletGlobalScope derives from the
relevant settings object of the main-thread Worklet object, but the origin is
a unique opaque origin.
https://drafts.css-houdini.org/worklets/#set-up-a-worklet-environment-settings-object

Depends on D44775

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

--HG--
extra : moz-landing-system : lando
2019-09-06 02:10:33 +00:00
Karl Tomlinson 40e181a9ae Bug 1578623 move principal-related data from LoadInfo to WorkletImpl r=baku
The principals used in worklet scripts derive from the relevant settings object
of the main thread Worklet object, rather than the network loads of the scripts.
Moving the data off LoadInfo removes any implication that the principals might
depend on script module loads.

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

--HG--
extra : moz-landing-system : lando
2019-09-06 02:10:33 +00:00
Karl Tomlinson 7afa4a3d2a Bug 1578623 use 1 for first line number of worklet scripts r=baku
This is consistent with what the Web Console expects.

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

--HG--
extra : moz-landing-system : lando
2019-09-06 02:02:59 +00:00
Karl Tomlinson 6b19f33045 Bug 1578623 create worklet global with JSPrincipals having reference to WorkletImpl r=baku,bzbarsky
This will permit implementation of JSPrincipals::write().

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

--HG--
rename : dom/worklet/WorkletPrincipal.cpp => dom/worklet/WorkletPrincipals.cpp
rename : dom/worklet/WorkletPrincipal.h => dom/worklet/WorkletPrincipals.h
extra : moz-landing-system : lando
2019-09-06 02:01:44 +00:00
Karl Tomlinson eb4179edc3 Bug 1558128 reject addModule() promise with AbortError on failure to parse worklet script and don't suppress SyntaxErrors r=baku
https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script
requires that the addModule() promise is rejected with an "AbortError"
DOMException.  https://github.com/w3c/css-houdini-drafts/issues/509 proposes a
more specific error, but that has not been implemented in another browser.

StealExceptionFromJSContext() set ErrorCode to
NS_ERROR_INTERNAL_ERRORRESULT_JS_EXCEPTION if there was a pending exception
(or NS_ERROR_OUT_OF_MEMORY on failure to record the JS exception) or
NS_ERROR_UNCATCHABLE_EXCEPTION if there was no pending exception.
StealNSResult() converted NS_ERROR_INTERNAL_ERRORRESULT_JS_EXCEPTION to
NS_ERROR_DOM_INVALID_STATE_ERR.

Information about the error is lost on conversion of a SyntaxError to the
promise rejection, so allow the SyntaxError to be reported the console.

Depends on D44601

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

--HG--
extra : moz-landing-system : lando
2019-09-04 09:46:50 +00:00
Karl Tomlinson 9f067feb7f Bug 1558128 remove unused local variable r=baku
Depends on D44600

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

--HG--
extra : moz-landing-system : lando
2019-09-04 09:46:42 +00:00
Karl Tomlinson 289744e70a Bug 1558128 report errors from worklet scripts to console r=baku
There is no ErrorEvent dispatched to WorkletGlobalScope.
See also https://github.com/whatwg/html/issues/2611

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

--HG--
extra : moz-landing-system : lando
2019-09-04 09:46:41 +00:00
Mark Banner 351d147e2f Bug 1577746 - Enable ESLint rule object-shorthand for dom/. r=baku
Differential Revision: https://phabricator.services.mozilla.com/D44149

--HG--
extra : moz-landing-system : lando
2019-09-02 11:22:27 +00:00
Karl Tomlinson 3cebe4550f Bug 1473463 remove unnecessary JSAutoRealm as realm is set by AutoEntryScript r=baku
Differential Revision: https://phabricator.services.mozilla.com/D41341

--HG--
extra : moz-landing-system : lando
2019-08-12 11:50:42 +00:00
Karl Tomlinson 7d40632022 Bug 1473463 evaluate worklet scripts as modules without support for nested import r=baku
The separation of parse and evaluate steps permits implementation of behavior
on unhandled exception during evaluation that is different from that on
parsing error.

Implementation of fetching a complete module script graph is tracked in
https://bugzilla.mozilla.org/show_bug.cgi?id=1572644

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

--HG--
extra : moz-landing-system : lando
2019-08-13 11:10:23 +00:00
Karl Tomlinson 859de11460 Bug 1473463 use globalThis in worklet tests because |this| is undefined in toplevel module script r=baku
Differential Revision: https://phabricator.services.mozilla.com/D41338

--HG--
extra : moz-landing-system : lando
2019-08-12 11:46:02 +00:00
Karl Tomlinson 4c081d5a5b Bug 1571622 test for absolute URL in worklet script console logging r=baku
Depends on D40768

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

--HG--
extra : moz-landing-system : lando
2019-08-06 09:06:51 +00:00
Karl Tomlinson 7519a779ac Bug 1571622 use absolute URL in CompileOptions for worklet scripts r=baku
This is consistent with ScriptLoader::FillCompileOptionsForRequest()
https://searchfox.org/mozilla-central/rev/29cce9a2684ef64c4f1f996087da8b7545d31f65/dom/script/ScriptLoader.cpp#2437
and provides that devtools can find the script.

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

--HG--
extra : moz-landing-system : lando
2019-08-06 09:06:53 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Karl Tomlinson 53e03975c9 Bug 1542931 add CycleCollectedJSContext::ReportError() r=baku
to make AutoJSAPI error reporting safe for worklets.

Parameter order matches xpc::ErrorReport::Init().

Depends on D34477

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

--HG--
extra : moz-landing-system : lando
2019-06-12 19:11:04 +00:00
Boris Zbarsky 75aa8f554d Bug 1565767 part 4. Remove some unnecesary refcounting at Document::GetBaseURI callsites. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D37972

--HG--
extra : moz-landing-system : lando
2019-07-15 18:28:43 +00:00
Jan de Mooij 994b76bf8c Bug 1564017 part 1 - Use a proper JS stack quota for worklet threads. r=baku
This currently happened to work but could easily overflow the stack. The JS engine
really expects a JS_SetNativeStackQuota call.

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

--HG--
extra : moz-landing-system : lando
2019-07-08 15:50:20 +00:00
Victor Porof 0a8ff0ad85 Bug 1561435 - Format dom/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 62f3501af4bc1c0bd1ee1977a28aee04706a6663
2019-07-05 10:44:55 +02:00
Andrea Marchesini bb718d74fc Bug 1490044 - Remove DOMPrefs. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D33510

--HG--
extra : moz-landing-system : lando
2019-06-13 09:02:03 +00:00
Boris Zbarsky 5c1d789bfa Bug 1547923 part 3. Add nsIGlobalObject::GetGlobalJSObjectPreserveColor(). r=mccr8
This can be used in things like assertions or some other rare circumstances
where not exposing the object to active JS is OK.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 21:23:35 +00:00
Nathan Froyd 482490a2df Bug 1548562 - require `nsThread::Init` to take a name; r=baku
There's no good reason why we should let unnamed threads through this interface.

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

--HG--
extra : moz-landing-system : lando
2019-05-02 16:05:50 +00:00
Brian Grinstead 0d460e3432 Bug 1544322 - Part 2.2 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in dom/ r=bzbarsky
This is split from the previous changeset since if we include dom/ the file size is too
large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 03:53:28 +00:00
Karl Tomlinson 943896b43c Bug 1539039 keep WorkletGlobalScope as long as its Worklet is usable r=baku
Depends on D25353

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

--HG--
extra : moz-landing-system : lando
2019-04-01 16:54:58 +00:00
Karl Tomlinson d0133206f2 bug 1539039 notify WorkletImpl before WorkletThread shutdown on xpcom shutdown r=baku
This gives WorkletImpl a chance to send a message to release worklet thread
objects.

This is used only for PaintWorklet until PaintWorklet uses its own threads.

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

--HG--
extra : moz-landing-system : lando
2019-04-01 16:51:18 +00:00
Karl Tomlinson bf17f21d5d Bug 1539039 finish worklet before destination stream is destroyed r=padenot
AudioDestinationNode, AudioContext, and Worklet are part of the same cycle.
Any of these may be unlinked before another.
The unlink process for this cycle is the notification that the worklet will no
longer be used, but the worklet uses the destination stream to send a message
to release graph thread objects and so must do this before the stream is
destroyed.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 16:12:08 +00:00
Boris Zbarsky 10d7ccf23e Bug 1535384 part 5. Eliminate MOZ_CAN_RUN_SCRIPT_BOUNDARY for mutation callbacks. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D23776

--HG--
extra : moz-landing-system : lando
2019-03-19 15:14:11 +00:00
Sebastian Hengst cee711baf9 Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi
Differential Revision: https://phabricator.services.mozilla.com/D23546

--HG--
extra : moz-landing-system : lando
2019-03-17 23:13:22 +00:00
Daniel Holbert 3f763b8af9 Bug 1533870: Preemptively fix unified build bustage in layout/style. r=boris
I wrote this patch by first removing UNIFIED_ from layout/style/moz.build, and
then rebuilding, and then addressing build errors one by one.

Nearly all of the build errors were for using the "Document" type without a
proper namespace, and I've addressed this by sprinkling "using namespace"
declarations in the affected .cpp files (and removing a few now-unnecessary
dom:: prefixes on types in those files).

The only other errors were for WorkletGlobalScope.h which needed an #include to
provide the type "DOMHighResTimeStamp", and nsHTMLStyleSheet.h which needed a
forward-declaration for the type "mozilla::dom::Document".

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

--HG--
extra : moz-landing-system : lando
2019-03-08 21:48:39 +00:00
Ryan Hunt 00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Luke Wagner fc9dea6cc7 Bug 1520931 - Remove asm.js cache hooks JS API (r=bbouvier)
--HG--
extra : rebase_source : aac95865af1b87970d49b89edbec0acad6c74219
2019-02-11 11:41:57 -06:00