Commit Graph

39 Commits

Author SHA1 Message Date
Bobby Holley
8dae0fc8ce Bug 1070696 - Rename xpc::GetNativeForGlobal to xpc::NativeGlobal and make it accept non-global JSObjects. r=smaug
The method is infallible, and making the callers invoke
js::GetGlobalForObjectCrossCompartment manually is dumb.
2014-09-21 21:31:53 +02:00
Bob Owen
4c0208e9f2 Bug 1046647 - Part 4: Replace nsCxPusher in nsDocShell::AddState. r=bholley 2014-08-05 17:18:30 +01:00
Steve Fink
03f42f68f4 Bug 912456 - transferable MessagePorts, r=jorendorff
--HG--
extra : rebase_source : 5b8a2a9b261c53f0ff5a860e1dc2e7ede711105f
2013-11-14 20:42:34 -08:00
Tom Schuster
e64b35e141 Bug 939294 - Change xpidl jsval to handles. r=gabor,bz,khuey,bsmedberg,terrence 2014-01-09 18:39:36 +01:00
Tom Schuster
306cb13efc Bug 930782 - Handlify JS_WrapValue. r=terrence 2013-10-26 18:19:05 +02:00
Terrence Cole
40bc663533 Bug 929800 - Handlify the structured clone interface; r=sfink,smaug
--HG--
extra : rebase_source : 4f21dd799ad27dc665997d4912996a500ae8a2f2
2013-10-22 17:18:32 -07:00
Nicholas Nethercote
9ce6c39a8f Bug 905017 (part 2, attempt 2) - Move structured clone stuff from jsapi.{h,cpp} and jsclone.{h,cpp} to js/StructuredClone.{h,cpp}. r=billm.
--HG--
rename : js/src/jsclone.cpp => js/src/vm/StructuredClone.cpp
extra : rebase_source : 2699588c63ef58ab84bc8c63adc0487648af3834
2013-08-19 23:43:47 -07:00
Ms2ger
f79ae70d10 Backout changesets 7e6fb33fdf22:c85332df4320 (bug 905017) for windows bustage. 2013-08-22 10:16:30 +02:00
Nicholas Nethercote
4caa0f8ea2 Bug 905017 (part 2) - Move structured clone stuff from jsapi.{h,cpp} and jsclone.{h,cpp} to js/StructuredClone.{h,cpp}. r=billm.
--HG--
rename : js/src/jsclone.cpp => js/src/vm/StructuredClone.cpp
extra : rebase_source : ecce9699ddb45535aa94d5e3add901f5a8620c46
2013-08-19 23:43:47 -07: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
Johnny Stenback
4c163e91d9 Bug 859707. Convert History to WebIDL bindings. r=bz 2013-08-09 23:47:59 -07:00
Nicholas Nethercote
b756f6b258 Bug 898914 (part 1) - Remove JSBool.
--HG--
extra : rebase_source : 2d202e0e5005a7f54724b1540481c15cde3ad52e
2013-08-08 15:53:04 -07: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
c51cf39661 Bug 868634 - Remove compartment entry in nsStructuredCloneContainer. r=bz
I can't see what this is supposed to be doing. The one caller defaults to aCx,
and if not, gets and pushes a context associated with the document, restoring
it to the default compartment.

So this only changes the behavior when we use the aCx that comes in from above,
in which case it's totally not clear to me why we would want to get the default
global here.
2013-05-07 14:18:03 -07:00
David Zbarsky
d4b3d0a59f Bug 868312: Various dom rooting fixes r=bz 2013-05-04 03:52:57 -04:00
Bobby Holley
8490fc8be1 Bug 865729 - Remove nsIJSContextStack from dom/foo. r=gabor 2013-04-29 11:16:18 -07:00
Jose Cortes
5a8bc5381c Bug 842186 - Replace use of jsval with JS::Value in dom/base. r=jwalden
From 1a684ed61615d32965201e55335478d5f403ac4a Mon Sep 17 00:00:00 2001
 cpp files in the dom/base/ directory. r=jwalden
---
 dom/base/Crypto.cpp                     |  3 +-
 dom/base/DOMRequest.cpp                 | 12 +++---
 dom/base/DOMRequest.h                   |  4 +-
 dom/base/Navigator.cpp                  | 10 ++---
 dom/base/nsDOMJSUtils.h                 |  6 +--
 dom/base/nsDOMWindowUtils.cpp           | 20 ++++-----
 dom/base/nsGlobalWindow.cpp             | 24 +++++------
 dom/base/nsIJSNativeInitializer.h       |  4 +-
 dom/base/nsJSEnvironment.cpp            | 73 +++++++++++++++++----------------
 dom/base/nsJSEnvironment.h              |  8 ++--
 dom/base/nsJSTimeoutHandler.cpp         |  4 +-
 dom/base/nsJSUtils.h                    |  2 +-
 dom/base/nsStructuredCloneContainer.cpp | 10 ++---
 13 files changed, 91 insertions(+), 89 deletions(-)

--HG--
extra : rebase_source : af1420550a745aba9fd6c20297ac3cd0075f5ead
2013-04-11 18:52:10 -04:00
Ms2ger
8834dd56c9 Bug 845374 - Part j: Stop including nsIXPCScriptable.h in nsContentUtils.h; r=khuey 2013-03-17 08:55:15 +01:00
Bobby Holley
6c8aaf6e25 Bug 834732 - Make nsDocShell::AddState push the JSContext if it grabs one, and remove push in nsStructuredCloneContainer. r=mrbkap
This gets rid of one of the last consumers of REQUIRE_SCRIPT_CONTEXT.
2013-02-26 11:04:10 -08:00
Bobby Holley
997dcc7d65 Bug 834732 - Get rid of footgun bool param for nsCxPusher and use an explicit enum. r=mrbkap
The goal here is to get rid of this crap entirely, and make nsCxPusher always
push. But that's a scary change, so we do it in chunks. This patch, in particular,
should have zero behavioral change. This means preserving some very wrong behavior.
For instance, currently SafeAutoJSContext never pushes a damn thing, because the
safe JSContext doesn't have an associated nsIScriptContext. We preserve this
behavior, and in fact convert various similarly-buggy consumers to
SafeAutoJSContext, so that we can hoist the behavioral change into a subsequent
patch.
2013-02-26 11:04:09 -08:00
Nicholas Nethercote
bd7d66d93a Bug 824883 - Fix three warnings in dom/ code. r=bz.
--HG--
extra : rebase_source : 3763606a23b66493596787ca33cec32618efa2f1
2012-12-26 20:24:59 -08:00
Isaac Aggrey
cbb17fe7b2 Bug 794510: Part 2: Use more stdint types instead of protypes.h types; r=ehsan 2012-10-11 18:38:04 -05:00
Andrea Marchesini
2cfa5a3d14 Bug 720083 - Workers: add support for transferable objects from HTML5 spec. r=sphink, r=bent 2012-10-03 18:19:22 -04:00
Phil Ringnalda
e587aae42c Back out b24a73b2c617 for Windows build bustage and test_xhr_timeout.html failure 2012-09-27 21:24:42 -07:00
Andrea Marchesini
7f0785e84a Bug 720083 - Workers: add support for transferable objects from HTML5 spec. r=sphink, r=bent 2012-09-27 23:05:59 -04:00
Randell Jesup
eedf93a21d Bug 773151: Convert nsCAutoString->nsAutoCString CLOSED TREE r=bsmedberg 2012-09-01 22:35:17 -04: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
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
David Zbarsky
ae718ee1c0 Bug 763350 - Clean up some includes in content/ and dom/ r=smaug 2012-07-01 16:45:59 -07:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Bobby Holley
ff990375c6 Bug 738956 - Wrap values in nsStructuredCloneContainer::InitFromVariant before passing them to JS_WriteStructuredClone. r=khuey 2012-03-27 11:43:11 -07:00
Landry Breuil
7c17983218 Bug 714332 - Fix uint64 types usage in dom/workers and dom/base; r=bent
Use uint64_t where appropriate for mData, fails to build on OpenBSD
otherwise with wrong casts/no matching template.

dom/base/nsStructuredCloneContainer.cpp:96: error: invalid conversion from 'PRUint64*' to 'uint64_t*'
dom/base/nsStructuredCloneContainer.cpp:131: error: invalid conversion from 'PRUint64*' to 'uint64_t*'
dom/workers/WorkerPrivate.cpp:822: error: no matching function for call to 'JSAutoStructuredCloneBuffer::steal(uint64**, size_t*)'
../../dist/include/jsapi.h:4641: note: candidates are: void
JSAutoStructuredCloneBuffer::steal(uint64_t**, size_t*, uint32_t*) <near
match>
dom/workers/WorkerPrivate.cpp:833: error: no matching function for call to 'JSAutoStructuredCloneBuffer::adopt(uint64*&, size_t&)'
../../dist/include/jsapi.h:4634: note: candidates are: void
JSAutoStructuredCloneBuffer::adopt(uint64_t*, size_t, uint32_t) <near
match>
dom/workers/WorkerPrivate.cpp:853: error: no matching function for call to 'JSAutoStructuredCloneBuffer::steal(uint64**, size_t*)'
../../dist/include/jsapi.h:4641: note: candidates are: void
JSAutoStructuredCloneBuffer::steal(uint64_t**, size_t*, uint32_t*) <near
match>
2012-01-02 19:08:14 +01: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
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
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
Justin Lebar
ec8f99b5de Bug 656991 - Followup. Use JS_free instead of free. r=bz
--HG--
extra : rebase_source : 00e5cc27f067a191e7a834852faee8c788feb061
2011-05-16 16:36:12 -04:00
Justin Lebar
66eadc7e21 Bug 656991 - Fix leak in nsStructuredCloneContainer::InitFromVariant. r=bz,igor 2011-05-15 20:29:19 -04:00
Justin Lebar
8ce3ec96a2 Bug 551225 - Make pushState use structured clone. r=zpao, sicking 2011-04-24 22:30:54 -04:00