Commit Graph

55 Commits

Author SHA1 Message Date
Terrence Cole
31c3a732a8 Bug 787580 - Root all jsval at the API surface; r=sfink sr=dmandelin
--HG--
rename : layout/reftests/text-decoration/underline-select-2-ref.html => layout/reftests/text-decoration/underline-button-1-ref.html
rename : layout/reftests/text-decoration/underline-select-2.html => layout/reftests/text-decoration/underline-button-1.html
extra : rebase_source : 008f2bab76a005947a4c0bd10b6d9ea8531ea6d0
2012-09-04 16:40:12 -07:00
Luke Wagner
b275055a73 Bug 784551 - remove JSSecurityCallbacks::findObjectPrincipals (r=mrbkap)
--HG--
extra : rebase_source : 8043b79eb031e4c3e196f6f693fa6a8a16099ecb
2012-08-23 09:51:09 -07:00
Ehsan Akhgari
0fd9123eac 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
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Jonas Sicking
68ce0e34aa Bug 774585: Rename getCodebasePrincipal to getSimpleCodebasePrincipal since the behavior has semantically changed. r=mounir 2012-07-21 00:29:40 -07:00
Mounir Lamouri
15fad48685 Bug 758258 - part 5 - Add GetAppCodebasePrincipal and GetNoAppCodebasePrincipal to nsIScriptSecurityManager. r=mrbkap sr=sicking 2012-07-19 20:28:08 -07:00
Mounir Lamouri
dede1ee6b1 Bug 758258 - part 4 - Update CreateCodebasePrincipal() to take app/inbrowser info. r=sicking 2012-07-19 15:32:08 -07:00
Mounir Lamouri
69029dd83f 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
9aab06b5f0 Bug 774585: Remove unused argument in nsScriptSecurityManager. r=mrbkap 2012-07-17 22:28:47 -07:00
Bobby Holley
753fcb6e9e Bug 754202 - Remove mContextPrincipal usage from within nsScriptSecurityManager. r=mrbkap 2012-06-28 23:47:55 +02:00
Bobby Holley
471ef74edf 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
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Brian Hackett
c07eaa0e3e Use handles in API object hooks where possible, bug 750733. r=billm 2012-05-19 15:03:45 -07:00
Brian Hackett
9ae1966596 Backed out changeset 5fc7462dd394 for android orange. 2012-05-19 11:52:55 -07:00
Brian Hackett
a863456144 Use handles in API object hooks where possible, bug 750733. r=billm 2012-05-19 09:48:09 -07:00
Bobby Holley
37471e102e Bug 750859 - Remove (most of) SetCanEnableCapability. r=bz 2012-05-02 23:57:34 +02:00
Bobby Holley
61fa812956 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
1a44f1208f Bug 740688 - Use uintptr_t instead of PRUword, and intptr_t instead of PRWord. r=jwalden
--HG--
extra : rebase_source : 648a581323d2c2893df780f71fe34dadcc4bbaab
2012-04-11 17:17:44 -07:00
Igor Bukanov
fbeb82e29f 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
30d3de8268 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
2a602a5685 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
d8e503c38b Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Matheus Kerschbaum
8a21fc0886 Bug 662000 part 2: Remove XPC_IDISPATCH_SUPPORT from the build-system and XPConnect. r=mrbkap
--HG--
extra : rebase_source : c456802fe36eef1e49381be996dbbdf820781206
2011-06-22 11:56:47 -04:00
Masayuki Nakano
6eb7ae79c8 Bug 660770 caps should use mozilla::Preferences r=roc+jst 2011-06-20 12:00:16 +09:00
Luke Wagner
99411cc93d Bug 549143 - fatvals 2010-07-14 23:19:36 -07:00
Dan Witte
1ac90420f6 Bug 564048 - Nix security checks in nsPrefBranch. r=sicking, sr=jst 2010-06-08 16:43:54 -07:00
Peter Van der Beken
3fcb7546e7 Fix for bug 560199 (Link XPConnect and caps into layout). r=jst.
--HG--
extra : rebase_source : 5141822e9d560019ffc1e0cb0264782aa8aa7a99
2010-04-11 15:55:24 +02:00
Sid Stamm
47a3291b46 bug 515443 CSP no-eval support. r=mrbkap,brendan 2010-03-08 00:24:50 -08:00
Jonas Sicking
6f2368d0b0 Bug 543696: Remove unused nsIScriptSecurityManager::CheckConnect. r/sr=mrbkap 2010-02-02 02:29:15 -08:00
Blake Kaplan
79a79a0e55 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
Blake Kaplan
3f98edd6fe Bug 502959 - Restore code to make caps allow wrapping same-origin wrappedjs objects. r=jst sr=bzbarsky 2009-08-06 20:26:33 -07:00
Blake Kaplan
4f88c00c6c Bug 493074 - Compute fewer things to try to clear up a performance regression. r+sr=jst 2009-05-14 15:17:56 -07:00
Blake Kaplan
3bab9bf56c Bug 483672 - Give regular JS objects that have been reflected into C++ a security policy that follows the same-origin model. Also teach caps about "same origin" for these cases. r=jst sr=bzbarsky 2009-05-13 15:01:01 -07:00
Mook
9ad88404f5 Bug 472032 - [win64] sizeof(long) != sizeof(void*) assertion in nsScriptSecurityManager.cpp; changed SecurityLevel to use PRWord, clarified assertion on the protected code; r+sr=dveditz 2009-02-26 18:31:17 +01:00
Dan Mosedale
56f33790dd Remove MailNews special casing from nsScriptSecurityManager (bug 374577), r+sr=bzbarsky 2009-02-17 20:32:57 -08:00
Igor Bukanov
59702db0da Bug 459656 - Implementing nsIThreadJSContextStack in nsXPConnect. r+sr=mrbkap 2008-10-14 16:16:25 +02:00
Arpad Borsos
8b11d938d2 Bug 456388 - Remove PR_STATIC_CALLBACK and PR_CALLBACK(_DECL) from the tree; r+sr=brendan 2008-10-10 17:04:34 +02:00
Ben Newman
fdede899e6 Bug 454850. Make sure that whenever nsPrincipal::Equals would return true for a pair of principals their nsPrincipal::GetHashValue returns are also equal. r+sr=bzbarsky 2008-10-08 09:16:27 -04:00
Arpad Borsos
9b6f558fee Bug 398946 - Remove JS_STATIC_DLL_CALLBACK and JS_DLL_CALLBACK from the tree; r=(benjamin + bent.mozilla) 2008-09-07 00:21:43 +02:00
jonas@sicking.cc
2558cdb12f Followup patch to bug 425201. Make sure to throw if xhr.open is called with an illegal uri. Also restore the nsIScriptSecurityManager.CheckConnect API as soap still uses it 2008-04-18 10:35:55 -07:00
jonas@sicking.cc
9b874a6992 Allow XMLHttpRequest and document.load load files from subdirectories. r/sr=dveditz 2008-04-08 17:38:12 -07:00
jst@mozilla.org
14b80d26bc Landing followup fix for bug 402983 and re-enabling the new stricter file URI security policies. r+sr=bzbarsky@mit.edu 2008-03-22 09:50:47 -07:00
jst@mozilla.org
89acfcbf1a Landing fix for bug 402983. Make security checks on file:// URIs symmetric. Patch by dveditz@cruzio.com, r=jonas@sicking.cc,bzbarsky@mit.edu. jst@mozilla.org 2008-03-20 21:39:08 -07:00
bzbarsky@mit.edu
5383803699 Finally kill off CheckSameOriginPrincipal, fix remaining callers to do the checks they really want to be doing. Fix screw-up in nsPrincipal::Equals if one principal has a cert and the other does not. Bug 418996, r=mrbkap,dveditz, sr=jst 2008-03-18 14:14:49 -07:00
jonas@sicking.cc
65f4571f58 Bug 416534: Clean up cross-site xmlhttprequest security checks. With fixes to tests this time. r/sr=peterv 2008-02-26 19:45:29 -08:00
myk@mozilla.org
b5e898ddd7 backing out fix for bug 416534 as potential cause of mochitest failure 2008-02-26 19:23:36 -08:00
jonas@sicking.cc
84548acb75 Bug 416534: Clean up cross-site xmlhttprequest security checks. r/sr=peterv 2008-02-26 18:17:49 -08:00
jst@mozilla.org
6ecbc04940 Fixing bug 413767. Make caps use faster JS class/parent/private/proto accessors. r=mrbkap@gmail.com, sr=brendan@mozilla.org 2008-01-29 12:51:01 -08:00
benjamin@smedbergs.us
dfc4cee45d Bug 411327 - nsIXPCNativeCallContext should not inherit from nsISupports, r=mrbkap, a=schrep 2008-01-15 07:50:57 -08:00
jst@mozilla.org
17c85fe694 Fixing bug 408009. Make doGetObjectPrincipal() faster. r+sr=bzbarsky@mit.edu, r+a=brendan@mozilla.org 2007-12-12 15:02:25 -08:00