Jon Coppeard
5f0e17f56a
Bug 885310 - 1 Rename JSHandleFoo in the browser r=bz
2013-06-21 14:12:46 +01:00
Bobby Holley
e46615bfec
Bug 884362 - Use AutoJSContext in nsScriptSecurityManager::LoadPolicy. r=bz
...
This cx is just used for rooting etc. As such, we really just want whatever
cx is on the stack, but want a default if the stack-top cx is null (which it
sometimes is, here). And that's exactly what AutoJSContext gives us.
2013-06-20 11:05:32 -07:00
Jon Coppeard
6ac7794926
Bug 884371 - Remove JSMutableHandleXXX from the browser r=bz
2013-06-19 11:32:27 +01:00
Trevor Saunders
f9522d1d32
bug 873622 - remove nsScriptSecurityManager::sXPConnect r=bholley
2013-05-29 19:49:11 -04:00
Boris Zbarsky
41ec301773
Bug 873735 part 1. Fix the more or less mechanical browser rooting hazards. r=terrence
2013-05-20 08:40:06 -04:00
Ehsan Akhgari
9c0f40be9f
Bug 871262 - Fix rooting hazards in the CAPS code; r=till
2013-05-12 15:52:21 -04:00
David Zbarsky
8a2838f566
Bug 867459 - Fix caps rooting hazards r=terrence
2013-05-02 22:02:40 -04:00
Bobby Holley
ff3bf1b100
Bug 865729 - Use sXPConnect directly in caps. r=gabor
...
It's tempting to go through nsContentUtils here, but I'm pretty sure caps is
initialized before nsContentUtils.
2013-04-29 11:16:21 -07:00
matekm
9c0f150108
Bug 784739 - Switch from NULL to nullptr in caps/; r=ehsan
2013-04-02 20:16:25 -04:00
Jan de Mooij
97c93376ae
Bug 833817 part 2 - Remove unused frame argument from GetFunctionObjectPrincipal. r=bholley
2013-01-24 20:39:27 +01:00
Nicholas Nethercote
9cbec4ea66
Bug 826154 - Remove unused field nsScriptSecurityManager::mIsWritingPrefs. r=bz.
2013-01-02 21:47:50 -08:00
Boris Zbarsky
60f6dfd055
Bug 817284. When none of our code is associated with a window in an obvious way, assume that scripts should be allowed to execute for a WebIDL callback. r=bholley
2012-12-06 15:21:18 -05:00
Bobby Holley
47161f9569
Bug 797206 - Remove GetPrincipalAndFrame. r=bz
2012-10-29 15:55:35 +01:00
Mounir Lamouri
49af133f34
Bug 777467 - Update the same-origin policy for principals to include appid/isinbrowserelement. r=bholley
2012-10-24 18:50:25 +01:00
Matt Brubeck
4b3a53c808
Back out fb62d8b9800a (bug 777467) because of debug browser-chrome crashes on a CLOSED TREE
2012-10-22 09:52:35 -07:00
Mounir Lamouri
750b9aa29d
Bug 777467 - Update the same-origin policy for principals to include appid/isinbrowserelement. r=bholley
2012-10-22 16:20:38 +01:00
Bobby Holley
8045f49817
Bug 789224 - Remove CAPS_HACKER debugging instrumentation. r=mrbkap
...
This stuff is super ugly and confusing. I think we're better off without it.
2012-10-22 08:29:56 +02:00
Bobby Holley
2f2a64b5a0
Bug 789224 - Separate certificate principals out from CAPS. r=dveditz
...
There's no longer any reason why "certificate principals" need to be principals at all.
I tried to rip them out entirely, but it looks like they're still used vestigially at XPI
install time to display author information. But there's no reason that they have to be
porkbarreled into the security-critical objects that we pass around all over the place.
So let's make them their own deal.
I was tempted to call them "certificate holders", but that would involve renaming methods and
cause more compat fuss than necessary.
2012-10-22 08:29:56 +02:00
Bobby Holley
e447d2e865
Bug 789224 - Remove principal capability and preference infrastructure. r=mrbkap
2012-10-22 08:29:55 +02:00
Bobby Holley
0881fa53e9
Bug 789224 - Remove capability manager stuff in nsScriptSecurityManager. r=mrbkap
2012-10-22 08:29:55 +02:00
Terrence Cole
4bb6f51dae
Bug 787580 - Root all jsval at the API surface; r=sfink sr=dmandelin
2012-09-04 16:40:12 -07:00
Luke Wagner
bf165e064f
Bug 784551 - remove JSSecurityCallbacks::findObjectPrincipals (r=mrbkap)
2012-08-23 09:51:09 -07:00
Ehsan Akhgari
243c878d26
Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
...
This patch was generated by a script. Here's the source of the script for
future reference:
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 "*.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 PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t
convert PRIntn int
convert PRUintn unsigned
convert PRSize size_t
convert PROffset32 int32_t
convert PROffset64 int64_t
convert PRPtrdiff ptrdiff_t
convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Aryeh Gregor
8b4a23fc4c
Bug 777292 part 2 - Change all nsnull to nullptr
2012-07-30 17:20:58 +03:00
Jonas Sicking
63e0465fc6
Bug 774585: Rename getCodebasePrincipal to getSimpleCodebasePrincipal since the behavior has semantically changed. r=mounir
2012-07-21 00:29:40 -07:00
Mounir Lamouri
fdd58dc358
Bug 758258 - part 5 - Add GetAppCodebasePrincipal and GetNoAppCodebasePrincipal to nsIScriptSecurityManager. r=mrbkap sr=sicking
2012-07-19 20:28:08 -07:00
Mounir Lamouri
5491c3b0d3
Bug 758258 - part 4 - Update CreateCodebasePrincipal() to take app/inbrowser info. r=sicking
2012-07-19 15:32:08 -07:00
Mounir Lamouri
7534c3f5b2
Bug 758258 - part 3 - Add extendedOrigin, appStatus and appId to nsIPrincipal. r=bholley sr=sicking
2012-07-19 22:44:03 -07:00
Jonas Sicking
7284ab89c4
Bug 774585: Remove unused argument in nsScriptSecurityManager. r=mrbkap
2012-07-17 22:28:47 -07:00
Bobby Holley
e9f3d83f1a
Bug 754202 - Remove mContextPrincipal usage from within nsScriptSecurityManager. r=mrbkap
2012-06-28 23:47:55 +02:00
Bobby Holley
2275ac6b17
Bug 754202 - Pull object principals directly off the compartment and assert that behavior doesn't change. r=bz
2012-06-28 23:47:55 +02:00
Gervase Markham
cb6a072c2a
Bug 716478 - update licence to MPL 2.
2012-05-21 12:12:37 +01:00
Brian Hackett
b4c002a912
Use handles in API object hooks where possible, bug 750733. r=billm
2012-05-19 15:03:45 -07:00
Brian Hackett
4f8baecc9e
Backed out changeset 5fc7462dd394 for android orange.
2012-05-19 11:52:55 -07:00
Brian Hackett
b7d2500332
Use handles in API object hooks where possible, bug 750733. r=billm
2012-05-19 09:48:09 -07:00
Bobby Holley
745beebaa4
Bug 750859 - Remove (most of) SetCanEnableCapability. r=bz
2012-05-02 23:57:34 +02:00
Bobby Holley
eb729f7c46
Bug 750859 - Kill the CAPS confirm dialog. r=bz
...
This will break addons using enablePrivilege, but that's going away too. We've been warning for many releases now, so it's time to bite the bullet.
2012-05-02 23:57:34 +02:00
Mark Capella
0ae5c580ff
Bug 740688 - Use uintptr_t instead of PRUword, and intptr_t instead of PRWord. r=jwalden
2012-04-11 17:17:44 -07:00
Igor Bukanov
c7c6b4d07a
bug 730221 - delegating serialization of script principals to the embedding. r=:luke,:bz
...
Currently to serialize principals stored in JSScript we have a rather complex
schema. First there is the transcode callback that the embedding must provide
to transcode principals using XDR API. Second we use rather complex glue code
to implement that callback in terms of writing/reading nsIObjectOutputStream/
nsIObjectInputStream. This glue code is duplicated in 3 places. All this can
be avoided if we simply delegate transcoding of principals to the caller. In
addition, at least in the case of the cached startup scripts we do not even
need to transcode the principals as the the cached scripts always have the
system principal so we can skip all the transcode complexity there.
The patch implemnts this idea. In particular, the code in JS engine
responsible for transcoding of principals is replaced by the single API
function JS_XDRSetPrincipals that the embedding can use to set principals for
decoded scripts and functions. Then the startup cache uses this to set the
principals for the decoded script to the system principals. The other two
places in nsJSContext::Serialize and XBL_SerializeFunction that need to
serialize principals together with a function or script now uses common
utilities in nsXPConnect so the serialization complexity resides in the single
place.
2012-02-13 14:10:04 +01:00
Igor Bukanov
4797d46af3
bug 728250 - remove JSPrincipals::codebase. r=:luke,:bz
...
In just 2 cases where JSPrincipals::codebase is used it can be reconstructed from the values stored in the associated nsJSPrincipal. In addition the patch makes nsJSprincipals to inherit both from nsIPrincipal and JSPrincipals allowing to use static_cast to convert between nsIPrincipal and JSPrincipals pointers and to drop many cases of manual JSPrincipal reference counting.
2012-03-09 10:48:50 +01:00
Ehsan Akhgari
478ad1a412
Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
...
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Michael Wu
0fe7772ece
Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
2011-09-28 23:19:26 -07:00
Matheus Kerschbaum
b785679c11
Bug 662000 part 2: Remove XPC_IDISPATCH_SUPPORT from the build-system and XPConnect. r=mrbkap
2011-06-22 11:56:47 -04:00
Masayuki Nakano
521d4b0187
Bug 660770 caps should use mozilla::Preferences r=roc+jst
2011-06-20 12:00:16 +09:00
Luke Wagner
32541f500f
Bug 549143 - fatvals
2010-07-14 23:19:36 -07:00
Dan Witte
469099104b
Bug 564048 - Nix security checks in nsPrefBranch. r=sicking, sr=jst
2010-06-08 16:43:54 -07:00
Peter Van der Beken
753380fb93
Fix for bug 560199 (Link XPConnect and caps into layout). r=jst.
2010-04-11 15:55:24 +02:00
Sid Stamm
8050d19006
bug 515443 CSP no-eval support. r=mrbkap,brendan
2010-03-08 00:24:50 -08:00
Jonas Sicking
0304916ce4
Bug 543696: Remove unused nsIScriptSecurityManager::CheckConnect. r/sr=mrbkap
2010-02-02 02:29:15 -08:00
Blake Kaplan
f3b6671930
Bug 504021 - Add an API to the script security manager to clamp principals for a given context. r=jst/bzbarsky sr=dveditz
2009-08-21 18:20:20 -07:00