Commit Graph

263 Commits

Author SHA1 Message Date
Ms2ger
dba42e4001 Bug 883284 - Part d: Move LIBXUL_LIBRARY into moz.build (f-j); r=bsmedberg 2013-08-22 08:56:00 +02:00
Ms2ger
4d968c40e1 Bug 882859 - Part b: Move FAIL_ON_WARNINGS into moz.build; r=joey+gps 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
Ms2ger
844b7ec109 Bug 903849 - Use MOZ_ASSERT consistently in XPConnect; r=bholley 2013-08-14 09:00:34 +02: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
Jon Coppeard
71a6b47923 Bug 900986 - Convert JS_*Element API to use MutableHandleValue for out params r=terrence r=bholley r=smaug 2013-08-05 14:02:47 +01:00
Bobby Holley
c00f6379ec Bug 899245 - Rename JS_GetGlobalForScopeChain to JS::CurrentGlobalOrNull. r=luke
This was done with perl/grep.
2013-07-29 16:45:27 -07: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
Carsten "Tomcat" Book
8c89deb65b Backed out changeset ae8d72538dee (bug 897484) for b2g bustage 2013-07-26 12:34:25 +02:00
Jon Coppeard
fc9b509d4f Bug 897484 - GC: Convert JS_GetProperty APIs to take MutableHandleValue r=terrence r=bholley r=smaug 2013-07-26 10:00:38 +01:00
Jon Coppeard
1463e7df5b Bug 896949 - JS_SetProperty APIs should take an immutable parameter r=waldo r=bz 2013-07-26 10:00:38 +01:00
Jon Coppeard
477e4df5c5 Bug 896540 - GC: Convert JS_SetProperty* to take MutableHandleValue - browser changes r=bz 2013-07-25 13:57:00 +01:00
Joshua Cranmer
918e4b37e5 Bug 884061 - Part 3n: Use NS_DECL_THREADSAFE_ISUPPORTS in js/, r=bholley
--HG--
extra : rebase_source : 4f888058e3f842affd496e35bdd3c2037d1abf43
2013-07-18 21:23:32 -05:00
Bobby Holley
61dd1d7439 Bug 887334 - Enter a compartment in b2g-only unloading code. r=me CLOSED TREE 2013-07-17 14:28:54 -07:00
Bobby Holley
7abe607721 Bug 889911 - Replace mozJSLoaderErrorReporter with SystemErrorReporter and remove the former. r=mrbkap 2013-07-16 20:38:44 -07:00
Trevor Saunders
82e5558b37 bug 887483 - remove a bunch of useless assignments to FORCE_STATIC_LIB implied by LIBXUL_LIBRARY=1 r=mshal 2013-07-11 11:06:34 -04:00
Mike Shal
37bbfefcec Bug 880245 - Move EXTRA_JS_MODULES to moz.build (batch #4); r=joey 2013-07-01 11:34:30 -04:00
Bobby Holley
f77eb1e574 Bug 880917 - Convert JS_SetVersion API consumers to per-compartment versions. r=luke 2013-06-29 09:11:18 -06:00
Bobby Holley
f5f7bf3be5 Bug 880917 - Generalize JS_NewGlobalObject API to take CompartmentOptions. r=luke
This will be useful for versioning, as well as JIT options and all the other
stuff that eventually needs to move out of the JSContext.
2013-06-29 09:11:17 -06:00
Andrew McCreight
aacc454171 Bug 883657, part 2 - Don't force a GC in mozJSComponentLoader::UnloadModules. r=bholley 2013-06-25 08:42:40 -07:00
Bobby Holley
2fa8b1cfb0 Bug 883450 - Miscellaneous requests. r=gabor 2013-06-20 11:05:34 -07:00
Ed Morley
32d0858db7 Merge latest green birch changeset and mozilla-central 2013-06-20 09:01:19 +01:00
Gregor Wagner
e98efca641 Bug 885025 - B2G: Add missing request in mozJSComponentLoader::UnloadModules. r=khuey 2013-06-19 21:09:48 -04:00
Brian O'Keefe
5f8b5163e8 Bug 875934 - Move LIBRARY_NAME to moz.build (batch #1); r=mshal
--HG--
extra : rebase_source : 385d3fd65475ffc18ee44ae088753649470e214b
2013-06-17 15:21:01 -04:00
Ms2ger
b9e065f934 Bug 881358 - Kill build warnings in XPConnect; r=bholley 2013-06-12 09:00:09 +02:00
Trevor Saunders
6a25cfb54f bug 873622 - speed up nsXPConnect::GetXPConnect() and rename it since it never returns null r=bholley 2013-05-17 01:49:41 -04:00
Mike Shal
994cfe0b6b 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
91448a9dac 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
54ef3d2952 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
85b06d58a3 Bug 873735 part 2. Change nsIXPConnectJSObjectHolder::GetJSObject to return a JSObject*. r=bholley 2013-05-20 08:44:18 -04:00
Ted Mielczarek
110919af49 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
Kyle Huey
f3b4701691 Bug 864494: Hardcode the value of jsloader.reuseGlobal on b2g to work around some IPC preferences problem that we don't entirely understand. r=jlebar 2013-05-07 11:02:31 -07:00
Tom Schuster
24561ef11c Bug 865410 - Use CallArgs for nsIJSNativeInitializer::Initialize. r=bz 2013-05-04 19:25:15 +02:00
Bobby Holley
49eef22d31 Bug 865729 - Remove nsIJSContextStack from xpconnect/loader. r=gabor 2013-04-29 11:16:19 -07:00
Jon Coppeard
7d9149ed57 Bug 865308: GC: More rooting work in XPConnect r=bholley 2013-04-26 18:50:18 +01:00
Tom Schuster
57cd547745 Bug 862834 - Root mozJSComponentLoader. r=bholley,terrence 2013-04-23 17:48:05 +02:00
Xin Zhang
5d0104d77b Bug 857385 - Make various JSFunctionSpec arrays const. r=waldo
--HG--
extra : rebase_source : 24141998ffad3b0e6bad98b6fc0ce3754e448d5b
2013-04-22 14:15:49 -07:00
Jeff Walden
f9d3bc73ed Bug 858677 - Fix up code not built by SpiderMonkey to use the newly-changed deletion signatures. r=bholley, r=billm 2013-04-05 21:22:55 -07:00
Gabor Krizsanits
c38a4cd7da Bug 820170 - Turning BackstagePass into non-singleton. r=bholley 2013-04-04 11:27:38 +02:00
Kyle Machulis
5aa83c3e11 Bug 855465 - Add emacs python mode comments to moz.build files; r=gps 2013-04-01 11:36:59 -07:00
Kyle Machulis
c79ccc0693 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
a59d40f143 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
Mike Shal
9680b82df6 Bug 844654 - Part 2: Move MODULE to moz.build; rs=gps 2013-03-19 11:47:00 -07:00
Bill McCloskey
a3cea08b3a Bug 759585 - Zones (r=jonco,bhackett,njn,dvander,luke,bz,mccr8,bholley) 2013-03-16 20:36:37 -07:00
Jon Coppeard
8d5fd16382 Bug 848395 - GC: Move Rooted to JS namespace - rename js::Rooted to JS::Rooted outside SpiderMonkey r=terrence
--HG--
extra : rebase_source : 35cbf3cc4da4598c2e9e6975028ef397718849db
2013-03-06 16:41:43 +00:00
Ed Morley
fe417ad697 Backed out changeset 28ef4bdff455 (bug 848395) 2013-03-07 13:03:35 +00:00
Jon Coppeard
fa71007e65 Bug 848395 - GC: Move Rooted to JS namespace - rename js::Rooted to JS::Rooted outside SpiderMonkey r=terrence
--HG--
extra : rebase_source : 866879df05e3ec3f8e93570eb3f6b71103636b41
2013-03-06 16:41:43 +00:00
Gregory Szorc
c1b5e29e19 Bug 784841 - Part 18s: Convert /js; r=glandium 2013-02-25 12:47:22 -08:00
Jeff Walden
0e302a5094 Bug 826009 - Move locale callback info, default locale, etc. data and APIs to be JSRuntime-centered. f=bholley, r=jorendorff
--HG--
extra : rebase_source : 35317f4c29e9dd70e7d4fd1292027cfd51ce2675
2013-02-07 18:04:11 -08:00
Nicholas Nethercote
524f6ea9b5 Bug 788293 - Remove e4x support. r=jorendorff,terrence,evilpie.
Ding dong!  The witch is dead!
2013-01-24 21:24:57 -08:00
Phil Ringnalda
b4eec14ca3 Back out 66882ea6f8c7 (bug 788293) and 32f09cb3c7b6 (bug 834090) for bustage
CLOSED TREE
2013-01-31 22:29:30 -08:00
Nicholas Nethercote
ae7837bdef Bug 788293 - Remove e4x support. r=jorendorff,terrence,evilpie.
Ding dong!  The witch is dead!

--HG--
extra : rebase_source : 7574f5620e303c25120fcfc8ceb2099ad75c8f1b
2013-01-24 21:24:57 -08:00
Mats Palmgren
94ede408a1 Bug 786533 - On Windows, one of the system header files (windef.h) defines 'min' and 'max' as macros which breaks any use of std::min/std::max. Define NOMINMAX before including system header files where needed to avoid defining those macros. r=ehsan 2013-01-15 13:22:03 +01:00
Chia-hung Tai
08eb1bb588 Bug 825836 - Add Blob into JS component. r=sicking 2013-01-04 15:53:25 +08:00
Kyle Huey
947106a519 Bug 811615: Enable chrome code to create a new File object by wrapping an existing Blob and provide a custom name/type. r=sicking a=basecamp-blocking 2012-12-11 13:21:03 -08:00
Ed Morley
afe82ab291 Backout 194d8f675d2d & 251a18603db4 (bug 811615) for xpcshell and mochitest failures 2012-12-11 13:09:38 +00:00
Kyle Huey
9b92167718 Bug 811615: Enable chrome code to create a new File object by wrapping an existing Blob and provide a custom name/type. r=sicking a=basecamp-blocking 2012-12-11 03:54:08 -08:00
Kyle Huey
7ba6475e09 Bug 814102: Make the 'this' object used when compartment sharing a FakeBackstagePass. r=mrbkap 2012-11-26 14:41:59 -08:00
Kyle Huey
e5a7452bf5 Bug 811784: Account for subscripts when figuring out what object to stick properties on. r=mrbkap 2012-11-26 14:41:55 -08:00
Benjamin Peterson
682af1e5b6 Bug 795104 - Sources with a custom charset can't be lazily loaded. r=bz 2012-11-20 11:30:03 -06:00
Jonathan Griffin
49b10d35d6 Backed out a94288026ea5 (Bug 811784) for turning all b2g emulator tests red 2012-11-16 18:30:22 -08:00
Kyle Huey
0797f155da Bug 811784: Account for subscripts when figuring out what object to stick properties on. r=mrbkap
--HG--
extra : rebase_source : 6da8a33c512b2e5758094f4a2108e5c342c7c28c
2012-11-16 08:54:58 -08:00
Ed Morley
a52e6ce1aa Backout 4bc502c08da4 (bug 811784) for xpcshell failures 2012-11-16 18:16:33 +00:00
Kyle Huey
5cc8b7c1e2 Bug 811784: Account for subscripts when figuring out what object to stick properties on. r=mrbkap 2012-11-16 08:54:58 -08:00
Kyle Huey
eb284af7b6 Bug 810987: When sharing a global, don't import properties onto the global, import them onto the appropriate 'this' object. r=mrbkap
--HG--
extra : rebase_source : c3a92d4197831fa3061bf3f01b7cc610cc89e867
2012-11-13 11:13:27 -08:00
Kyle Huey
d77f59d91d Backout Bug 810987. 2012-11-13 10:27:37 -08:00
Kyle Huey
4c42acb694 Backed out changeset 62886fd1aaa4 2012-11-13 10:25:24 -08:00
Kyle Huey
f9f141bbec Bug 810987: Followup bustage fix. 2012-11-13 10:24:08 -08:00
Kyle Huey
206106294e Bug 810987: When sharing a global, don't import properties onto the global, import them onto the appropriate 'this' object. r=mrbkap 2012-11-13 08:57:44 -08:00
Kyle Huey
1482122303 Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon
--HG--
extra : rebase_source : 98337b6a8c07d05e8c961a452dd05a7d75c3c60b
2012-10-31 09:13:28 -07:00
Vicamo Yang
8297cdabd6 Backout 67cb43bb8865: Breaks B2G Marionette 2012-10-31 16:35:11 +08:00
Kyle Huey
bdf47895bb Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon 2012-10-30 12:28:11 -07:00
Ed Morley
777eed8444 Backout a145ded68994, e0cf397089ec & 1545e91c658e (bug 798491) for bustage on a CLOSED TREE 2012-10-30 17:02:31 +00:00
Kyle Huey
331f5d8222 Bug 798491: Followup bustage fix. 2012-10-30 08:42:47 -07:00
Kyle Huey
aa1997a51a Bug 798491: Add an option to stick all chrome JSMs/JS components in the same compartment. r=mrbkap,philikon 2012-10-30 08:26:12 -07:00
Andrew Quartey
1d28872093 Bug 792581 - part 20: Replace LL_UI2L macro with int64_t cast. r=ehsan 2012-10-25 19:25:57 -04:00
Nikhil Marathe
453b3dce5f Bug 804174 - Inline CallerHasUniversalXPConnect with IsCallerChrome. r=mccr8 2012-10-25 16:10:53 -07:00
Nick Hurley
31985d7fa6 Bug 536324 part 3 - Change consumers of nsIChannel. r=sworkman 2012-10-22 10:51:07 -07:00
Isaac Aggrey
5d8d5083ea Bug 794510: Part 1 - Build with NO_NSPR_10_SUPPORT by default; r=ehsan,glandium,wtc 2012-10-11 01:00:54 -05:00
Andrew Quartey
464807b57d Bug 792581 - part 16: Replace LL_L2UI macro with uint32_t cast. r=ehsan 2012-10-12 13:29:11 -04:00
Trevor Saunders
3d3592cd63 bug 798595 - remove useless prmem.h includes r=ehsan 2012-10-04 02:14:06 -04:00
Andrew Quartey
106c5d6f24 Bug 792581 - part 5: Replace LL_CMP macro with standard comparison. r=ehsan 2012-10-03 10:13:19 -04:00
Isaac Aggrey
997db4d142 Bug 791906: Replace NSPR integer limit constants with stdint ones; r=ehsan 2012-09-28 01:57:33 -05:00
Terrence Cole
68f1a7379e Bug 791322 - Move Rooted to js:: namespace; r=billm
These should not be part of the public API.

--HG--
extra : rebase_source : 00a69ee54f06e3f557cd9ec2f3b059df10aa32df
2012-09-24 18:08:22 -07:00
OHZEKI Tetsuharu
b810714776 Bug 791944 - Use Object.defineProperty() instead of __defineGetter__ in XPCOMUtils.defineLazyGetter(). r=mak77 2012-09-25 11:04:25 -04:00
Ehsan Akhgari
b5c39afb4e Bug 792502 - Kill the FunctionTimer code; r=vlad 2012-09-19 16:59:38 -04:00
Daniel Holbert
f32f6b5f8b Bug 789382: Change nsIScriptError methods init() and initWithWindowID() to take nsAString, rather than wchar / PRUnichar*. r=bz sr=bsmedberg 2012-09-09 16:29:12 -07:00
Bobby Holley
c466facab9 Bug 774607 - Remove use of JS_{Is,Make}SystemObject from Gecko. r=bz
We currently set this for system globals and anything whose parent
chain leads to a system global. Maybe this was relevant before, but
with CPG this is just equivalent to asking whether the object is in
a system compartment. And the only place where we _check_ this bit
is immediately after checking for a system compartment, in
WrapperFactory. So AFAICT this can go away entirely.
2012-09-05 11:32:07 -07:00
Randell Jesup
eedf93a21d Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04:00
Luke Wagner
a688f5b795 Bug 749371 - Break JS_ClearScope into two not-as-bad functions (r=mrbkap) 2012-08-23 11:23:28 -07:00
Matt Brubeck
5e47d4412f Back out 670c8a2695b3 (bug 771354), 134557d57e6e 4ad52e488977 (bug 774607), and...
036eb8c2a08a d4d36e3b948f 35334e820632 6bd07fd5147d d49e7c0d762c 407f19deb14c d84551808abb (bug 774633)
on a CLOSED TREE
2012-08-23 21:34:27 -07:00
Luke Wagner
94264a0bc8 Bug 625199 - s/JSAutoEnterCompartment/JSAutoCompartment/ and make it infallible (r=bholley)
--HG--
extra : rebase_source : 12acf2288285f5caefd7fecea8207de3a47eab5b
2012-08-21 18:42:53 -07:00
Bobby Holley
a2d7eabc5a Bug 774607 - Remove use of JS_{Is,Make}SystemObject from Gecko. r=bz
We currently set this for system globals and anything whose parent
chain leads to a system global. Maybe this was relevant before, but
with CPG this is just equivalent to asking whether the object is in
a system compartment. And the only place where we _check_ this bit
is immediately after checking for a system compartment, in
WrapperFactory. So AFAICT this can go away entirely.
2012-08-23 16:44:53 -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
Honza Bambas
541453729c Bug 215450: Allow uploading of files greater than 2gb in size. Involves making input streams 64-bit capable. Significant work done by Makoto Kato, finished by Honza Bambas. r=hbambas,bsmedberg,jdrew,sicking 2012-08-10 22:44:11 -04:00
Eric Faust
17695b5079 Bug 775788 - Modify JSFunctionSpec to accept JSJitInfos. (r=luke) 2012-08-07 22:26:19 -07:00
Benjamin Peterson
b97eb065c8 Bug 779724 - Use finer-grain source controls in the browser. r=jorendorff, sr=jst 2012-08-07 10:39:47 -07:00
Jim Mathies
378c4cc0b3 Bug 780511 - Pipe additional debug output to the Windows debugger, r=neil. 2012-08-06 15:41:40 -05:00
Mike Hommey
6173fa297f Bug 774032 bonus - Use @DEPTH@ and @relativesrcdir@ in Makefile.in. r=ted 2012-08-04 20:26:44 +02:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Bobby Holley
261a5477fd Bug 772288 - Waive Xray for target objects in Cu.import. r=mrbkap 2012-07-23 16:47:18 +02:00
Blake Kaplan
71e3941c1e Bug 769265 - Fix these calls. r=bent 2012-06-28 16:14:11 +02:00
Jason Orendorff
47aab0a000 Bug 753542 - Add prefs to enable/disable E4X (javascript.options.xml.content and .chrome). r=bsmedberg, sr=jst. 2012-06-06 21:52:14 -05:00
Geoff Lankow
00f3a215c9 Bug 749930 - Replace uses of nsILocalFile with nsIFile (compiled code only); r=bsmedberg 2012-06-06 14:08:30 +12:00
Jason Orendorff
9ec40fdc02 Bug 753885 - Part 2: Add JSOPTION_ALLOW_XML, making E4X support optional per-context. r=Waldo. 2012-05-30 15:05:59 -05:00
Jason Orendorff
80dda6d7a5 Bug 753885 - Part 1: Rename JSOPTION_XML to JSOPTION_MOAR_XML, and other cleanups. r=Waldo. 2012-05-30 15:05:58 -05:00
Nils Maier
35431284b1 Bug 754771 - Add identifying information to all system compartments. r=bz 2012-05-16 19:42:10 +02:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Benjamin Smedberg
4f91700da9 Bug 734847 part 2 - treewide changes resulting from the default-infallibility of hashtables; either remove useless result checks, or use the fallible version of APIs, depending on context, r=jlebar
--HG--
extra : rebase_source : 844b008c5167e6ca39a7ba9eeec8b30672938704
2012-05-18 13:30:49 -04:00
Tom Schuster
fb630ae705 Bug 752226 - Remove any use of JSVAL_IS_OBJECT. r=luke,Ms2ger 2012-05-11 17:46:26 +02:00
Ed Morley
79899a6f75 Backout 9b0fcaacb788 & bf3fef257e68 (bug 752226) for mochitest-other orange 2012-05-11 18:25:52 +01:00
Tom Schuster
1941fb1bb4 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
Bobby Holley
17aaa24bab Bug 749173 - Remove AutoPreserveCompartment. r=luke 2012-05-06 13:09:49 +02:00
Bobby Holley
c48d120359 Bug 747749 - Remove call to JS_SetGlobalObject in mozJSComponentLoader. r=luke 2012-04-26 20:40:11 +02:00
David Anderson
2b1abddde3 Remove simple JS_FrameIterator uses in xpconnect (bug 744617, r=bholley).
--HG--
extra : rebase_source : c206450cf46011543f58cded4c5aff2d49932afd
2012-04-16 12:25:28 -07:00
Makoto Kato
a41e6dd26b Bug 716333 - get rid of WithConversion (xpconnect part). r=bholley 2012-03-26 14:12:15 +09:00
Igor Bukanov
7296e0408c 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
766a2b3244 Backed out changeset 30798fdc5bad 2012-03-24 12:33:30 +01:00
Igor Bukanov
f8a4496d31 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
8775c56114 Backed out changeset f33e1e959036; r=bustage 2012-03-24 11:04:34 +01:00
Igor Bukanov
8e97874303 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
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
David Mandelin
68c407c176 Bug 733260 followup: use uint32_t for array and string lengths, r=luke
--HG--
extra : rebase_source : 1729b4b927fde0678872b9de62a7466381aa07c3
2012-03-06 15:52:55 -08:00
David Mandelin
5e02d0630c Bug 733260: remove typedef jsuint, r=luke
--HG--
extra : rebase_source : e8f576e1b5b189b47807c613c0cff79f5c8038e7
2012-03-05 18:43:45 -08:00
Bobby Holley
ccb745bc93 Bug 720580 - Stop passing aExtraPtr to InitClassesWithNewWrapedGlobal. r=mrbkap
We only ever pass null here anyway, and this whole infrastructure is going away real soon now.
2012-03-05 15:22:44 -08:00
Bobby Holley
2cb54e998b Bug 720580 - Remove unnecessary aIID parameter from nsIXPConnect::InitClassesWithNewWrappedGlobal. r=mrbkap 2012-03-05 15:22:44 -08:00
David Mandelin
0be0db4666 Bug 730511: remove obsolete typedefs intN, uintN, r=luke 2012-02-28 15:11:11 -08:00
Luke Wagner
e360e8fdf0 Bug 729584 - mozJSComponentLoader::ImportInto needs to wrap exceptions (r=bholley)
--HG--
extra : rebase_source : c5c575a789647348fcca5bf9ef5368873f0016f4
2012-02-23 13:50:01 -08:00
Marco Bonardo
3cb51695d8 Bug 722254 - Add an XPCOMUtils method to generate a singleton factory.
Use the new factory in Places js services, to ensure they can't be instanced multiple times.
r=bsmedberg
2012-02-07 10:17:42 +01:00
Igor Bukanov
08ee5eda35 bug 723021 - moving native stack limits into runtime. r=luke 2012-01-31 23:28:22 +01:00
Luke Wagner
deb78ef5af Bug 675078 - rm JSThreadData and JSThread (JSRuntime is now officially single-threaded) (r=igor,rs=mccr8)
--HG--
extra : rebase_source : f6d2c2c6083f4589691ede571159bfd7e7ef8701
2011-07-18 14:54:48 -07:00
Matt Brubeck
54f0eed49e Back out 79deba022227 (bug 675078) because of Win debug mochitest-other failures 2012-01-24 17:32:30 -08:00
Luke Wagner
411fc35146 Bug 675078 - rm JSThreadData and JSThread (JSRuntime is now officially single-threaded) (r=igor) 2011-07-18 14:54:48 -07:00
Ms2ger
2db789079c Bug 709086 - Don't use JS_GetParent in mozJSSubScriptLoader::LoadSubScript; r=jorendorff 2012-01-02 19:05:19 +01:00
Ms2ger
29d457f80c Bug 714057 - Remove uintn users from XPConnect; r=bholley+khuey 2012-01-02 19:05:19 +01:00
Ms2ger
51f59f0021 Bug 713645 - Remove superfluous inclusions of jscntxt.h; r=luke 2012-01-02 19:05:19 +01:00
Matt Brubeck
442a1b085f Merge mozilla-central and mozilla-inbound 2011-12-28 11:17:19 -08:00
Josh Matthews
a18ebbe4ab Bug 463122 - Propagate mozJSComponentLoader exceptions that occur while executing the script. r=mrbkap 2011-12-28 11:55:11 -05:00
Ms2ger
08d1075fb2 Bug 713550 - Move Base64 code on nsXPConnect to XPCOM / xpcpublic.h; r=bholley+khuey 2011-12-28 09:13:38 +01:00
Jeff Walden
841701c767 Bug 711647 - Add MOZ_DELETE to a bunch of deliberately-not-implemented methods across the tree. r=dbaron
--HG--
extra : rebase_source : 507006c0f099da6851b585d2062267d285978ad7
2011-12-16 14:42:07 -05:00
Phil Ringnalda
595ce8403f Bug 695345 - Bring back ISO8601DateUtils.jsm, a=akeybl 2011-12-18 18:50:13 -08:00
Ms2ger
b69c913b12 Bug 705188 - Use IDL for mozIJSSubScriptLoader::LoadSubScript, {xpcIJSModuleLoader,nsIXPCComponents_Utils}::Import; r=bz 2011-12-18 11:09:16 +01:00
John Schoenick
1c874917cd Bug 687679 - Rename JS_CompileFile to JS_CompileUTF8File, fix users. r=jorendorff,jst 2011-12-16 11:08:59 -08:00
Ms2ger
c3c3bdba73 Backed out changeset ba447ace2594 (bug 687679) for bustage. 2011-12-16 21:17:16 +01:00
John Schoenick
a355d623f2 Bug 687679 - Rename JS_CompileFile to JS_CompileUTF8File, fix users. r=jorendorff,jst 2011-12-16 11:08:59 -08:00
Jeff Walden
87d3f92e61 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
Mike Hommey
57f9bdde28 Bug 695843 part 9 - Use FileLocations in the component manager. r=bsmedberg 2011-11-08 18:10:51 +01:00
Mike Hommey
1c5ea5be3e Bug 695843 part 8 - Properly handle jar-in-jars when importing modules. r=mrbkap 2011-12-08 11:03:36 +01:00
Mike Hommey
1d5e489323 Bug 695843 part 7 - Use the URI string as the key for the various mozJSComponentLoader hashtables. r=mrbkap 2011-11-08 18:08:49 +01:00