Commit Graph

690 Commits

Author SHA1 Message Date
Trevor Saunders
84b5066ed3 bug 873622 - remove nsScriptSecurityManager::sXPConnect r=bholley 2013-05-29 19:49:11 -04:00
Trevor Saunders
f1e455a13f bug 873622 - speed up nsXPConnect::GetXPConnect() and rename it since it never returns null r=bholley 2013-05-17 01:49:41 -04:00
Ms2ger
1602264ebc Bug 876604 - Outparamdel UnwrapDOMObjectToISupports; r=bz 2013-06-01 08:56:02 +02:00
Mike Shal
6f32ddf61c Bug 864774 - Part 2: Move CPPSRCS to moz.build as CPP_SOURCES; r=joey CLOSED TREE
From 9e0ba7f425143f545eb6c4b26a9a96b5ade4d8e9 Mon Sep 17 00:00:00 2001
2013-04-23 17:54:15 -04:00
Bobby Holley
1b2f22fe61 Bug 868130 - Remove the lion's share of JSAutoRequests in gecko. r=gabor
There are still a handful that either are used with other runtimes, or that
happen very early/late in cx the lifetime of various things where it doesn't
necessarily make sense to have a cx on the stack. This should definitely ensure
that we're not doing double-duty with the nsCxPusher change, though.
2013-05-22 10:05:28 -06:00
Bobby Holley
ba05c93769 Bug 868130 - Include nsCxPusher.h everywhere we need it, and stop including it from nsContentUtils.h. r=gabor 2013-05-22 10:05:26 -06:00
Boris Zbarsky
810766595d Bug 873735 part 2. Change nsIXPConnectJSObjectHolder::GetJSObject to return a JSObject*. r=bholley 2013-05-20 08:44:18 -04:00
Boris Zbarsky
be0882e3a1 Bug 873735 part 1. Fix the more or less mechanical browser rooting hazards. r=terrence 2013-05-20 08:40:06 -04:00
Gregory Szorc
c1b865f669 Bug 873629 - Remove 129 empty Makefile.in files; r=ted 2013-05-17 16:20:11 -07:00
Ted Mielczarek
47d7af59de bug 871712 - make MSVC PGO opt-in per-directory, and opt-in in the directories that matter. r=glandium 2013-05-16 09:33:26 -04:00
Mike de Boer
a6c4485310 Bug 862401: make sure nsDefaultURIFixup::KeywordToURI propagates POST data. sr=bz, r=gavin
--HG--
rename : browser/base/content/test/browser_keywordSearch.js => browser/base/content/test/browser_keywordSearch_postData.js
rename : content/base/test/bug435425.sjs => browser/base/content/test/print_postdata.sjs
2013-05-01 13:04:21 +02:00
Brad Lassey
2e578e707f bug 782581 - r=dveditz 2013-02-01 14:47:04 -05:00
Ed Morley
2710e5d6a9 Backed out changeset 496846474ed3 (bug 864774) 2013-05-13 10:05:49 +01:00
Mike Shal
d2b29f4e87 Bug 864774 - Part 2: Move CPPSRCS to moz.build as CPP_SOURCES; r=joey
From 140b9201e3b5d2d8efe7af286d279c2411dbc197 Mon Sep 17 00:00:00 2001
2013-04-23 17:54:15 -04:00
Ehsan Akhgari
b4be6ea2b3 Bug 871262 - Fix rooting hazards in the CAPS code; r=till 2013-05-12 15:52:21 -04:00
Bobby Holley
0e493adf09 Bug 868633 - Remove JS_GetGlobalObject from caps. r=gabor
This code is an nsDOMClassInfo callback that doesn't care about the cx per se,
and just wants to operate in the scope of the active global of the
nsIScriptContext. We have a more direct way of doing that.
2013-05-07 14:18:03 -07:00
Sankha Narayan Guria
6349c5c599 Bug 867414 - Rename SafeAutoJSContext to AutoSafeJSContext. r=bholley 2013-05-06 09:04:17 -04:00
Bobby Holley
7b10aa2e1c Bug 829872 - Add convenience version of Equals/Subsumes to nsIPrincipal. r=bz 2013-05-03 14:47:09 -07:00
David Zbarsky
2b92e27f70 Bug 867459 - Fix caps rooting hazards r=terrence 2013-05-02 22:02:40 -04:00
Bobby Holley
c44c1b9af8 Bug 865729 - Remove nsIJSContextStack. r=gabor
\o/
2013-04-29 11:16:24 -07:00
Bobby Holley
4afac12af4 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
Bobby Holley
0381cb6196 Bug 865948 - Return the appropriate value when the whitelist checks fail. r=gabor 2013-04-27 16:49:43 -07:00
Xin Zhang
5e389b35b8 Bug 857385 - Make various JSFunctionSpec arrays const. r=waldo
--HG--
extra : rebase_source : 24141998ffad3b0e6bad98b6fc0ce3754e448d5b
2013-04-22 14:15:49 -07:00
Bobby Holley
288399f5c0 Bug 860438 - Straightforward cases. r=gabor 2013-04-18 11:36:03 -04:00
Mike Shal
24b4056720 Bug 846634 - Part 2: Move EXPORTS to moz.build; r=joey 2013-04-16 15:24:43 -04:00
matekm
90c6854f38 Bug 784739 - Switch from NULL to nullptr in caps/; r=ehsan 2013-04-02 20:16:25 -04:00
Kyle Machulis
f5e3aadf0b Bug 855465 - Add emacs python mode comments to moz.build files; r=gps 2013-04-01 11:36:59 -07:00
Kyle Machulis
d2b6e6e01a Backout for changeset 03452b187c14 (Bug 855465) due to bustage on a CLOSED TREE; r=qdot 2013-03-29 15:12:58 -07:00
Kyle Machulis
5663b98bc5 Bug 855465 - Add emacs python mode comments to moz.build files; r=gps
--HG--
extra : rebase_source : 004a756492323e1a049586e85b3be5037159df20
2013-03-29 13:56:18 -07:00
Sid Stamm
525de67a06 Bug 687086 - change nsIContentSecurityPolicy to return two values, shouldBlock and shouldReportViolation. r=bz 2012-10-15 13:54:58 -07:00
Boris Zbarsky
fd85c37022 Bug 848796 part 1. Rename nsXULDocument to mozilla::dom::XULDocument. r=ms2ger
--HG--
rename : content/xul/document/src/nsXULDocument.cpp => content/xul/document/src/XULDocument.cpp
rename : content/xul/document/src/nsXULDocument.h => content/xul/document/src/XULDocument.h
2013-03-26 11:31:53 -04:00
Mike Shal
f290401a73 Bug 852534 - Remove GRE_MODULE from Makefile.in; r=gps 2013-03-21 08:41:00 -07:00
Gregory Szorc
94ec89296d Bug 844654 - Part 3: Remove now empty Makefile.in files; rs=khuey
--HG--
extra : rebase_source : 8de9c7f68a953e574dda22f8c14c2b2ca60444f9
2013-03-19 18:49:07 -07:00
Mike Shal
ea1d9b8ba7 Bug 844654 - Part 2: Move MODULE to moz.build; rs=gps 2013-03-19 11:47:00 -07:00
Trevor Saunders
324dfcc313 bug 852379 - remove unecessary nsHashtable.h includes r=Ms2ger 2013-03-18 21:18:26 -04:00
Jose Cortes
219e54a946 Bug 842186 - Replace jsvals with JS::Values in .cpp and .h files inside the ipc, security, tools, caps, xpfe and startupcache directories. r=jwalden
--HG--
extra : rebase_source : 17f26bc48a8ce01b7349adc178a4e62f7d4b3a5e
2013-03-15 22:22:01 -07:00
Daniel Holbert
0d1377f7a3 Bug 849086: Remove unused *_CLASSNAME defines. r=bsmedberg 2013-03-15 10:52:10 -07:00
Joel Maher
c483aa0d5b Bug 851097 - 2 tests are failing on debug builds in ubuntu VM's on mochitest chrome due to assertion counts. r=dbaron 2013-03-15 13:17:20 -04:00
Gregory Szorc
629b5d86c6 Bug 818246 - Part 4: Move XPIDLSRCS into moz.build (auto); rs=glandium
This is the result of running
|mach mozbuild-migrate --list XPIDLSRCS SDK_XPIDLSRCS XPIDL_SOURCES| and
reverting xpcom/sample/*.
2013-03-12 10:17:46 -07:00
Gregory Szorc
803629b9c6 Merge mozilla-central into build-system
There were merges in configure.in and some Makefile.in. None had any
conflicts. I spot verified the Makefile.in changes and confirmed that
the changes did not touch any DIRS* variables.
2013-02-27 10:03:52 -08:00
Ms2ger
2801c25ab8 Merge m-c to b-s. 2013-02-26 19:09:25 +01:00
Gregory Szorc
2559da553f Bug 784841 - Bug 18f: Convert /caps; f=Ms2ger rs=ted 2013-02-25 12:47:18 -08:00
L. David Baron
05d5d9dfa9 Bug 404077: Use navigator.platform.startsWith rather than navigator.platform.indexOf, at Jesse's suggestion. 2013-02-26 22:23:08 -08:00
Bobby Holley
2589449122 Bug 834732 - Audit callers of GetNativeContext and use AutoPushJSContext where appropriate. r=mrbkap 2013-02-26 11:04:13 -08:00
Bobby Holley
8a84420534 Bug 834732 - Push a cx in nsPrincipal::SetDomain. r=mrbkap 2013-02-26 11:04:12 -08:00
L. David Baron
4f4296979b Bug 404077: Annotate known assertions in mochitests. 2013-02-25 18:39:21 -08:00
Matt Brubeck
8fc8b8e5fe Bug 843387 - Remove unused MOZ_CHROME_FILE_FORMAT_JAR configure variable [r=ted]
--HG--
rename : caps/tests/mochitest/test_bug292789.html.in => caps/tests/mochitest/test_bug292789.html
2013-02-22 16:55:33 -08:00
Trevor Saunders
36453999ea bug 841436 - remove nolonger needed qi from nsIDocShell to nsIDocShellTreeItem r=bz 2013-02-12 17:02:51 -05:00
Bobby Holley
a2d9d906cb Bug 821850 - Let nsExpandedPrincipal through CheckFunctionAccess. r=bz
Otherwise the whole method borks when it discovers that the principal doesn't
have a URI.
2013-02-08 14:24:20 +00:00
Reuben Morais
e901a5609b Bug 793204 - Add remove() API to PermissionSettings. r=sicking 2013-01-26 12:56:23 -05:00
Jan de Mooij
47b9c974fe Bug 833817 part 2 - Remove unused frame argument from GetFunctionObjectPrincipal. r=bholley
--HG--
extra : rebase_source : 1a7e2428c64d806960fa749095b7d0b9ec439c01
2013-01-24 20:39:27 +01:00
Ian Melven
8e2e11cbca Bug 752529 - workers shouldn't use string origins as null principals don't have them. Part 2 - nsPrincipal GetBaseDomain (r=bz) 2013-01-08 13:53:32 -08:00
Ian Melven
6859a69e06 Bug 752529 - workers shouldn't use string origins as null principals don't have them. Part 1 - nsPrincipal IDL changes (r=bz) 2013-01-08 13:53:29 -08:00
Nicholas Nethercote
62a988b8b2 Bug 826154 - Remove unused field nsScriptSecurityManager::mIsWritingPrefs. r=bz.
--HG--
extra : rebase_source : f7235787393fd6b4212aff0bb13e507bb0fd6d94
2013-01-02 21:47:50 -08:00
Ehsan Akhgari
b708151504 Merge mozilla-central into mozilla-inbound 2012-12-06 23:13:32 -05:00
Bobby Holley
9fc78ca98e Bug 807102 - Rev the CID on nsPrincipal. r=bz 2012-12-06 14:51:37 -08:00
Boris Zbarsky
d507ea257e 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
Justin Lebar
2e355efcc0 Bug 802366 - Prelude, part 4: Use and simplify nsScriptSecurityManager::GetDocShellCodebasePrincipal. r=bz 2012-11-10 10:32:36 -08:00
Justin Lebar
a3cc947e7f Bug 802366 - Prelude, part 3: Make some methods on nsIPrincipal infallible, and improve documentation on other methods. r=bz 2012-11-10 10:32:36 -08:00
Ryan VanderMeulen
a9dc8e795f Backed out 12 changesets (bug 806127, bug 802366, bug 806168) for Windows build bustage.
--HG--
rename : dom/indexedDB/test/webapp_clearBrowserData.js => dom/indexedDB/test/test_webapp_clearBrowserData.html
2012-11-09 20:14:40 -05:00
Justin Lebar
fd52978854 Bug 802366 - Prelude, part 4: Use and simplify nsScriptSecurityManager::GetDocShellCodebasePrincipal. r=bz 2012-11-09 16:37:39 -08:00
Justin Lebar
7c72618008 Bug 802366 - Prelude, part 3: Make some methods on nsIPrincipal infallible, and improve documentation on other methods. r=bz 2012-11-09 16:37:38 -08:00
Boris Zbarsky
b01e12f509 Bug 779048 part 1. Implement a parent class for C++ reflections of callback functions in WebIDL. r=bholley,smaug 2012-11-09 07:43:57 -08:00
Justin Lebar
12723262ad Backed out changeset 212e1383eb6e (bug 802366) 2012-10-30 21:36:32 -04:00
Justin Lebar
425ea23369 Backed out changeset 37357ffceb05 (bug 802366) 2012-10-30 21:36:32 -04:00
Jonas Sicking
05fe127cc1 Bug 806587: Restore getCodebasePrincipal since extensions use it. r=mounir 2012-10-30 22:24:41 +01:00
Justin Lebar
f4186d5da9 Bug 802366 - Prelude, part 4: Use and simplify nsScriptSecurityManager::GetDocShellCodebasePrincipal. r=bz
--HG--
extra : rebase_source : 9987bd127ffbfdc6b34302dd05bfac1d6e481a33
2012-10-30 15:55:05 -04:00
Justin Lebar
b475bffaa5 Bug 802366 - Prelude, part 3: Make some methods on nsIPrincipal infallible, and improve documentation on other methods. r=bz
--HG--
extra : rebase_source : fecd856eee53b99a2a306b4005f2bb3b84c1cfb3
2012-10-30 15:55:05 -04:00
Bobby Holley
b8b176e756 Bug 797206 - Remove GetPrincipalFromContext. r=bz 2012-10-29 15:55:36 +01:00
Bobby Holley
e8568b9e9b Bug 797206 - Remove GetPrincipalAndFrame. r=bz 2012-10-29 15:55:35 +01:00
Mounir Lamouri
a4eec0ce4e Bug 777467 - Update the same-origin policy for principals to include appid/isinbrowserelement. r=bholley 2012-10-24 18:50:25 +01:00
Ben Turner
f28b7974ea Bug 786295 - 'Delete IndexedDB related to an app when uninstalled'. r=bz+khuey+sicking. 2012-10-23 09:31:19 -07:00
Matt Brubeck
3e5fcf6f52 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
917d8a431c 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
7c74c69d34 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
bac4dc387e 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.

--HG--
rename : caps/idl/nsISignatureVerifier.idl => security/manager/ssl/public/nsISignatureVerifier.idl
2012-10-22 08:29:56 +02:00
Bobby Holley
8727eb2985 Bug 789224 - Remove principal capability and preference infrastructure. r=mrbkap 2012-10-22 08:29:55 +02:00
Bobby Holley
9735e11f83 Bug 789224 - Remove capability manager stuff in nsScriptSecurityManager. r=mrbkap 2012-10-22 08:29:55 +02:00
Joel Maher
a89cc0df98 Bug 788653 - Make enablePrivilege pref name more dire. r=bholley 2012-10-18 08:03:37 -04:00
Bobby Holley
f7a738fe51 Bug 797204 - Remove API. r=mrbkap
\o/
2012-10-10 11:01:26 +02:00
Mounir Lamouri
949510a460 Bug 799152 - nsExpandedPrincipal should use default extendedOrigin/appId/appStatus/isInBrowserElement. r=bholley 2012-10-09 13:47:46 +01:00
Patrick Wang
2cfef0b277 Bug 777384 - Test case r=jlebar
--HG--
extra : rebase_source : 777580f0a22bfb3d9d447097b0f4a379f2b7416b
2012-09-27 01:47:57 +08:00
Isaac Aggrey
0cc4b12d36 Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan 2012-09-28 01:57:33 -05:00
Bobby Holley
5a6900c630 Bug 791526 - Temporarily add the |netscape.security| object back in to fix broken browser detection. r=bz 2012-09-27 16:38:51 +02:00
Aryeh Gregor
48707f546c Bug 779809 part 1 - Make [notxpcom] attributes an error; r=khuey 2012-08-09 11:31:14 +03:00
Bill McCloskey
f13e8e29d9 Bug 787856 - Convert JS_GetPrototype to support lazy protos (r=bhackett) 2012-09-03 16:42:17 -07:00
Sid Stamm
c356d3cd85 Bug 768029 - Apply CSP Policy to trusted and certified apps. Temporarily using a overly permissive policy for certified apps until Gaia is updated to handle the desired policy. r=sicking Parts by sicking, r=mounir 2012-09-25 16:28:17 -07:00
Fabrice Desré
3fd41470ed Backout Bug 768029 because that breaks Gaia (see https://github.com/mozilla-b2g/gaia/issues/5177) 2012-09-25 15:32:20 -07:00
Sid Stamm
bc5dd19449 bug 768029 - Apply CSP Policy to trusted and certified apps. r=sicking. Parts by sicking, r=mounir. 2012-08-02 12:13:53 -07:00
Antonio Manuel Amaya Calvo
daa36ed6ea Bug 773886: Prevent loading resources from app:// URIs from outside that app. r=sicking 2012-09-25 12:33:01 -07:00
Bobby Holley
5af5a73d3d Bug 792036 - Automated fixups. r=mccr8
find /files/mozilla/build/d/_tests/testing/mochitest/tests/ | egrep "\.(xhtml|html|xml|js)$" | grep -v SimpleTest | grep -vi mochikit | grep -v simpleThread | grep -v test_ipc_messagemanager_blob.html | grep -v "indexedDB/test" | xargs grep -l Components |  xargs grep -L enablePrivilege | perl -pe 's#.*mochitest/tests/##' | xargs perl -p -i.bakkk -e 's/Components\.interfaces(\s|;|\.|\[)/SpecialPowers\.Ci$1/g, s/SpecialPowers\.wrap\(Components\)\.(.)(lasses|tils|nterfaces|esults)/SpecialPowers.C$1/g, s/(?<![\.a-zA-Z])Components/SpecialPowers\.Components/g, s/window\.Components/window\.SpecialPowers\.Components/g'
2012-09-24 14:46:29 +02:00
Nathan Froyd
a25cbdd079 Bug 788704 - add telemetry for enablePrivilege; r=bholley 2012-09-17 17:03:42 -04:00
Tim Taubert
3a773c8a5a Bug 790911 - part 1 - add a flag to suppress error reporting when using checkLoadURIWithPrincipal(); r=bz 2012-09-13 16:16:17 +02:00
David Anderson
7397353ad1 Merge IonMonkey to mozilla-central. a=arewefastyet
--HG--
rename : content/base/src/nsWebSocket.cpp => content/base/src/WebSocket.cpp
rename : content/base/src/nsWebSocket.h => content/base/src/WebSocket.h
2012-09-11 10:25:14 -07:00
Bobby Holley
29a085d3bc Bug 788914 - Recompute cross-compartment wrappers when UniversalXPConnect is enabled. r=mrbkap 2012-09-11 01:05:10 -07:00
David Anderson
37976f8d18 Merge from mozilla-central. 2012-09-10 12:16:38 -07:00
David Anderson
7b70ee195a Merge from mozilla-central.
--HG--
rename : js/jsd/jsd_scpt.c => js/jsd/jsd_scpt.cpp
rename : js/jsd/jsd_stak.c => js/jsd/jsd_stak.cpp
rename : js/jsd/jsd_val.c => js/jsd/jsd_val.cpp
2012-09-05 16:18:11 -07:00
David Anderson
59aad86af4 Merge from mozilla-central.
--HG--
rename : js/src/sharkctl.cpp => js/src/devtools/sharkctl.cpp
rename : js/src/sharkctl.h => js/src/devtools/sharkctl.h
rename : js/src/MemoryMetrics.cpp => js/src/jsmemorymetrics.cpp
2012-08-29 17:57:37 -07:00
David Anderson
9e81520770 Merge from mozilla-central.
--HG--
rename : content/base/public/nsIFrameMessageManager.idl => content/base/public/nsIMessageManager.idl
2012-08-29 17:51:24 -07:00
Fabrice Desré
8a08fd76bb Bug 781620 - Bridge the DOM webapps registry with nsIPrincipal::GetStatus() - Part 3 : updating tests. [r=mounir] 2012-08-29 07:31:10 -07:00
Fabrice Desré
53fe1a77d2 Bug 781620 - Bridge the DOM webapps registry with nsIPrincipal::GetStatus() - Part 1 : nsPrincipal changes [r=mounir] 2012-08-27 19:43:57 -07:00
Phil Ringnalda
b8d45a9ae2 Back out a08d28e8a86b (bug 768868), 9b96029a9cf0 and 010b5cb3576d (bug 781620) for test failures and leaks 2012-08-27 21:34:53 -07:00
Fabrice Desré
17c1f0d102 Bug 781620 - Bridge the DOM webapps registry with nsIPrincipal::GetStatus() - Part 1 : nsPrincipal changes [r=mounir] 2012-08-27 19:43:57 -07:00
David Anderson
fd50a14c90 Merge from mozilla-central. 2012-08-22 16:09:24 -07:00
David Anderson
f3d3148ca7 Merge from mozilla-central. 2012-08-21 15:59:12 -07:00
Randell Jesup
29ac5c0b8c Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04:00
David Anderson
a1a3db5e45 Forbid JITing annotated frames (bug 763233, r=mrbkap,jandem). 2012-08-16 18:26:11 -07:00
David Anderson
5d981ba8fe Merge from mozilla-central. 2012-08-16 14:04:20 -07:00
David Anderson
348793a989 Remove JS_FrameIterator (bug 732653, r=luke,mrbkap). 2012-08-15 17:28:33 -07:00
Ryan VanderMeulen
f1e04816ea Merge m-c to inbound. 2012-08-20 20:21:35 -04:00
Ehsan Akhgari
8c296bbcd4 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
Blair McBride
84a0ccd6eb Bug 758950 - Test fix, test_bug292789.html should load xpinstallConfirm.js with a newer JS version. r=dveditz 2012-08-20 15:30:29 +12:00
Gregor Wagner
606e9b8f76 Bug 781355 - Hook up mozBrowser to Permission Manager. r=jlebar 2012-08-15 10:22:30 -07:00
Mounir Lamouri
86ed743386 Bug 777072 - 3/7 - Update nsHostTable and nsHostEntry to make them aware of new security model. r=sicking,jlebar 2012-08-23 11:47:55 -07:00
Chris Jones
bf0b224214 No bug: Merge backout on a CLOSED TREE r=bustage 2012-08-23 22:33:04 -07:00
Chris Jones
124a2df024 Back out bug 777072, bug 619236, and bug 784878 2012-08-23 22:00:14 -07:00
Ryan VanderMeulen
e880c79745 Merge the last PGO-green inbound changeset to m-c. 2012-08-23 22:06:49 -04:00
Mounir Lamouri
49bd52f0f6 Bug 777072 - 3/7 - Update nsHostTable and nsHostEntry to make them aware of new security model. r=sicking,jlebar 2012-08-23 11:47:55 -07:00
Bobby Holley
c3b9f1b805 Bug 757046 - Convert enablePrivilege into an insecure test-only construct (preffed off everywhere but in automation). r=bz 2012-08-23 11:45:28 -07:00
Luke Wagner
0f96a5287e Bug 784551 - remove JSSecurityCallbacks::findObjectPrincipals (r=mrbkap)
--HG--
extra : rebase_source : 8043b79eb031e4c3e196f6f693fa6a8a16099ecb
2012-08-23 09:51:09 -07:00
Luke Wagner
5909817000 Bug 668558 - remove JSSecurityCallbacks::subsumePrincipals (r=mrbkap)
--HG--
extra : rebase_source : 6cb1ce1b8f2505ca98235e7ad44138ac5f42737a
2012-08-23 09:45:24 -07:00
Aryeh Gregor
982100775b Bug 780618 - Move all error codes to nsError.h; r=ehsan 2012-07-27 17:03:27 +03:00
Justin Lebar
ba21663f76 Bug 777135 - Part 1: Add nice C++ version of nsIPrincipal::GetAppStatus. r=mounir
--HG--
extra : rebase_source : 6150a2b708faa41f1f6c7723260fc52444b7ea8d
2012-08-13 12:58:38 -04:00
Peter Van der Beken
854457d901 Fix for bug 768692 (Move DOM list binding generation to the new DOM binding codegen). r=bzbarsky.
--HG--
extra : rebase_source : 651a0fac4c9a87ef1c0a9cd91588c6421fd050c4
2012-05-22 15:46:20 +02:00
Ms2ger
331accfcb4 Bug 780387 - Part b: Stop using PRIntn; r=bsmedberg 2012-08-09 09:09:40 +02:00
Ian Melven
d09de1cd52 Bug 341604 - modify CheckMayLoad to allow sandboxed workers to load blob and data URIs r=jst 2012-08-20 11:34:33 -07:00
Gabor Krizsanits
f51ee4f7f0 Bug 777705 - Default policy for expanded principals. r=mrbkap 2012-08-20 11:22:34 -07:00
Fabrice Desré
b6c9cb580d Bug 781224 - Rename APP_STATUS_TRUSTED to APP_STATUS_PRIVILEGED in nsIPrincipal [r=mounir] 2012-08-08 10:21:54 -07:00
Eric Faust
d4a732fc86 Bug 775788 - Modify JSFunctionSpec to accept JSJitInfos. (r=luke) 2012-08-07 22:26:19 -07:00
Justin Lebar
cee459a4a6 No bug - Fix error in nsIPrincipal comment (it's nsIScriptSecurityManager::NO_APP_ID, not nsIAppsService::NO_APP_ID). r=me DONTBUILD 2012-08-06 00:31:22 -04:00
Mike Hommey
c1b35e7b2a Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
Mounir Lamouri
fcaf100669 Bug 776824 - Add isInBrowserElement to nsIPrincipal. r=mrbkap sr=sicking 2012-07-31 17:47:20 +02:00
Aryeh Gregor
57c0ad57fb Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Justin Lebar
56db9a6e24 Bug 772987 - Part 2: Use Static{Auto,Ref}Ptr where appropriate. r=mounir
--HG--
extra : rebase_source : 4e3e72ba53cd0177160f80231eebeb4972119eec
2012-07-26 15:33:45 -04:00
William Chen
f02258ae34 Bug 777582 - Make nsPrincipal deserialize members in the order that they are serialized. r=mounir 2012-07-25 20:12:03 -04:00
Joshua Cranmer
de30491499 Bug 773637 - Kill NS_SCRIPTABLE attributes, Part 2: Remove NS_SCRIPTABLE. r=ehsan
--HG--
extra : rebase_source : 83020e0a1961ed5b33d5e0599419c6b7b82caa87
2012-07-06 15:31:49 -05:00
Joshua Cranmer
e1cdfe2f05 Bug 773637 - Kill NS_SCRIPTABLE annotations, Part 1: Remove NS_*PARAM annotations. r=ehsan
--HG--
extra : rebase_source : a0b4bc50fece36d9a90fed61431635948bfa33b5
2012-07-06 15:14:07 -05:00
Mounir Lamouri
bd21420645 Bug 758258 - part 6 - Change how extendedOrigin is generated. r=sicking 2012-07-21 17:37:02 -07:00
Mounir Lamouri
40f1fac706 Bug 758258 - Tests. r=sicking 2012-07-21 17:14:25 -07:00
Jonas Sicking
690071fc50 Bug 774585: Rename getCodebasePrincipal to getSimpleCodebasePrincipal since the behavior has semantically changed. r=mounir 2012-07-21 00:29:40 -07:00
Ed Morley
4d382e6311 Bug 774585 - Temporarily disable test_principal_extendedorigin_appid_appstatus.html for failures on OS X 10.7 (and possibly others); rs=mounir on a CLOSED TREE 2012-07-20 12:20:55 +01:00
Mounir Lamouri
397fdcc90e No bug - fix build bustage on Windows/Android and M-oth on MacOS. r=me CLOSED TREE 2012-07-20 02:14:25 -07:00
Mounir Lamouri
41def80cf5 No bug - Pushing on a CLOSED TREE. r=me 2012-07-20 00:32:12 -07:00
Mounir Lamouri
ccb573e0c6 Bug 774585 - Tests. r=sicking 2012-07-20 00:26:05 -07:00
Jonas Sicking
0bed47c306 Bug 774585 - Make GetChannelPrincipal get the correct app principal. r=mounir 2012-07-20 00:07:49 -07:00
Jonas Sicking
ae7e96692e Bug 774585 - Add GetDocShellCodebasePrincipal to nsIScriptSecurityManager. r=mounir 2012-07-20 00:06:24 -07:00
Mounir Lamouri
f8a7531c39 Bug 758258 - part 5 - Add GetAppCodebasePrincipal and GetNoAppCodebasePrincipal to nsIScriptSecurityManager. r=mrbkap sr=sicking 2012-07-19 20:28:08 -07:00
Mounir Lamouri
48b9e1c384 Bug 758258 - part 4 - Update CreateCodebasePrincipal() to take app/inbrowser info. r=sicking 2012-07-19 15:32:08 -07:00
Mounir Lamouri
946396d9c4 Bug 758258 - part 3 - Add extendedOrigin, appStatus and appId to nsIPrincipal. r=bholley sr=sicking 2012-07-19 22:44:03 -07:00
Mounir Lamouri
9b29b3b2e7 No bug - Disable failing test on a CLOSED TREE. r=me 2012-07-19 18:55:05 -07:00
Mounir Lamouri
28e8d77612 No bug - fix test bustage on a CLOSED TREE. r=me 2012-07-19 17:35:42 -07:00
Mounir Lamouri
6e7f2253ad Bug 758258 - Part 2 - Add GetExtendedOrigin(), NO_APP_ID and UNKNOWN_APP_ID. r=sicking 2012-07-18 21:25:19 -07:00
Mounir Lamouri
0ec7cc8b2c Bug 758258 - Part 1 - Create skeleton for extendedOrigin tests. r=sicking 2012-07-19 16:14:11 -07:00
Steve Fink
eaba73b970 Backed out changeset 1bafff5720a8 2012-07-19 15:22:36 -07:00
Steve Fink
cd96c07f2c Backed out changeset afc1cf222996 2012-07-19 15:22:32 -07:00
Mounir Lamouri
a849186201 Bug 758258 - Part 2 - Add GetExtendedOrigin(), NO_APP_ID and UNKNOWN_APP_ID. r=sicking 2012-07-18 21:25:19 -07:00
Mounir Lamouri
8638ac5ada Bug 758258 - Part 1 - Create skeleton for extendedOrigin tests. r=sicking 2012-07-19 10:29:21 -07:00
Mounir Lamouri
c50dc913f1 Bug 775354 - Add a static method to be able to compute the origin based on nsPrincipal algorithm. r=mrbkap 2012-07-18 21:23:44 -07:00
Mounir Lamouri
8b371aed8a Bug 327244 (2/2) - Remove nsIScriptSecurityManager::CheckLoadURI(). r=sicking,jlebar 2012-07-18 15:27:02 -07:00
Mounir Lamouri
ff9d427dc7 Bug 327244 (1/2) - Remove nsIScriptSecurityManager::CheckLoadURIStr(). r=sicking 2012-07-19 10:49:17 -07:00
Ed Morley
bb507d18ac Backout ea6db8f420c0 (bug 770831), b51c79ee0883 (bug 774957), 020f6ed5958b (bug 758258), 11d8e19e1fca (bug 758258), 707fc51bfe2e (bug 775354), 489d944a6fe6 (bug 327244), be7df3c9d50f (bug 327244) for m-oth orange 2012-07-19 08:29:48 +01:00
Mounir Lamouri
147b74c44a Bug 758258 - Part 2 - Add GetExtendedOrigin(), NO_APP_ID and UNKNOWN_APP_ID. r=sicking 2012-07-18 21:25:19 -07:00
Mounir Lamouri
29d37627cd Bug 758258 - Part 1 - Create skeleton for extendedOrigin tests. r=sicking 2012-07-18 21:26:30 -07:00
Mounir Lamouri
b7c8a681c6 Bug 775354 - Add a static method to be able to compute the origin based on nsPrincipal algorithm. r=mrbkap 2012-07-18 21:23:44 -07:00
Mounir Lamouri
30741d2c3a Bug 327244 (2/2) - Remove nsIScriptSecurityManager::CheckLoadURI(). r=sicking,jlebar 2012-07-18 15:27:02 -07:00
Mounir Lamouri
2b7700d07d Bug 327244 (1/2) - Remove nsIScriptSecurityManager::CheckLoadURIStr(). r=sicking 2012-07-18 13:35:15 -07:00
Jonas Sicking
6372b568ef Bug 774585: Remove unused argument in nsScriptSecurityManager. r=mrbkap 2012-07-17 22:28:47 -07:00
Bobby Holley
c80430a612 Bug 655649 - Recompute cross-compartment wrappers when setting document.domain. r=mrbkap 2012-07-12 10:10:15 +02:00
Nathan Froyd
5b30baa4c3 Bug 370750 - consolidate mochitest files installation; r=glandium
With assistance on the patch from Ms2ger, Waldo, and Mossop.
2012-07-03 16:49:02 -04:00
Makoto Kato
70a261905e Bug 769533 - Part 1. Replace AppendWithConversion with others. r=jlebar 2012-07-06 18:43:28 +09:00
Bobby Holley
82e093909f Bug 754202 - Check principal in IsCapabilityEnabled when there's no code on the stack. r=mrbkap 2012-06-28 23:47:55 +02:00
Bobby Holley
fb95f07878 Bug 754202 - Remove mContextPrincipal usage from within nsScriptSecurityManager. r=mrbkap 2012-06-28 23:47:55 +02:00
Bobby Holley
fb16bc5a98 Bug 754202 - Remove context pushing/popping API. r=mrbkap Each one of these uses grabs the principal off of an object for pushing, but also enters the compartment of that object. So we shouldn't need this anymore.
Can I get a 'hell yeah'?
2012-06-28 23:47:55 +02:00
Bobby Holley
e83c215d0b Bug 754202 - Pull subject principals directly off the compartment. r=mrbkap It would be nice to check these principals against the principals acquired using the old mechanism. Unfortunately, they often differ. Because CAPS uses JS stack frames, any time we enter a compartment and do an operation (even throwing an Access-Denied exception) without running any JS code, we'll end up with a different principal.
Our security story is pretty darn tied to compartments at this point, so let's
just pull the trigger.
2012-06-28 23:47:55 +02:00
Bobby Holley
ae62a76b7e 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
Justin Lebar
01eddea821 Bug 766173 - Hold a strong ref to nsScriptSecurityManager, instead of hoping that it won't get addref'ed or released. r=bsmedberg
--HG--
rename : mobile/android/base/resources/drawable/tabs_button_contracted.xml => mobile/android/base/resources/drawable/tabs_button.xml
extra : rebase_source : 8f861c2298fd053a0e1f6deb6f9945040ea8db90
2012-06-19 13:20:34 -04:00
Ehsan Akhgari
822836504d Bug 758992 - Make the classes which use the XPCOM nsISupports implementation macros final, to avoid the warning about deleting using a pointer to a base class with virtual functions and no virtual dtor (caps parts); r=bholley 2012-06-12 23:58:27 -04:00
Ryan VanderMeulen
6e456f6d86 Merge m-c to inbound 2012-06-10 21:34:50 -04:00
L. David Baron
91859c5a28 Backout bug 754202 (all patches, rather than just patches 3-7). 2012-06-10 17:22:31 -07:00
Ryan VanderMeulen
9409d47933 Backout 90107a2a0c64 (bug 754202) for real due to orange. 2012-06-10 19:46:20 -04:00
Ryan VanderMeulen
b74e4a29db Revert c39d36167b99 due to a horribly munged backout. 2012-06-10 19:44:50 -04:00
Ryan VanderMeulen
061d4c2616 Backout the bug 754202 backout due to orange. 2012-06-10 19:37:47 -04:00
Bobby Holley
c82e89c9ae Merge backout. 2012-06-11 00:28:30 +02:00
Bobby Holley
11cffb7c78 Back out bug 754202. r=me 2012-06-11 00:28:05 +02:00
Ms2ger
ec0e9af43b Bug 734891 - Followup: Fix build warnings in nsPrincipal.cpp. 2012-06-10 21:25:17 +02:00
Gabor Krizsanits
05c9d300b3 Bug 734891 - part 2: Adding ExpandedPrincipal support 2012-06-09 15:19:26 -07:00
Gabor Krizsanits
1edd821586 Bug 734891 - part 1: Decoupling URI based logic from caps/certificate related logic of nsPrincipal 2012-06-09 15:19:26 -07:00
Gabor Krizsanits
f72703f11c Bug 734891 - part 0: rearanging nsPrincipal methods for follow up 2012-06-09 15:19:26 -07:00
Bobby Holley
76ae847652 Bug 754202 - Remove mContextPrincipal usage from within nsScriptSecurityManager. r=mrbkap 2012-06-07 14:28:22 +02:00
Bobby Holley
59dda709f9 Bug 754202 - Remove context pushing/popping API. r=mrbkap
Each one of these uses grabs the principal off of an object for pushing, but also enters the compartment of that object. So we shouldn't need this anymore.

Can I get a 'hell yeah'?
2012-06-07 14:28:21 +02:00
Bobby Holley
1449c05d14 Bug 754202 - Pull subject principals directly off the compartment. r=mrbkap
It would be nice to check these principals against the principals acquired
using the old mechanism. Unfortunately, they often differ. Because CAPS uses
JS stack frames, any time we enter a compartment and do an operation (even
throwing an Access-Denied exception) without running any JS code, we'll end
up with a different principal.

Our security story is pretty darn tied to compartments at this point, so let's
just pull the trigger.
2012-06-07 14:28:21 +02:00
Bobby Holley
cc0e94bad7 Bug 754202 - Pull object principals directly off the compartment, and assert that behavior doesn't change. r=bz 2012-06-07 14:28:21 +02:00
Boris Zbarsky
31ccf86cf9 Bug 761707 part 2. Drop the vestigial jsclass argument to UnwrapDOMObject. r=bholley 2012-06-06 15:59:46 -04:00
Gervase Markham
87620f5676 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Brian Hackett
f8aa8c3c5a Use handles in API object hooks where possible, bug 750733. r=billm 2012-05-19 15:03:45 -07:00
Brian Hackett
aeda1d5c01 Backed out changeset 5fc7462dd394 for android orange. 2012-05-19 11:52:55 -07:00
Brian Hackett
54e8d378fb Use handles in API object hooks where possible, bug 750733. r=billm 2012-05-19 09:48:09 -07:00
Ms2ger
5a68e74435 Bug 754968 - Part c: Make BindingUtils.h not require private xpconnect headers; r=bholley 2012-05-18 10:29:40 +02:00
Tom Schuster
889e3a0487 Bug 752226 - Remove any use of JSVAL_IS_OBJECT. r=luke,Ms2ger 2012-05-11 17:46:26 +02:00
Ed Morley
4c4c3cfd18 Backout 9b0fcaacb788 & bf3fef257e68 (bug 752226) for mochitest-other orange 2012-05-11 18:25:52 +01:00
Tom Schuster
6e0861373a Bug 752226 - Remove any use of JSVAL_IS_OBJECT. r=luke,Ms2ger
--HG--
extra : rebase_source : edf2077f8b8bad1970eab6ebe9996e761d4e596c
2012-05-11 17:46:26 +02:00
Ms2ger
9a5ae693e0 Bug 741245 - Remove nsresult return value from nsXPConnect::GetSafeJSContext(); r=bholley 2012-05-05 11:00:05 +02:00
Boris Zbarsky
224115946f Bug 742217. Reduce the use of nested namespaces in our binding code. r=peterv,bent
In the new setup, all per-interface DOM binding files are exported into
mozilla/dom.  General files not specific to an interface are also exported into
mozilla/dom.

In terms of namespaces, most things now live in mozilla::dom.  Each interface
Foo that has generated code has a mozilla::dom::FooBinding namespace for said
generated code (and possibly a mozilla::bindings::FooBinding_workers if there's
separate codegen for workers).

IDL enums are a bit weird: since the name of the enum and the names of its
entries all end up in the same namespace, we still generate a C++ namespace
with the name of the IDL enum type with "Values" appended to it, with a
::valuelist inside for the actual C++ enum.  We then typedef
EnumFooValues::valuelist to EnumFoo.  That makes it a bit more difficult to
refer to the values, but means that values from different enums don't collide
with each other.

The enums with the proto and constructor IDs in them now live under the
mozilla::dom::prototypes and mozilla::dom::constructors namespaces respectively.
Again, this lets us deal sanely with the whole "enum value names are flattened
into the namespace the enum is in" deal.

The main benefit of this setup (and the reason "Binding" got appended to the
per-interface namespaces) is that this way "using mozilla::dom" should Just
Work for consumers and still allow C++ code to sanely use the IDL interface
names for concrete classes, which is fairly desirable.

--HG--
rename : dom/bindings/Utils.cpp => dom/bindings/BindingUtils.cpp
rename : dom/bindings/Utils.h => dom/bindings/BindingUtils.h
2012-05-03 00:35:38 -04:00
Bobby Holley
e79c2696df Bug 750859 - Remove {Disable,Revert}Capability. r=bz, PGO helper on CLOSED TREE 2012-05-02 23:57:43 +02:00
Bobby Holley
999f61cc07 Bug 750859 - Remove (most of) SetCanEnableCapability. r=bz 2012-05-02 23:57:34 +02:00
Bobby Holley
d67552e8b9 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
Bobby Holley
b7e05a0784 Bug 750859 - remove unused (or seldom-used) PrivilegeManager functions. r=bz 2012-05-02 23:57:34 +02:00
Gabor Krizsanits
f65e785137 Bug 735280 - Part 3: Components object specific wrapper. r=bholley 2012-04-28 09:12:28 -04:00
Ryan VanderMeulen
3f70ab0134 Backout a0b3af4ac9f5 (bug 735280) due to Android jsreftest orange. 2012-04-25 21:59:36 -04:00
Gabor Krizsanits
8f2218a116 Bug 735280 - Part 3: Components object specific wrapper. r=bholley 2012-04-25 20:12:33 -04:00
Ryan VanderMeulen
7d4f50a90d Backout 0b170d1f5d10 (bug 735280) due to red. 2012-04-24 22:09:23 -04:00
Gabor Krizsanits
0a0e1a6bd0 Bug 735280 - Part 3: Components object specific wrapper. r=bholley 2012-04-24 21:48:02 -04:00
David Anderson
38bfcb0aba Remove simple JS_FrameIterator use from content, DOM, and caps (bug 744617, r=mrbkap).
--HG--
extra : rebase_source : 003a5285b549845d47c9298606d737620db5bb3d
2012-04-16 12:30:00 -07:00
Ms2ger
b8ae2456b2 Backing out bf0a78471e5e:dc7022e2d807 for inexplicable windows crashes. 2012-04-14 17:52:34 +02:00
Ms2ger
9f95d23e65 Bug 741245 - Remove nsresult return value from nsXPConnect::GetSafeJSContext(); r=bholley 2012-04-14 15:05:01 +02:00
Mark Capella
1839be84c0 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
Bobby Holley
56658e2cea Bug 739825 - Push principals when entering compartments in structured clone. r=mrbkap 2012-04-05 14:02:34 -07:00
Peter Van der Beken
09128a75d3 Fix for bug 740069 (Generate JS bindings in C++ with a python script for DOM objects on the main thread and in workers. Infrastructure and new bindings for XMLHttpRequest). Patch by bent/bz/bholley/jst/khuey/peterv, r=bent/bz/bholley/jlebar/khuey/peterv/sicking/smaug.
--HG--
rename : js/xpconnect/tests/mochitest/test_bug462428.html => dom/bindings/test/test_lookupGetter.html
2012-03-30 21:42:20 -07:00
Igor Bukanov
77f4a42ed3 bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke
The patch shrinks the API presented in jsxdrapi.h down to 4 functions to
encode/decode scripts and interpreted functions to/from the memory. The
newly introduced implementation header vm/Xdr.h replaces the former
JSXDRState with the template class XDRState parametrized by the enum
type with two constants, XDR_ENCODE and XDR_DECODE. This way a compiler
can fully eliminate the former runtime checks for the decoding/encoding
mode. As a drawback this required to explicitly instantiate the xdr
implementation as I do not want to put all the xdr code to header files.

The memory-only XDR allows to avoid coping filename and to-be-atomized
chars to a temporary buffer as the code can just access the buffer
directly. Another change is that new XDRScript takes as a parameter its
parent script. This allowed to avoid keeping filename in XDRState and
simplify the filename management.

Another change is the removal of JS_HAS_HDR. As CloneScript uses XDR to
copy a script, JS_HAS_XDR cannot be disabled.

--HG--
rename : js/src/jsxdrapi.cpp => js/src/vm/Xdr.cpp
extra : rebase_source : f8f1536a86b7c3fe7296a16b6677bd21664af98a
2012-02-20 11:58:00 +01:00
Dão Gottwald
63ed9dae81 Backed out changeset 30798fdc5bad 2012-03-24 12:33:30 +01:00
Igor Bukanov
24b01abf6b bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke
The patch shrinks the API presented in jsxdrapi.h down to 4 functions to
encode/decode scripts and interpreted functions to/from the memory. The
newly introduced implementation header vm/Xdr.h replaces the former
JSXDRState with the template class XDRState parametrized by the enum
type with two constants, XDR_ENCODE and XDR_DECODE. This way a compiler
can fully eliminate the former runtime checks for the decoding/encoding
mode. As a drawback this required to explicitly instantiate the xdr
implementation as I do not want to put all the xdr code to header files.

The memory-only XDR allows to avoid coping filename and to-be-atomized
chars to a temporary buffer as the code can just access the buffer
directly. Another change is that new XDRScript takes as a parameter its
parent script. This allowed to avoid keeping filename in XDRState and
simplify the filename management.

Another change is the removal of JS_HAS_HDR. As CloneScript uses XDR to
copy a script, JS_HAS_XDR cannot be disabled.

--HG--
rename : js/src/jsxdrapi.cpp => js/src/vm/Xdr.cpp
2012-02-20 11:58:00 +01:00
Ms2ger
198867ded9 Backed out changeset f33e1e959036; r=bustage 2012-03-24 11:04:34 +01:00
Igor Bukanov
7226b2e716 bug 737624 - memory-only encoding/decoding of scripts and functions. r=:luke
The patch shrinks the API presented in jsxdrapi.h down to 4 functions to
encode/decode scripts and interpreted functions to/from the memory. The
newly introduced implementation header vm/Xdr.h replaces the former
JSXDRState with the template class XDRState parametrized by the enum
type with two constants, XDR_ENCODE and XDR_DECODE. This way a compiler
can fully eliminate the former runtime checks for the decoding/encoding
mode. As a drawback this required to explicitly instantiate the xdr
implementation as I do not want to put all the xdr code to header files.

The memory-only XDR allows to avoid coping filename and to-be-atomized
chars to a temporary buffer as the code can just access the buffer
directly. Another change is that new XDRScript takes as a parameter its
parent script. This allowed to avoid keeping filename in XDRState and
simplify the filename management.

Another change is the removal of JS_HAS_HDR. As CloneScript uses XDR to
copy a script, JS_HAS_XDR cannot be disabled.

--HG--
rename : js/src/jsxdrapi.cpp => js/src/vm/Xdr.cpp
2012-02-20 11:58:00 +01:00
Igor Bukanov
5542df3342 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
Gavin Sharp
b52311451c Bug 732413: make DISALLOW_INHERIT_PRINCIPAL flag passed to checkLoadURI effective even when the source principal is the system principal, r=bz
--HG--
rename : caps/tests/mochitest/test_bug470804.html => caps/tests/mochitest/test_disallowInheritPrincipal.html
extra : transplant_source : %CD%A3%DD%8Aa%DC%1F%BE%F8%0DB%BE%86%3FQ%D8%95%88%9E%CA
2012-03-14 11:55:47 -07:00
Bobby Holley
3b2b440f54 Bug 735544 - Allow exception stacks to cross compartment boundaries. r=luke 2012-03-15 15:19:52 -07:00
Justin Lebar
064e2cf3f9 Bug 729940 - Part 2: Stop using crappy hash functions in Gecko. r=bz
--HG--
extra : rebase_source : 6fa267a89878cc1a766d8618569debcea9b12e48
2012-03-12 18:53:18 -04:00
Igor Bukanov
f0bddf0e88 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
Ed Morley
e63b667897 Backout afeafc02c1de, dfae37833c9b & f9f51c726fa7 (bug 729940 parts 1-3) for talos regressions 2012-03-05 15:22:28 +00:00
Nicholas Nethercote
78363fbd82 Bug 682431 (part 2) - Add memory reporters for URIs and Links. r=biesi,bz,jlebar.
--HG--
extra : rebase_source : db4f094a7d334914b986bb66f5bf1089aafda561
2012-02-19 19:51:48 -08:00
Justin Lebar
c07407a766 Bug 729940 - Part 3: Stop using crappy hash functions in Gecko. r=bz 2012-03-04 15:58:06 -05:00
Justin Lebar
2449f55f11 Back out bug 729940 (a108aee:d75775d) due to 32-bit red. 2012-03-04 14:20:34 -05:00
Justin Lebar
65b70fabf4 Bug 729940 - Part 3: Stop using crappy hash functions in Gecko. r=bz 2012-03-04 13:49:42 -05:00
David Mandelin
60e80d55b6 Bug 730511: remove obsolete typedefs intN, uintN, r=luke 2012-02-28 15:11:11 -08:00
Honza Bambas
63144a5851 Bug 495337 - PR_TRUE/true fix, r=bz 2012-02-23 18:47:02 +01:00
Honza Bambas
422a01729e Bug 495337 - Make sessionStorage use principals instead of string domains, r=bz+bclary 2012-02-23 18:41:25 +01:00
Bobby Holley
4259454b77 Bug 700561 - Relax short-circuit principal checks on account of inner window reuse. r=bz 2012-02-18 08:55:28 -08:00
Igor Bukanov
748c9f34a7 bug 724310 - drop cx argument from JSObject field and fixed slots infallible API. r=:Waldo
--HG--
extra : rebase_source : b78519db2ff008eb5143676d2db47935f0e89f45
2012-02-05 21:07:23 +01:00
Igor Bukanov
38fe4ed717 backout merge for bug 724310. r=irc 2012-02-09 21:28:22 +01:00
Igor Bukanov
e4e3433d0c bug 723517 - drop cx argument from JSObject field and fixed slots infallible API. r=:Waldo
--HG--
extra : rebase_source : c461dfc0e0e0462ab262cc01c2a771d3bb0971cc
2012-02-05 21:07:23 +01:00
Panagiotis Koutsourakis
583eb38038 Bug 702388 - Convert Makefiles to use |TEST_DIRS += foo| r=khuey
Files named Makefile.in containing the expression

DIRS += <foo>
or
DIRS = <foo>

inside the conditional expression

ifdef ENABLE_TESTS
...
endif

are changed to

TEST_DIRS += tests

outside any conditional expression.

The files

./layout/Makefile.in
./layout/Makefile.in
./layout/style/Makefile.in
./rdf/Makefile.in
./security/manager/Makefile.in
./content/Makefile.in
./content/smil/Makefile.in
./content/xul/templates/Makefile.in
./content/xul/content/Makefile.in
./content/base/Makefile.in
./content/media/Makefile.in
./parser/htmlparser/Makefile.in
./dom/sms/Makefile.in
./js/jsd/Makefile.in
./js/xpconnect/Makefile.in
./widget/Makefile.in
./widget/windows/Makefile.in
./Makefile.in
./startupcache/Makefile.in
./storage/Makefile.in
./gfx/Makefile.in
./intl/strres/Makefile.in
./intl/uconv/Makefile.in
./intl/unicharutil/Makefile.in
./intl/lwbrk/Makefile.in
./embedding/Makefile.in
./modules/libjar/Makefile.in
./modules/libpref/Makefile.in
./build/Makefile.in
./build/win32/Makefile.in
./xpcom/Makefile.in
./extensions/spellcheck/hunspell/Makefile.in
./extensions/cookie/Makefile.in
./netwerk/Makefile.in
./netwerk/streamconv/Makefile.in
./editor/txmgr/Makefile.in
./toolkit/mozapps/shared/Makefile.in
./toolkit/mozapps/update/Makefile.in
./toolkit/library/Makefile.in
./toolkit/library/Makefile.in
./toolkit/crashreporter/Makefile.in
./toolkit/components/perf/Makefile.in
./toolkit/components/perf/Makefile.in
./toolkit/components/feeds/Makefile.in
./toolkit/components/url-classifier/Makefile.in

contain the string

ifdef ENABLE_TESTS

but have some other statement inside (e.g. TOOL_DIRS += <foo> etc) and
they remain unchanged by this patch.
2012-02-04 17:32:24 +00:00
Igor Bukanov
3163d5e91e bug 723517 - Drop cx argumrent from JS_GetClass(cx, obj). r=luke 2012-02-04 01:54:57 +01:00
Bobby Holley
9f17b789c2 Bug 715417 - Eliminate getPrincipalArray and globalPrivilegesEnabled from JSPrincipals. r=mrbkap 2012-01-06 17:29:02 -08:00
Bobby Holley
e107a914d9 Bug 713747 - Remove UniversalFoo from caps (and thus, the tree). r=bz 2011-12-30 09:35:52 -08:00
Jeff Walden
476c7d19c5 Bug 708735 - Use <stdint.h> types in JSAPI and throughout SpiderMonkey. Continue to provide the {u,}int{8,16,32,64} and JS{Uint,Int}{8,16,32,64} integer types through a single header, however, for a simpler backout strategy -- and also to ease the transition for embedders. r=timeless on switching the jsd API to use the <stdint.h> types, r=luke, r=dmandelin 2011-12-08 22:54:10 -05:00
Brian Hackett
c3b9744976 Merge MC -> JM 2011-11-26 15:03:20 -08:00
Brian Hackett
09aa4d18f6 Merge MC -> JM 2011-11-10 12:06:26 -08:00
Brian Hackett
41e18127a7 Add JSScript::function, bug 693754. 2011-10-21 14:31:01 -07:00
Brian Hackett
d64dce75db Merge MC -> JM
--HG--
rename : js/src/jsparse.cpp => js/src/frontend/BytecodeCompiler.cpp
rename : js/src/jsparse.h => js/src/frontend/BytecodeCompiler.h
rename : js/src/jsemit.cpp => js/src/frontend/BytecodeGenerator.cpp
rename : js/src/jsemit.h => js/src/frontend/BytecodeGenerator.h
rename : js/src/jsparse.cpp => js/src/frontend/FoldConstants.cpp
rename : js/src/jsparse.cpp => js/src/frontend/ParseNode.cpp
rename : js/src/jsparse.h => js/src/frontend/ParseNode.h
rename : js/src/jsparse.cpp => js/src/frontend/Parser.cpp
rename : js/src/jsparse.h => js/src/frontend/Parser.h
rename : js/src/jsregexpinlines.h => js/src/vm/RegExpObject-inl.h
rename : js/src/jsregexp.cpp => js/src/vm/RegExpObject.cpp
rename : js/src/jsregexp.h => js/src/vm/RegExpObject.h
rename : js/src/xpconnect/src/xpcjsruntime.cpp => js/xpconnect/src/XPCJSRuntime.cpp
rename : js/src/xpconnect/src/xpcquickstubs.cpp => js/xpconnect/src/XPCQuickStubs.cpp
rename : js/src/xpconnect/src/nsXPConnect.cpp => js/xpconnect/src/nsXPConnect.cpp
2011-10-19 14:26:08 -07: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