Commit Graph

864 Commits

Author SHA1 Message Date
Ehsan Akhgari
33bb32f549 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Boris Zbarsky
a7e90a1fb6 Bug 1144991 another followup, to fix the stupid compile issue. r=must-reopen-the-CLOSED TREE 2015-03-19 21:16:22 -04:00
Boris Zbarsky
187760528a Bug 1144991 followup. Allow the hidden window to link to chrome things even though most resource:// URIs can't. r=bholley and I sneer upon the CLOSED TREE. 2015-03-19 21:04:25 -04:00
Boris Zbarsky
e1b73659e7 Bug 1144991 - Be a bit more restrictive about when a URI_IS_UI_RESOURCE source is allowed to link to a URI_IS_UI_RESOURCE URI that doesn't have the same scheme. r=bholley, a=me 2015-03-19 18:58:44 -04:00
Daniel Holbert
e6bc5f2f98 Bug 1132743 followup: hook up nsPrincipal.cpp's "gCodeBasePrincipalSupport" in new InitializeStatics method, instead of lazily. implicit rs=dbaron CLOSED TREE 2015-03-13 13:16:01 -07:00
Daniel Holbert
a744b5ed4a Bug 1132743: Only allow CSS Unprefixing Service to be activated for hosts on a small, hardcoded whitelist. r=dbaron f=bz 2015-03-13 13:15:09 -07:00
Wes Kocher
9e72506946 Backed out 2 changesets (bug 1132743) for asan mochitest-e10s-1 bustage CLOSED TREE
Backed out changeset 4e00f10f5a2d (bug 1132743)
Backed out changeset 720842726906 (bug 1132743)
2015-03-13 15:16:33 -07:00
Daniel Holbert
b4c044b689 Bug 1132743 followup: hook up nsPrincipal.cpp's "gCodeBasePrincipalSupport" in new InitializeStatics method, instead of lazily. implicit rs=dbaron 2015-03-13 13:16:01 -07:00
Daniel Holbert
1a09175bb0 Bug 1132743: Only allow CSS Unprefixing Service to be activated for hosts on a small, hardcoded whitelist. r=dbaron f=bz 2015-03-13 13:15:09 -07:00
Jonathan Griffin
84011a87cc Bug 1116187 - Disable failing mochitest-chrome tests for B2G, r=gbrown 2015-02-06 16:30:37 -08:00
Blake Kaplan
a93118acc0 Bug 1087646 - Properly serialize nullprincipal URIs across IPC. r=bzbarsky 2015-02-24 12:54:40 -08:00
Andrew McCreight
c7493aa7d7 Bug 1123854 - Remove some out of memory checks in caps/. r=jst 2015-01-30 10:59:49 -08:00
Phil Ringnalda
1659198e81 Bug 1067022 - Annotate the expected 5 "bad inline size" assertions on 10.10 in test_bug995943.xul, r=dbaron
--HG--
extra : rebase_source : 4cda7e6863fd6daad5de642be9ace6a0f04c8e54
2015-01-18 12:53:13 -08:00
Ehsan Akhgari
4b86af6cdf Bug 1119268 - Mark virtual overridden functions as MOZ_OVERRIDE in misc code; r=bsmedberg 2015-01-12 23:26:30 -05:00
Wes Kocher
668a2602fa Backout c034dba7a417 2015-01-12 14:46:48 -08:00
Ehsan Akhgari
17d01d5a3a Bug 1119268 - Mark virtual overridden functions as MOZ_OVERRIDE in misc code; r=bsmedberg 2015-01-12 16:35:06 -05:00
Christoph Kerschbaumer
2bf6dc6f4c Bug 1110615 - Fix inheriting problem for blobs (r=sicking) 2014-12-12 09:03:47 -08:00
Phil Ringnalda
9c4b09285b Backed out 15 changesets (bug 1087442)
Backed out changeset 3f4166fb5e37 (bug 1087442)
Backed out changeset 0c9c9123a0a9 (bug 1087442)
Backed out changeset 1d85d298042d (bug 1087442)
Backed out changeset 51f3ce397d68 (bug 1087442)
Backed out changeset f3b81a623692 (bug 1087442)
Backed out changeset 472e8fa74596 (bug 1087442)
Backed out changeset 12f97df7b79c (bug 1087442)
Backed out changeset 253cde88d3c5 (bug 1087442)
Backed out changeset b44f9ebd56cb (bug 1087442)
Backed out changeset 48e412887726 (bug 1087442)
Backed out changeset a2c76343f7a9 (bug 1087442)
Backed out changeset 0b5b07cfef0e (bug 1087442)
Backed out changeset 2931c35342a4 (bug 1087442)
Backed out changeset 681ce9dcad64 (bug 1087442)
Backed out changeset 47c505856954 (bug 1087442)
2014-12-11 21:58:21 -08:00
Christoph Kerschbaumer
bd2f3f2a04 Bug 1087442 - Attach LoadInfo inside each individual ProtocolHandler - securitymanager changes (r=sicking) 2014-12-11 20:47:55 -08:00
Chris Peterson
d3acb03f9f Bug 1107814 - Part 1: Mark more directories as FAIL_ON_WARNINGS for all compilers. r=gps 2014-12-04 16:24:03 -08:00
Christoph Kerschbaumer
46f1613e6e Bug 1083422 - Add triggering Principal to nsILoadInfo - update consumers (r=bz) 2014-11-14 08:57:26 -08:00
Andrea Marchesini
d0c8bae721 Bug 1094257 - nsPrincipal::GetBaseDomain() should not use TLD if the protocol handler of the URI scheme has NORELATIVE flag, r=bz 2014-11-11 09:10:56 +00:00
Bobby Holley
18015b4ea7 Bug 1088617 - Remove nsIScriptSecurityManager::CheckSameOrigin. r=me 2014-10-29 09:21:18 +01:00
Bobby Holley
e9d7935b3b Bug 1088617 - Handle nsIURIWithPrincipal in nsPrincipal::CheckMayLoad. r=bz
This mimics the logic already inside nsNullPrincipal::CheckMayLoad.
2014-10-29 09:21:17 +01:00
Tom Schuster
0db58380c0 Bug 1069694 - Remove OldDebugAPI from the browser. r=shu 2014-10-12 19:37:41 +02:00
Bob Owen
85b74eed3f Bug 1054646 - Part 1: Change nsNullPrincipal::CheckMayLoad to always allow loads when the principal of the URI in the principal doing the load. r=bz 2014-09-30 09:09:36 +01:00
Bobby Holley
11284c461e Bug 1066718 - Get sIOService before invoking ReadPrefs. r=bz 2014-09-16 21:30:32 +02:00
Shu-yu Guo
320f4e1440 Bug 1001090 - Part 5: Fix errors in tests throughout the tree. (r=robcee,gavin) 2014-09-15 16:30:47 -07:00
Bobby Holley
eaf584fab7 Bug 1008481 - Re-enable failing test. r=me 2014-09-13 13:13:23 -07:00
Bobby Holley
2f3a9fe106 Bug 1008481 - Switch to the root dir instead of the profile dir. r=me 2014-09-13 13:13:22 -07:00
Bobby Holley
8bcf08f5db Bug 1008481 - Add an expected assertion. r=me 2014-09-13 13:13:22 -07:00
Ryan VanderMeulen
f3f65e7788 Bug 1008481 - Really disable the test on only opt.
--HG--
extra : rebase_source : 93237cb46d90ef61228150be0c4a24ddf9f46ea2
2014-09-10 16:23:40 -04:00
Ryan VanderMeulen
f7ae68c334 Bug 1008481 - Skip test_bug995943.xul on OSX opt for failing ~80% of the time. 2014-09-10 14:27:02 -04:00
Bobby Holley
165534d10e Bug 1008481 - Request complete log for intermittently-failing test. r=me 2014-09-09 21:52:31 -07:00
Bobby Holley
d7432ae087 Bug 1053725 - When one domain is whitelisted for file:// URI access, whitelist all subdomains. r=bz 2014-09-08 22:22:22 -07:00
Bobby Holley
475844d0c8 Bug 1061136 - Followup bugfix. r=bz 2014-09-08 22:22:21 -07:00
Bobby Holley
aa212534ea Bug 1061136 - Assume both http:// and https:// for schemeless URIs in CAPS prefs. r=bz 2014-09-05 20:01:06 -07:00
Christoph Kerschbaumer
42b948f5dd Bug 1062529 - Split GetChannelPrincipal into GetChannelResultPrincipal and GetChannelURIPrincipal. r=bz 2014-08-06 16:05:40 -07:00
Ehsan Akhgari
c9c7983580 Bug 1060989 - Fix more bad implicit constructors in caps; r=bsmedberg
--HG--
extra : rebase_source : 5045340f3d9f8d9a2c50359fd0b3a75ec223eab1
2014-09-02 18:20:14 -04:00
Fabrice Desré
172043d717 Bug 1011738 - Theme support for b2g/gaia, Part 4 : security checks r=bent,bz 2014-08-28 17:20:27 -07:00
Trevor Saunders
86b7aff8fc bug 1047696 - mark a number of classes MOZ_FINAL to get compilers to devirtualize more r=froydnj 2014-08-05 13:33:55 -04:00
Bobby Holley
7c7704aa07 Bug 1052052 - Hoist Auto*JSContext into nsContentUtils and kill nsCxPusher.{cpp,h}. r=gabor 2014-08-14 18:47:15 -07:00
Ryan VanderMeulen
7c3098f03b Backed out changesets 5b1a3161f614, 17a9673ed782, and a9b8c346d295 (bug 1052052) for B2G non-unified bustage. 2014-08-14 17:23:10 -04:00
Bobby Holley
e5da39b71b Bug 1052052 - Hoist Auto*JSContext into nsContentUtils and kill nsCxPusher.{cpp,h}. r=gabor 2014-08-14 12:54:34 -07:00
Sid Stamm
0019b6c74f Bug 994872 - Remove documentPrincipal from nsIContentSecurityPolicy::SetRequestContext. (r=ckerschb) 2014-07-30 14:37:22 -07:00
Bobby Holley
db4d34fea1 Bug 1022229 - Borrow App ID and mozBrowser-ness when creating sandbox null principals. r=bz 2014-07-29 08:47:52 -07:00
Bobby Holley
c790f5fdd7 Bug 1022229 - Let Null Principals have App IDs and mozBrowser status. r=bz 2014-07-29 08:47:52 -07:00
Bobby Holley
2639095ad8 Bug 1022229 - Hoist GetAppStatus into a static method on nsScriptSecurityManager. r=bz 2014-07-29 08:47:52 -07:00
Ryan VanderMeulen
44b07425f4 Backed out 5 changesets (bug 1022229) for non-unified bustage.
Backed out changeset d79b991a8d96 (bug 1022229)
Backed out changeset 34f9a0e7dbde (bug 1022229)
Backed out changeset 37fbaf69c6e0 (bug 1022229)
Backed out changeset d6111b0603f5 (bug 1022229)
Backed out changeset 154922edf5fe (bug 1022229)
2014-07-28 15:08:51 -04:00
Bobby Holley
ca470396ca Bug 1022229 - Followup bustage fix. r=me CLOSED TREE 2014-07-28 11:26:41 -07:00
Bobby Holley
02fc5ad201 Bug 1022229 - Borrow App ID and mozBrowser-ness when creating sandbox null principals. r=bz 2014-07-28 10:37:54 -07:00
Bobby Holley
292b9f0011 Bug 1022229 - Let Null Principals have App IDs and mozBrowser status. r=bz 2014-07-28 10:37:54 -07:00
Bobby Holley
089d9a4f7f Bug 1022229 - Hoist GetAppStatus into a static method on nsScriptSecurityManager. r=bz 2014-07-28 10:37:54 -07:00
Mike Hommey
d10b15b035 Bug 1041860 - Avoid setting FINAL_LIBRARY to libraries that further use a FINAL_LIBRARY. r=mshal 2014-07-23 08:37:51 +09:00
Steve Fink
723f09580a Bug 1035395, r=bholley,smaug
--HG--
extra : rebase_source : 478200a62a5073177ae3c782e252fa9a804e5b01
2014-07-18 09:37:42 -07:00
Birunthan Mohanathas
3535643a78 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
Boris Zbarsky
b3d20bffbc Bug 965413 part 4. Teach the security manager about nsILoadInfo. r=smaug 2014-07-10 02:56:36 -04:00
Chris Peterson
efdb483353 Bug 1032644 - Fix some -Wunused warnings in non-unified OS X build. r=ehsan 2014-07-02 18:55:19 -07:00
Benoit Jacob
5959ada792 Bug 1028588 - Fix dangerous public destructors in miscellaneous places - r=ehsan 2014-06-23 18:40:03 -04:00
Bobby Holley
a08069015a Bug 1008481 - Even more debugging output. r=me DONTBUILD 2014-06-10 21:44:32 -07:00
Jonathan Watt
f3921075af Bug 1022667, part 1 - Remove IDToString from nsScriptSecurityManager.cpp. r=Ms2ger 2014-06-10 16:42:20 +01:00
Ms2ger
16c9273f30 Bug 1018103 - Remove support for the "JavaScript-global-static-nameset" category; r=bholley
The only in-tree consumer was removed in bug 1012320; the addons MXR and a web
search suggest that it is unused outside the tree as well.
2014-06-06 10:06:26 +02:00
Bobby Holley
637fbfabf8 Bug 1008481 - More test diagnostics. r=me 2014-06-05 23:41:35 -07:00
Bill McCloskey
d765144f56 Bug 1017310 - Rename *XBLScope to *ContentXBLScope in xpconnect (r=bholley) 2014-06-02 18:04:21 -07:00
Ms2ger
2e33242a04 Bug 1012320 - Move the code that defines window.netscape into nsGlobalWindow and simplify it; r=bholley 2014-05-30 09:36:52 +02:00
Bobby Holley
6c26fcf080 Bug 1008481 - Try disabling https test to stop mysterious orange. r=me 2014-05-23 15:28:03 -07:00
Julien Levesy
d0eca42a80 Bug 1006692 - Replaced nsScriptSecurityManager::SubjectIsPrivileged and AccessCheck::IsCallerChrome by nsContentUtils::IsCallerChrome. r=bholley 2014-05-19 13:39:00 +02:00
Birunthan Mohanathas
411a8639b4 Bug 869836 - Part 3: Use Append('c') instead of AppendLiteral("c"). r=ehsan 2014-05-22 06:48:51 +03:00
Nathan Froyd
380d6fe3d9 Bug 1012748 - part 3 - remove nsIXPCSecurityManager; r=bholley 2014-05-19 12:59:30 -04:00
Jonathan Watt
3cf8ef7d61 Bug 1011024 - Fix nsScriptSecurityManager::GetChannelPrincipal so that it doesn't fail to get the correct nsIPrincipal for some resource documents. r=bz 2014-05-16 23:59:36 +01:00
Nick Lebedev
b7223435b4 Bug 998002 - Rename nsContentUtils::Get{Subject,Object}Principal to nsContentUtils::{Subject,Object}Principal. r=bholley 2014-05-13 11:58:00 +02:00
Bobby Holley
3df7aa0849 Bug 995943 - Allow access to file:// URIs from pref-whitelisted sites. r=bz 2014-05-09 09:59:22 -07:00
Bobby Holley
5f5d55c89c Bug 995943 - Clean up some silly stuff surrounding prefs in CAPS. r=bz 2014-05-09 09:59:22 -07:00
Carsten "Tomcat" Book
6681a8aa46 Backed out changeset 9899ea7e3a32 (bug 995943) for m-other test failures 2014-05-09 09:14:37 +02:00
Carsten "Tomcat" Book
3cc2daffd2 Backed out changeset 96dbf1ff169c (bug 995943) 2014-05-09 09:13:49 +02:00
Bobby Holley
bde8b71261 Bug 995943 - Allow access to file:// URIs from pref-whitelisted sites. r=bz 2014-05-08 22:19:11 -07:00
Bobby Holley
c209bdc9f6 Bug 995943 - Clean up some silly stuff surrounding prefs in CAPS. r=bz 2014-05-08 22:19:10 -07:00
Bobby Holley
648f667734 Bug 1001198 - Explicitly fire up the SSM from nsXPConnect. r=gabor 2014-05-06 23:17:43 -07:00
Bobby Holley
c50411e058 Bug 997987 - Cache the system principal on nsContentUtils and remove nsIScriptSecurityManager::SubjectPrincipalIsSystem. r=Ms2ger,sr=bz 2014-05-06 15:43:03 -07:00
Bobby Holley
be684ee7b4 Bug 997987 - Remove nsIScriptSecurityManager::GetSubjectPrincipal. r=Ms2ger 2014-05-06 15:43:03 -07:00
Bobby Holley
5c9d904093 Bug 997987 - Remove usage of nsIScriptSecurityManager::GetSubjectPrincipal. r=Ms2ger 2014-05-06 15:43:03 -07:00
Bobby Holley
0f2e4665cd Bug 997987 - Remove nsIScriptSecurityManager::GetCxSubjectPrincipal. r=Ms2ger 2014-05-06 15:43:02 -07:00
Jon Coppeard
bed7fc43d9 Bug 959787 - Handlify remaining JS APIs r=terrence r=bz r=bholley 2014-04-30 10:10:33 +01:00
Birunthan Mohanathas
ff8ce9bd42 Bug 900908 - Part 3: Change uses of numbered macros in nsIClassInfoImpl.h/nsISupportsImpl.h to the variadic variants. r=froydnj 2014-04-27 03:06:00 -04:00
Arpad Borsos
e19fb46166 Bug 474369 - remove nsVoidArray includes; r=ehsan
--HG--
extra : rebase_source : dd3abeb623fd8b784fd6ba639c88def84a4daf58
2014-04-26 16:12:45 +02:00
Andrew McCreight
3c2c09c71b Bug 998779 - Remove unused #includes of nsHashtable.h. r=froydnj 2014-04-21 09:41:58 -07:00
Bobby Holley
65765653a9 Bug 998083 - Introduce Cu.getObjectPrincipal and kill nsIScriptSecurityManager::GetObjectPrincipal. r=gabor 2014-04-19 10:39:59 -07:00
Bob Owen
759e2cffe1 Bug 986439 - Don't use nsNullPrincipalURI for referrer. r=bz 2014-03-29 19:10:27 +00:00
Neil Rashbrook
1373d6ff37 Bug 948901 FTP directory listings need to support the Character Encoding menu r=mayhemer,michal 2014-03-28 08:32:56 +00:00
Ehsan Akhgari
5b9f45a1a5 Bug 798158 - Part 1: Use a pointer-sized type to store refcounts internally; r=bsmedberg 2014-03-27 16:38:33 -04:00
Kyle Huey
7067fb5db1 Bug 345123: Remove nsGetterAddRefs<T>'s operator nsISupports**. r=bsmedberg 2014-03-15 12:00:17 -07:00
Bill McCloskey
aa5f40a77e Bug 982828 - [e10s] Disable mochitest-plain tests that don't pass in e10s (r=ted) 2014-03-13 21:38:19 -07:00
Wes Kocher
a3277d291d Backed out changeset 88425ad0f06a (bug 982828) for introducing various mochitest-5 failures on a CLOSED TREE
* * *
Backed out changeset 94f9ebdc6662 (bug 982828)
2014-03-13 19:41:21 -07:00
Bill McCloskey
f4f6bf8e4d Bug 982828 - [e10s] Disable mochitest-plain tests that don't pass in e10s (r=ted) 2014-03-13 15:41:41 -07:00
Bill McCloskey
7193069fa0 Backed out changeset d6261f65070a 2014-03-13 15:52:27 -07:00
Bill McCloskey
69a746922b Bug 982828 - [e10s] Disable mochitest-plain tests that don't pass in e10s (r=ted) 2014-03-13 15:41:41 -07:00
Vaibhav Agarwal
9a59a5c96d Bug 971132 - B2G mochitests should use the new manifest format; r=jmaher 2014-03-06 13:42:43 -05:00
Luke Wagner
4c59cb92eb Bug 976348 - Change DescribeScriptedCaller to not return a JSScript (r=bholley)
--HG--
extra : rebase_source : 58387ce3e4c49d3140b92b84bf3577fc6584820e
2014-02-25 09:43:14 -06:00
Bobby Holley
cdcd6fceee Bug 956382 - Remove implementations of *IgnoringDomain variants. r=mrbkap 2014-02-13 18:57:36 -08:00
Bobby Holley
5d2a9f9315 Bug 956382 - Remove unused CAPS gunk. r=mrbkap 2014-02-13 18:57:36 -08:00
Bobby Holley
5843049c40 Bug 956382 - Hoist nsScriptSecurityManager::CheckSameOriginPrincipal into nsPrincipal::EqualsConsideringDomain. r=mrbkap 2014-02-13 18:57:36 -08:00
Bobby Holley
38d61639fb Bug 956382 - Ignore document.domain by default. r=mrbkap 2014-02-13 18:57:36 -08:00
Bobby Holley
6771e71f15 Bug 956382 - Introduce an explicit API to do principal checks with document.domain. r=mrbkap 2014-02-13 18:57:34 -08:00
Bobby Holley
b73c1d8a7d Bug 972478 - Docshell scriptability should only affect non-immune principals. r=bz 2014-02-13 15:40:50 -08:00
Sid Stamm
53b4c0d99c Bug 911547 - make nsIContentSecurityPolicy serializable and trigger read/write from nsPrincipal. r=jst,grobinson
--HG--
extra : rebase_source : 3e1846e15538729f3c94f5c1470959b5d7b31f0f
2014-01-23 15:34:59 -08:00
Bobby Holley
8356b2d621 Bug 957688 - Remove nsIXPCSecurityManager::CanAccess and nsScriptSecurityManager::CheckPropertyAccessImpl. r=mrbkap
\o/
2014-01-24 16:08:26 -08:00
Bobby Holley
d2ed53a852 Bug 957688 - Remove nsIScriptSecurityManager::CheckPropertyAccess. r=mrbkap 2014-01-24 16:08:26 -08:00
Bobby Holley
844ed9971d Bug 957688 - Remove checkObjectAccess security callback. r=mrbkap
There's no need for the JS shell stuff either, since vm/Runtime.cpp already
sets up NullSecurityCallbacks by default.
2014-01-24 16:08:25 -08:00
Terrence Cole
10295353cd Bug 959787 - Handlify several JSAPI interfaces that can GC, Part 4; r=sfink,r=bz
--HG--
extra : rebase_source : 8e1ff566f47795cd82e3f4c0a6fa37b88e7847b4
2014-01-17 10:08:51 -08:00
Bobby Holley
8dd5c7b67e Bug 794943 - Remove CheckXPCPermissions. r=mrbkap 2014-01-16 15:45:40 -08:00
Bobby Holley
7916a3dc96 Bug 794943 - Remove nsISecurityCheckedComponent interface. r=mrbkap 2014-01-16 15:45:40 -08:00
Bobby Holley
4eeb054e6e Bug 794943 - Remove checks for nsISecurityCheckedComponent in caps. r=mrbkap 2014-01-16 15:45:40 -08:00
Tom Schuster
e64b35e141 Bug 939294 - Change xpidl jsval to handles. r=gabor,bz,khuey,bsmedberg,terrence 2014-01-09 18:39:36 +01:00
Garrett Robinson
3ceb749a52 Bug 883975 - CSP 1.1 hash-source. r=sstamm, r=dholbert, r=mrbkap 2014-01-02 11:14:06 -08:00
Christian Legnitto
aeb2c9d4da Bug 935377 - Firefox should fix common scheme typos, r=dolske 2014-01-12 12:02:27 -08:00
Ryan VanderMeulen
f427c884c8 Backed out 6 changesets (bug 939294) for B2G bustage on a CLOSED TREE.
Backed out changeset 8c3aa9973da0 (bug 939294)
Backed out changeset 37098c13e59e (bug 939294)
Backed out changeset 7c9ade6c871c (bug 939294)
Backed out changeset fed59539afc1 (bug 939294)
Backed out changeset 89e9d3fa16fc (bug 939294)
Backed out changeset c97e58ebc5f4 (bug 939294)
2014-01-09 14:17:39 -05:00
Tom Schuster
af21b5b94c Bug 939294 - Handlify all the rest. r=terrence 2014-01-09 18:39:37 +01:00
Gabor Krizsanits
2d18c11e26 Bug 952192 - getObjectPrincipal should be script callable. r=bholley 2014-01-09 15:28:46 +01:00
Carsten "Tomcat" Book
fc7c23e4aa Backed out changeset 18eeafedd180 (bug 952192) XPC Shell Bustage on a CLOSED TREE 2014-01-09 12:53:22 +01:00
Gabor Krizsanits
db12b3ec81 Bug 952192 - getObjectPrincipal should be script callable. r=bholley 2014-01-09 11:31:33 +01:00
Ehsan Akhgari
ebd358dfd7 Bug 927728 - Part 1: Replace PRUnichar with char16_t; r=roc
This patch was automatically generated by the following script:

#!/bin/bash
# Command to convert PRUnichar to char16_t

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*modules/libmar*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name prtypes.h \
       ! -name Char16.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert PRUnichar char16_t
2014-01-04 10:02:17 -05:00
Luke Wagner
7db5895601 Bug 924905 - Do a subsumes check inside the stack iterator. r=jandem
--HG--
extra : rebase_source : ff8407c4f79fd3e2264470379470c526a751e45f
2014-01-03 10:32:56 -06:00
Trevor Saunders
907dfc4528 bug 949821 - use MOZ_UTF16 more and NS_LITERAL_STRING less r=froydnj 2013-12-12 20:50:01 -05:00
Bobby Holley
913b0c0c51 Bug 913734 - Remove namespace mozilla::hotness. r=mrbkap 2013-12-13 19:15:44 -08:00
Bobby Holley
32bf54415f Bug 913734 - Remove EnabledID() machinery. r=mrbkap 2013-12-13 19:15:44 -08:00
Bobby Holley
991513f6f4 Bug 913734 - Remove now-unused policy machinery. r=mrbkap 2013-12-13 19:15:43 -08:00
Bobby Holley
9610d07a33 Bug 913734 - Stop consulting domain policies in CAPS. r=mrbkap
The whole LookupPolicy juggernaut is basically a mechanism for setting custom
per-(protocol, origin, property, action) access control in the preferences
service.

There are two sets of preferences currently in all.js. One of them is set up
for mailnews, for the mailbox:, imap:, and news: protocols. According to jst,
this was designed as a whack-a-mole security mechanism for javascript running
in HTML email. IIUC, we no longer allow JS to run at all in mailnews, so this
is obsolete.

The other mechanism appears to be our old-fashioned implementation of the
same-origin policy, which has been obsoleted by the new compartment
architecture.

In addition, most of this stuff was obsoleted by the new dom bindings, since
these DOM classes no longer go through XPCWrappedNativeJSOps, and thus no
longer trigger these security checks at all.

We stop using the infrastructure in this patch, and rip it out in the next one.
2013-12-13 19:15:43 -08:00
Bobby Holley
6dba8699cf Bug 913734 - Stop storing security policies on XPCWrappedNativeProtos. r=mrbkap
This is just a cache, so we can safely remove it without impacting correctness.
The rest of this mechanism goes away in subsequent patches.
2013-12-13 19:15:43 -08:00
Birunthan Mohanathas
759ab69b0a Bug 713082 - Part 2: Rename Util.h to ArrayUtils.h. r=Waldo
--HG--
rename : mfbt/Util.h => mfbt/ArrayUtils.h
2013-12-08 21:52:54 -05:00
Bobby Holley
acb9e755bd Bug 932906 - Exempt Remote XUL from CanCreateWrapper checks. r=bz 2013-12-04 19:15:40 -08:00
Joshua Cranmer
1547e555fb Bug 884676 - Convert JSPrincipals::refcount to Atomic<int32_t> in JS_THREADSAFE builds, and remove JS_ATOMIC_*. r=Waldo 2013-11-27 09:37:10 -06:00
Deian Stefan
a022cb82af Bug 886164 - Enforce CSP in sandboxed iframe, r=grobinson 2013-11-22 15:12:00 -08:00
Michael Shuen
213cdc560a Bug 941332 - Build caps/src in unified mode. r=ehsan 2013-11-21 09:22:26 -05:00
Mike Hommey
a65383e1e9 Bug 939632 - Remove LIBRARY_NAME for leaf libraries. r=gps
Landing on a CLOSED TREE.
2013-11-19 11:50:54 +09:00
Mike Hommey
8ceb917350 Bug 939074 - Remove most LIBXUL_LIBRARY. rs=gps 2013-11-19 11:48:10 +09:00
Mike Hommey
9fe772e7fd Bug 939044 - Rename remaining MODULE definitions to XPIDL_MODULE. r=mshal 2013-11-19 11:47:43 +09:00
Mike Hommey
bb6779efe3 Bug 939044 - Remove most definitions of MODULE. r=mshal 2013-11-19 11:47:39 +09:00
Mike Hommey
d7b6f95761 Bug 935881 - Use FINAL_LIBRARY for all (fake) libraries that end up linked in a single other library. r=gps 2013-11-19 11:47:14 +09:00
Tom Schuster
f311064c6e Bug 933834 - Rename and handlify JS_ValueToString. r=terrence,bz 2013-11-16 13:31:36 +01:00
Ms2ger
6b38d3ca3d Backout changesets ded0d64f6786:03f041d03f24 and 30cbd1abde1a (bug 935696, bug 933834 and bug 939194) for build bustage. 2013-11-17 16:39:25 +01:00
Tom Schuster
dd485f9336 Bug 933834 - Rename and handlify JS_ValueToString. r=terrence,bz 2013-11-16 13:31:36 +01:00
Bobby Holley
d75a37769c Bug 840488 - Tests. r=bz 2013-11-12 16:43:35 -08:00
Bobby Holley
f298af1bab Bug 840488 - New domain policy API. r=bz
Note that this patch changes the semantics of javascript.enabled so that changes
to the pref do not apply to compartments that have already been created. This is
a significant change, but is necessary to support the new domain policy API.
After one cycle or so, we'll rip out the old API.
2013-11-12 16:43:35 -08:00
Bobby Holley
a80315ff5c Bug 840488 - Compute immunity from caps checks exactly once, and kill nsScriptSecurityManager::CanExecuteScripts. r=bz 2013-11-12 16:43:35 -08:00
Bobby Holley
15add0796f Bug 840488 - Remove per-JSContext script toggling. r=bz
Note that the checks in nsJSEnvironment::EvaluateString and EvalInWindow
can safely go away, because we call ssm->ScriptAllowed() in
nsJSUtils::EvaluateString.
2013-11-12 16:43:35 -08:00
Bobby Holley
70289cf621 Bug 840488 - Directly mark compartments whose docshells disable script execution. r=bz 2013-11-12 16:43:33 -08:00
Bobby Holley
2c448611f5 Bug 840488 - Introduce a mechanism to temporarily or permanently block script for a given scope, and use it for unsafe channels. r=bz 2013-11-12 16:43:33 -08:00
Bobby Holley
12a1ebfea9 Bug 840488 - Remove CheckFunctionAccess. r=bz
\o/

Aside from checking whether script is enabled, all the other work this function
does is silly.
2013-11-12 16:43:32 -08:00
Bobby Holley
48cf35f628 Bug 840488 - Get rid of aAllowIfNoScriptContext. r=bz
The old code seemed to feel that the lack of a script context was some sort of
showdown that required either unconditional allow or deny. Instead, let's just
make the scriptcontext-relevant checks conditional on there being a script
context, which lets us switch CheckFunctionAccess over to ScriptAllowed.
2013-11-12 16:43:32 -08:00
Bobby Holley
6c0f7db3c4 Bug 840488 - Refactor Gecko to provide a more direct API to ask whether script is allowed for a given global. r=bz 2013-11-12 16:43:31 -08:00
Garrett Robinson
fcd3642ac2 Bug 855326 - CSP 1.1 nonce-source for scripts and styles r=mrbkap r=dholbert r=geekboy 2013-11-08 15:44:39 -08:00
Daniel Holbert
a943af2236 backout 57213b64023b (bug 855326) for build bustage in debug builds
CLOSED TREE
2013-11-08 11:22:36 -08:00
Garrett Robinson
99a316d224 Bug 855326 - CSP 1.1 nonce-source for scripts and styles. r=mrbkap r=dholbert r=geekboy 2013-11-08 09:20:43 -08:00
Nicholas Nethercote
ba1e9bce90 Bug 925584 - Remove some unnecessary jsapi.h inclusions from .cpp files. r=Ms2ger.
--HG--
extra : rebase_source : 41fcb0e922a519ef679c1c1b6293c2b638e83a48
2013-10-10 15:22:35 -07:00
Mike Hommey
1d566f7586 Bug 929905 - Consolidate sources in moz.build. r=gps 2013-10-25 08:23:05 +09:00
Carsten "Tomcat" Book
a502a5c19a merge b2g-inbound to mozilla-central 2013-10-09 10:13:52 +02:00
Karl Tomlinson
75f5a8dca9 b=923591 don't warn when checkLoadURIStrWithPrincipal() returns NS_ERROR_DOM_BAD_URI r=bz
--HG--
extra : transplant_source : J%09t%A3Z%B4%8C%B9%99%E0O%CE3%7Ex%93vu%9BA
2013-10-09 15:32:38 +13:00
Fabrice Desré
94d42490f8 Bug 918658 - Don't pretend that mozIApplication inherits from mozIDOMApplication r=bent 2013-10-08 15:52:26 -07:00
Christoph Kerschbaumer
270e0b71c2 Bug 897516 - Implement a separate cookie jar for safebrowsing - cookie separation part. r=mmc 2013-08-19 12:31:24 -07:00
Trevor Saunders
e8f7d269ed bug 920754 - rm more makefiles r=mshal 2013-09-25 16:39:06 -04:00
Gregory Szorc
e53ac5e38d Bug 920223 - Part 1: Mass convert MOCHITEST_FILES to manifests; rs=Ms2ger 2013-09-30 09:51:57 +02:00
Ed Morley
d84dee3273 Backed out changeset 77bff106b704 (bug 920223) 2013-09-30 12:50:12 +01:00
Gregory Szorc
cabc6369a6 Bug 920223 - Part 1: Mass convert MOCHITEST_FILES to manifests; rs=Ms2ger 2013-09-30 09:51:57 +02:00
Ehsan Akhgari
58e5fbc2a4 Backed out changeset a73ffb0d0c97 because of build bustage 2013-09-29 17:20:07 -04:00
Ehsan Akhgari
d9a4b7effd Remove a number of unused variables, no bug 2013-09-29 16:42:12 -04:00
Carsten "Tomcat" Book
edb6c8fc0b Backed out changeset 0cc959e28407 (bug 897516) failed XPC Shell tests CLOSED TREE 2013-09-27 15:45:31 +02:00
Christoph Kerschbaumer
a7fb0134c3 Bug 897516 - Implement a separate cookie jar for safebrowsing - cookie separation part. r=mmc 2013-08-19 12:31:24 -07:00
Ryan VanderMeulen
8af6d7e0b2 Backout bug 886164 for B2G regressions. 2013-09-23 21:26:05 -04:00
Jon Coppeard
8c99b0611f Bug 918373 - GC: Handlify various public APIs r=sfink r=bholley r=smaug 2013-09-20 10:22:59 +01:00
Deian Stefan
ae78755bb7 Bug 886164 - Enforce CSP in sandboxed iframe. r=grobinson 2013-06-23 14:31:52 -07:00
Bobby Holley
103b4d8a51 Bug 917009 - Remove old-style object principal calculation. r=bz 2013-09-17 15:29:11 -07:00
Terrence Cole
244d5541e4 Bug 908750 - Fix a rooting hazard in nsScriptSecurityManger::LookupPolicy; r=bholley
--HG--
extra : rebase_source : 27bf6ef6bce3bed136921df15ea00ae86bd73f89
2013-08-23 08:51:40 -07:00
Cykesiopka
a8ab644dfb Bug 909107 - Replace use of (obsolete) strres.js in test_bug292789.html. r=dveditz 2013-09-12 10:47:55 -04:00
Ryan VanderMeulen
30168b484b Merge fx-team to m-c. 2013-09-11 21:48:20 -04:00
Martijn Wargers
a570d547c2 Bug 914940 - Remove some enablePrivilige calls. r=jgriffin 2013-09-11 10:51:09 +02:00
Dan Gohman
8b7074b6dc Bug 910823 - Constify static js::Class/JSClass instances. r=waldo 2013-09-11 05:49:05 -07:00
Jan Varga
c5d294a60c Bug 785884 - Implement support for temporary storage (aka shared pool). r=ehsan, r=bent
--HG--
rename : caps/tests/mochitest/test_principal_extendedorigin_appid_appstatus.html => caps/tests/mochitest/test_principal_jarprefix_origin_appid_appstatus.html
rename : dom/quota/UsageRunnable.h => dom/quota/UsageInfo.h
2013-09-11 06:18:36 +02:00
Bobby Holley
c0dad206cf Bug 905364 - Stop using the SafeJSContext in nsScriptSecurityManager::Init. r=mrbkap
With this patch, I've confirmed that we instantiate the SafeJSContext much later
in startup, during nsAppStartupNotifier::Observe (which ends up invoking an
XPCWrappedJS). As such, this should solve a number of our startup ordering woes.
2013-09-06 11:35:12 -07:00
Mike Hommey
f1cf3b4238 Bug 912293 - Remove now redundant boilerplate from Makefile.in. r=gps 2013-09-05 09:01:46 +09:00
Bobby Holley
b8f437054d Bug 899367 - Make GetNativeGlobal consumers call GetWindowProxy and rm the former. r=mccr8
Some of the uses of this are a bit nonsensical now, but that's a problem for
another day.
2013-09-04 14:06:57 -07:00
Masatoshi Kimura
e2bd26bb53 Bug 911573 - Mochitest fixup to prepare removing Components-in-content with UniversalXPConnect. r=bholley 2013-09-05 01:02:34 +09:00
Nicholas Nethercote
191ed08f6a Bug 911020 - Introduce js/TypeDecls.h, which holds very commonly used type declarations from the JS engine. r=luke.
--HG--
extra : rebase_source : 008ef689989f93b46627b8be8608bdbc544ca3a2
2013-08-27 19:59:14 -07:00
Nicholas Nethercote
3f5d413d90 Bug 909597 (part 2) - Rename jsdbgapi.{h,cpp} as {js,vm}OldDebugAPI.{h,cpp}. r=luke.
--HG--
rename : js/src/jsdbgapi.h => js/public/OldDebugAPI.h
rename : js/src/jsdbgapi.cpp => js/src/vm/OldDebugAPI.cpp
extra : rebase_source : 9cd65a698e726c43d88d650f40823367bf98feae
2013-08-26 19:05:20 -07:00
Ryan VanderMeulen
2f3de4dea0 Backed out 12 changesets (bug 899367) for Windows and OSX mochitest failures on a CLOSED TREE.
Backed out changeset 46cf4c3eb447 (bug 899367)
Backed out changeset d8a876219fc7 (bug 899367)
Backed out changeset d930333f95a7 (bug 899367)
Backed out changeset efae8cc0fff8 (bug 899367)
Backed out changeset 1dd262d146a6 (bug 899367)
Backed out changeset 4c396b8a51d0 (bug 899367)
Backed out changeset c8c30176639a (bug 899367)
Backed out changeset aaa8fbcf9aaf (bug 899367)
Backed out changeset d1a782044a4b (bug 899367)
Backed out changeset b2672ab55046 (bug 899367)
Backed out changeset fc4deb0b06fa (bug 899367)
Backed out changeset b9f1018a609c (bug 899367)
2013-08-27 21:14:54 -04:00
Bobby Holley
6274710e79 Bug 899367 - Make GetNativeGlobal consumers call GetWindowProxy and rm the former. r=mccr8
Some of the uses of this are a bit nonsensical now, but that's a problem for
another day.
2013-08-27 15:21:40 -07:00
Ms2ger
8bfa279bb1 Merge m-c to inbound 2013-08-22 10:38:48 +02:00
Ms2ger
4922ccbc0a Bug 904831 - Part b: Move unconditional MSVC_ENABLE_PGO definitions into moz.build; r=gps 2013-08-22 08:56:01 +02:00
Ms2ger
2d7391b50d Bug 883284 - Part b: Move LIBXUL_LIBRARY into moz.build (a-c); r=joey 2013-08-22 08:55:59 +02:00
Nicholas Nethercote
42ccf38dcd Bug 905017 (part 1) - Minimize inclusions of JS engine headers in .h and .idl files. r=billm.
--HG--
extra : rebase_source : 984c61ab12f46be0509b1ce0d458d9a6e5841c64
2013-08-17 15:50:18 -07:00
Phil Ringnalda
5ce9f052f8 Back out c39d60483813 (bug 905364) for xpcshell and b2g desktop bustage 2013-08-16 22:38:48 -07:00
Bobby Holley
1079a53da6 Bug 905364 - Stop using the SafeJSContext in nsScriptSecurityManager::Init. r=mrbkap
With this patch, I've confirmed that we instantiate the SafeJSContext much later
in startup, during nsAppStartupNotifier::Observe (which ends up invoking an
XPCWrappedJS). As such, this should solve a number of our startup ordering woes.
2013-08-16 20:28:17 -07:00
Ms2ger
df8525f77d Bug 901323 - Don't include nsContentUtils.h unnecessarily; r=jlebar 2013-08-14 08:56:21 +02:00
Nicholas Nethercote
b756f6b258 Bug 898914 (part 1) - Remove JSBool.
--HG--
extra : rebase_source : 2d202e0e5005a7f54724b1540481c15cde3ad52e
2013-08-08 15:53:04 -07:00
Boris Zbarsky
95be140e8b Bug 897913 part 1. Don't assert that app id exists when asked for app status; just claim not installed if there is no app id. r=sicking 2013-08-07 17:40:00 -04:00
Nicholas Nethercote
25d70fdd97 Bug 902332 - Replace JS_{FALSE,TRUE} with {false,true} almost everywhere. r=luke,bz.
--HG--
extra : rebase_source : 25f4de1bfae830b0af6407d260a70b787ab1dc9b
2013-08-06 23:59:54 -07:00
Nicholas Nethercote
ba723f1034 Bug 901750 - Change return type of |JSNative| from |JSBool| to |bool|. code=nnethercote,jandem. r=luke,bz.
--HG--
extra : rebase_source : 5b3d7cc339af6d93bde078322e25c6e740d1b617
2013-08-02 00:41:57 -07:00
Tom Schuster
0b021a6fa2 Bug 884410 - Handlify JS_GetPrototype. r=terrence 2013-07-31 12:20:33 -04:00
Ehsan Akhgari
5ee21d6d3f Bug 895322 - Part 1: Replace the usages of MOZ_STATIC_ASSERT with C++11 static_assert; r=Waldo
This patch was mostly generated by running the following scripts on the codebase, with some
manual changes made afterwards:

# static_assert.sh
#!/bin/bash
# Command to convert an NSPR integer type to the equivalent standard integer type

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.cc" \
         -o -iname "*.mm" \) | \
    xargs -n 1 `dirname $0`/assert_replacer.py #sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_STATIC_ASSERT static_assert
hg rev --no-backup mfbt/Assertions.h \
                   media/webrtc/signaling/src/sipcc/core/includes/ccapi.h \
                   modules/libmar/src/mar_private.h \
                   modules/libmar/src/mar.h


# assert_replacer.py
#!/usr/bin/python

import sys
import re

pattern = re.compile(r"\bMOZ_STATIC_ASSERT\b")

def replaceInPlace(fname):
  print fname
  f = open(fname, "rw+")
  lines = f.readlines()
  for i in range(0, len(lines)):
    while True:
      index = re.search(pattern, lines[i])
      if index != None:
        index = index.start()
        lines[i] = lines[i][0:index] + "static_assert" + lines[i][index+len("MOZ_STATIC_ASSERT"):]
        for j in range(i + 1, len(lines)):
          if lines[j].find("                 ", index) == index:
            lines[j] = lines[j][0:index] + lines[j][index+4:]
          else:
            break
      else:
        break
  f.seek(0, 0)
  f.truncate()
  f.write("".join(lines))
  f.close()

argc = len(sys.argv)
for i in range(1, argc):
  replaceInPlace(sys.argv[i])

--HG--
extra : rebase_source : 4b4a4047d82f2c205b9fad8d56dfc3f1afc0b045
2013-07-18 13:59:53 -04:00
Ehsan Akhgari
9854ac6166 Bug 872127 - Part 2: Replace mozilla/StandardInteger.h with stdint.h; r=Waldo,ted 2013-07-30 10:25:31 -04:00
Jon Coppeard
8278efd42a Bug 897484 - GC: Convert JS_GetProperty APIs to take MutableHandleValue r=terrence r=bholley r=smaug 2013-07-26 10:00:38 +01:00