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

48 Коммитов

Автор SHA1 Сообщение Дата
Gabriele Svelto 69790bc62e Bug 1600545 - Remove useless inclusions of header files generated from IDL files in accessible/, browser/, caps/, chrome/, devtools/, docshell/, editor/, extensions/, gfx/, hal/, image/, intl/, ipc/, js/, layout/, and media/ 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/D55443

--HG--
extra : moz-landing-system : lando
2019-12-06 09:16:44 +00:00
Boris Zbarsky 75124bdd98 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067

--HG--
extra : moz-landing-system : lando
2019-12-05 04:44:32 +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
Tom Ritter 117e232bdc Bug 1576254 - Add isSystemOrAddonPrincipal to JSPrincipal and nsJSPrincipals r=luke
Finally, here we add the virtual method isSystemOrAddonPrincipal to the
JSPrincipal object.

We also add it to nsJSPrincipal (where it has an easy implementation), and
to carry classes that are used by JS tests and the shell.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 17:37:36 +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
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 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 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
Christoph Kerschbaumer b633427366 Bug 965637: Move CSP from Principal into Client, part 1: backend changes. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D27654

--HG--
extra : moz-landing-system : lando
2019-05-21 23:14:27 +00:00
Sylvestre Ledru a1dce6440a Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-22 16:35:03 +00:00
Brian Hackett d5ff34f278 Bug 1543751 Part 2 - Include stack in worker error reports, r=bz.
--HG--
extra : rebase_source : def4f4f4203cb0905cde342d7f02fe4f101005f5
extra : histedit_source : 87179f28838b627a848605b54d0d64bb20dc0ca4
2019-04-15 13:46:05 -10:00
Jan Varga 473d8c3a68 Bug 1517089 - Part 9: Add baseDomain to ContentPrincipalInfo; r=asuth
Differential Revision: https://phabricator.services.mozilla.com/D19203
2019-02-08 21:01:50 +01:00
Gurzau Raul 6b94d177d1 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-03-01 09:28:28 +02:00
Nika Layzell 516741b393 Bug 1507991 - Part 2: Serialize domain in ContentPrincipalInfo, r=baku
This is needed to maintain full feature parity with the existing
nsIPrincipal serializer while switching to using the PrincipalInfo-based
one.

Depends on D14434

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

--HG--
extra : moz-landing-system : lando
2019-02-28 16:50:28 +00:00
Gurzau Raul ad9b9545b4 Backed out 3 changesets (bug 1507991) for bustages at DBSchema.cpp on a CLOSED TREE.
Backed out changeset 71c093a6dace (bug 1507991)
Backed out changeset 15116b423375 (bug 1507991)
Backed out changeset a483c170d712 (bug 1507991)
2019-02-26 22:56:42 +02:00
Nika Layzell e1231c52dd Bug 1507991 - Part 2: Serialize domain in ContentPrincipalInfo, r=baku
This is needed to maintain full feature parity with the existing
nsIPrincipal serializer while switching to using the PrincipalInfo-based
one.

Depends on D20853

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

--HG--
extra : moz-landing-system : lando
2019-02-26 15:48:00 +00:00
Ryan Hunt 945f9686c0 Bug 1523969 part 2 - Move method definition inline comments to new line in 'caps/'. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D21102

--HG--
extra : rebase_source : b425a584c7f754a52a32362ea08ebcecc5941c78
2019-02-25 16:03:35 -06:00
Dave Townsend 4e82401311 Bug 1515863, r=valentin,ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D15728

--HG--
extra : rebase_source : 2e1c705dd97d458080387896fd7a1f0e88523e06
2018-04-11 12:52:47 -07:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jan de Mooij bccfe7c569 Bug 1508065 - Change JS_PUBLIC_{API,DATA} and JS_FRIEND_{API,DATA} to be more like similar macros to avoid confusing clang-format. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D12256

--HG--
extra : moz-landing-system : lando
2018-11-19 17:02:47 +00:00
Jonathan Kingston 2a8b750345 Bug 1502743 - Replace black/whitelist within caps to block/allowlist r=ckerschb
Differential Revision: https://phabricator.services.mozilla.com/D10013

--HG--
extra : moz-landing-system : lando
2018-10-31 17:56:43 +00:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Andrea Marchesini 6bcc1f6196 Bug 1328964 - part 2 - WorkletThread r=baku
Initial version r=smaug.
Rebased to c616a6fd5e4b by Jan-Ivar Bruaroey <jib@mozilla.com> r=karlt.
Rebased to 83de58ddda20 by Karl Tomlinson <karlt+@karlt.net> r=baku.

MozReview-Commit-ID: Lo8TWtN8qyz

--HG--
extra : rebase_source : ffcb7b835ea49cda3e25dfa94a91b3725fdbfb29
2018-04-12 15:14:48 +12:00
Christian Holler 022546f573 Bug 1442716 - [caps] Handle empty origin gracefully in FUZZING. r=baku 2018-03-02 19:48:49 +01:00
Christian Holler 2d642a506c Bug 1440397 - Handle unexpected principal tag gracefully in FUZZING. r=baku 2018-03-02 19:01:00 +01:00
Andrea Marchesini 8cdf705535 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Andrea Marchesini 7e52540256 Bug 1432963 - Fixing workers headers - part 16 - JSSettings in a workerinternals namespace, r=smaug 2018-01-31 08:24:59 +01:00
Andrea Marchesini 3513d1c407 Bug 1413112 - Renaming Workers.h to WorkerCommon.h, r=bkelly
--HG--
rename : dom/workers/Workers.h => dom/workers/WorkerCommon.h
2018-01-30 10:10:04 +01:00
Andrea Marchesini 155b15b8e0 Bug 1414755 - Get rid of ContentPrincipalInfoOriginNoSuffix, r=bz, r=bkelly
This patch uses MozURL in ServiceWorkerRegistrar and in DBScheme to obtain the
origin of a URL. This is safe because the URL is always http/https/ftp.

It also changes the serialization of Principal in nsJSPrincipals in order to
pass the originNoSuffix together with the OriginAttributes and the spec.
2017-11-15 11:19:26 +01:00
Nicholas Nethercote f582d96b98 Bug 1390428 (part 9) - Remove nsXPIDLCString. r=erahm.
This is straightforward, with only two notable things.

- `#include "nsXPIDLString.h" is replaced with `#include "nsString.h"`
  throughout, because all nsXPIDLString.h did was include nsString.h. The
  exception is for files which already include nsString.h, in which case the
  patch just removes the nsXPIDLString.h inclusion.

- The patch removes the |xpidl_string| gtest, but improves the |voided| test to
  cover some of its ground, e.g. testing Adopt(nullptr).

--HG--
extra : rebase_source : 452cc4a08046a1adb1a8099a7e85a1917de5add8
2017-08-17 15:29:03 +10:00
Andrea Marchesini 50f7937e84 Bug 1340163 - Introducing originNoSuffix as attribute in ContentPrincipalInfo, r=smaug 2017-03-20 16:03:45 +01:00
Sebastian Hengst a472d9b04f Backed out changeset 54a1f0cb64d9 (bug 1340163) for crashing e.g. in browser/components/originattributes/test/browser/browser_cacheAPI.js. r=backout 2017-03-20 15:38:19 +01:00
Andrea Marchesini 38c6ab4035 Bug 1340163 - Introducing originNoSuffix as attribute in ContentPrincipalInfo, r=smaug 2017-03-20 14:51:54 +01:00
Andrea Marchesini 359ae91eac Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
Andrea Marchesini 43e2ee7f71 Bug 1318727 - BroadcastChannel should support data URL - part 2, r=me 2016-11-30 15:31:09 +01:00
Nicholas Nethercote 8c9e80a613 Bug 1297300 - Add missing checks to GetSpec() calls in caps/ and js/. r=mrbkap.
This required making GetScriptLocation() fallible.

--HG--
extra : rebase_source : a678e86c443988897d88550bec1cd1d21c3e919e
2016-08-30 14:22:04 +10:00
Kan-Ru Chen 29b9a17a92 Bug 1295103 - Use MOZ_MUST_USE in OriginAttributes. r=allstars
MozReview-Commit-ID: PWUb81L8ya

--HG--
extra : rebase_source : 2bdc7adc7a6b5fd121a4621086fab6f87834dd20
2016-08-15 18:22:44 +08:00
Andrew McCreight 20456a6f50 Bug 1292289, part 2 - Remove includes of xpcprivate.h in caps/. r=mrbkap
Also remove some unused nsIXPConnect headers.

With the prior patch and this patch, touching xpcprivate.h does not
require rebuilding the caps directory.

MozReview-Commit-ID: HAL0FscGqjM

--HG--
extra : rebase_source : 6d0fcb66d5b6e2654919eb0d035c4365fb30273f
2016-08-04 11:19:24 -07:00
Yoshi Huang 7ae2e09f40 Bug 1263496 - Part 2: fix for NS_NULLPRINCIPAL_CONTRACTID. r=bholley
This fixed the locations listed by
http://searchfox.org/mozilla-central/search?q=NS_NULLPRINCIPAL_CONTRACTID&redirect=true
2016-04-27 18:38:03 +08:00
Mike Hommey fed1d8ce2b Bug 1254906 - Change the annotation on JSPrincipals::dump's definition to match that of its declaration. r=bz
The current discrepancy works because gecko and js don't actually agree
on the meaning of JS_EXPORT_API and JS_PUBLIC_API, but moving the
configure flags that incluences their meaning is going to make them
agree, and that adds a fatal warning when building nsJSPrincipals.cpp
because of the discrepancy.
2016-03-11 09:38:28 +09:00
Bill McCloskey d70c91802b Bug 1210099 - Fix structured clone of expanded principal (r=bholley) 2016-02-04 22:30:21 -08:00
Yoshi Huang 4b500464f5 Bug 1209162 - Create OriginAttributes subtypes. IGNORE IDL r=sicking. 2015-11-03 09:50:54 +08:00
Nick Fitzgerald ee543a3018 Bug 1209263 - Allow embedders to tell SpiderMonkey how to structured clone principals; r=bz
--HG--
extra : rebase_source : 04835c034431953344e83203e7753043461474ba
2015-10-02 16:44:00 +02:00
Andrew McCreight f4abeb8aba Bug 886459, part 1 - Remove unused includes of nsIJSRuntimeService.h. r=bholley 2015-06-26 18:44:13 -07:00
Bobby Holley 6882fa756b Bug 1164292 - Re-implement dumpImpl in terms of GetScriptLocation. r=gabor
The existing setup adds a lot of complication and not a lot of value.
2015-05-15 11:51:48 -07:00
Bobby Holley 46b43e4f8b Bug 1164292 - Hoist refcounting into nsJSPrincipals. r=gabor
This is a special-snowflake reference counting system that's tied to
JSPrincipals, so it makes sense to consolidate this on nsJSPrincipals.
2015-05-15 11:51:47 -07:00
Birunthan Mohanathas a4ac396211 Bug 1038535 - Flatten caps/{idl,include,src}/ directories. r=bholley,gps
--HG--
rename : caps/src/DomainPolicy.cpp => caps/DomainPolicy.cpp
rename : caps/include/DomainPolicy.h => caps/DomainPolicy.h
rename : caps/idl/nsIDomainPolicy.idl => caps/nsIDomainPolicy.idl
rename : caps/idl/nsIPrincipal.idl => caps/nsIPrincipal.idl
rename : caps/idl/nsIScriptSecurityManager.idl => caps/nsIScriptSecurityManager.idl
rename : caps/src/nsJSPrincipals.cpp => caps/nsJSPrincipals.cpp
rename : caps/include/nsJSPrincipals.h => caps/nsJSPrincipals.h
rename : caps/src/nsNullPrincipal.cpp => caps/nsNullPrincipal.cpp
rename : caps/include/nsNullPrincipal.h => caps/nsNullPrincipal.h
rename : caps/src/nsNullPrincipalURI.cpp => caps/nsNullPrincipalURI.cpp
rename : caps/src/nsNullPrincipalURI.h => caps/nsNullPrincipalURI.h
rename : caps/src/nsPrincipal.cpp => caps/nsPrincipal.cpp
rename : caps/include/nsPrincipal.h => caps/nsPrincipal.h
rename : caps/src/nsScriptSecurityManager.cpp => caps/nsScriptSecurityManager.cpp
rename : caps/include/nsScriptSecurityManager.h => caps/nsScriptSecurityManager.h
rename : caps/src/nsSystemPrincipal.cpp => caps/nsSystemPrincipal.cpp
rename : caps/include/nsSystemPrincipal.h => caps/nsSystemPrincipal.h
2014-07-15 11:12:59 -07:00