Commit Graph

18360 Commits

Author SHA1 Message Date
Igor Bukanov
b2f0cd3a2f bug 730221 - followup to bump XDR version number as the previously landed changeset made incompatible changes to xdr format. r=bugzilla_comment 2012-03-21 19:14:42 +01:00
Hessam Salehi
7d69570885 Bug 474505 - Replace uses of nsVoidPtrHashkey with nsPtrHashKey<T>; r=bsmedberg 2012-03-21 14:07:31 -04:00
Luke Wagner
792d416eee Bug 737388 - Put back piece of prologue accidentally removed earlier (r=bhackett) 2012-03-21 01:51:11 -07:00
Brian Hackett
1b9f03e039 Use singleton types for global object initializers, bug 731398. r=dvander 2012-03-21 07:37:43 -06:00
Brian Hackett
791a99843d Update type sets persistently for arithmetic on objects, bug 733979. r=billm 2012-03-21 06:32:18 -06:00
Luke Wagner
c76d3c7c21 Bug 736555 - don't use magic values to implement deleted args (r=bhackett)
--HG--
extra : rebase_source : f4e3f63512acb2ff8ee874de2d718bd7877932d6
2012-03-14 17:19:17 -07:00
Luke Wagner
7b7d34d1b2 Bug 737575 - fix arguments['integer'] (r=dvander)
--HG--
extra : rebase_source : 5cb580a47187f2a88a98efc3fa8a88ee4c8bc551
2012-03-20 17:21:58 -07:00
Terrence Cole
7c61b7fb78 Bug 737221 - Add a missing pre barrier on jsid strings; r=billm
--HG--
extra : rebase_source : 970b91446c7703966aa6f397ac40d8d9d486f796
2012-03-20 16:03:50 -07:00
Steve Fink
9be8331544 Fix --enable-dtrace build failure from bug 737195. r=npotb, DONTBUILD 2012-03-20 12:48:43 -07:00
Terrence Cole
0cf4763bf0 Bug 737195 - Add barriers to JSFunction::atom; r=billm
This is only ever initialized, so it needs generational barriers, but not
incremental barriers.
2012-03-19 17:24:05 -07:00
Bobby Holley
e3ef16972d Bug 738874 - Don't allow non-classinfo XPCWNs to be wrapped cross-compartment. r=mrbkap 2012-03-25 22:35:50 -07:00
Makoto Kato
6736ffe11b Bug 716333 - get rid of WithConversion (xpconnect part). r=bholley 2012-03-26 14:12:15 +09: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
Matt Brubeck
21e24f0ef9 Merge mozilla-central and mozilla-inbound 2012-03-24 09:05:27 -07:00
Masatoshi Kimura
749ec9839a Bug 736686 - Part 1: Make dictionary initializers callable off main thread. r=khuey 2012-03-24 12:33:49 +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
Matt Brubeck
3057ab345d Merge mozilla-central and mozilla-inbound 2012-03-19 16:47:00 -07:00
Luke Wagner
7a6b47a381 Bug 736807 - Fix test added by fc8534cfca3d to test for gczeal (r=orange) 2012-03-19 11:47:23 -07:00
Luke Wagner
176cb177d1 Bug 736807 - InitExnPrivate needs to root values since they can now be wrapped (r=bholley)
--HG--
extra : rebase_source : 4aeb6c6b271588c57c4b6e166c630a72c8c7d0d5
2012-03-19 10:49:12 -07:00
Mike Hommey
603769b284 Bug 733773 - Reset default values for thumb, float-abi, etc. when --with-arch is specified. r=ted 2012-03-13 09:47:03 +01:00
Jesse Ruderman
ae4faf428d Bug 736795 - Some shell help() messages have extra periods 2012-03-17 22:24:07 -07:00
David Mandelin
6ab5b174aa Bug 726794: clean up some WTF Platform.h macros, r=dvander
--HG--
extra : rebase_source : 1969660fdeda9c426c9e37a68fc067786ef79d58
2012-03-16 17:02:52 -07:00
Bill McCloskey
8a370df06f Bug 736643 - Add timestamp support to GC/CC JSON output (r=terrence) 2012-03-16 16:36:26 -07:00
Jim Blandy
00ec77b58e Bug 734454: Use a table to declare atoms. r=waldo 2012-03-16 16:15:31 -07:00
Jim Blandy
f0861f366e Bug 734454: Minor cleanups to atom declarations and definitions, in preparation for conversion to a table. r=waldo 2012-03-16 16:15:31 -07:00
Igor Bukanov
ed3f5972bd bug 736978 - remove JS_FinalizeStub. r=:billm
Currently the GC finalizes on the background thread only objects with null
JSClass::finalize. However, this implies that any object that uses
JS_FinalizeStub for the finalizer would be prevented from the background
finalization.

To fix this the patch removes JS_FinalizeStub replacing it with NULL in all
cases when the class has no custom finalizer. For style consistency the patch
also removed the usage of JSCLASS_NO_OPTIONAL_MEMBERS in the static
declarations as the compiler fills the missing fields with null in any cases.
2012-03-19 15:27:58 +01:00
Prabindh Sundareson
e9c8c2fdde Bug 735594 - Add check for MOZ_JSDEBUGGER so that --enable-jsd=no works. r=bholley+khuey 2012-03-15 20:12:45 -04:00
Jared Wein
5c1c03e064 Bug 730318 - Implement a way for chrome js to enumerate the plugin objects on a page for activation. r=khuey 2012-03-27 13:50:50 -07:00
Andrew McCreight
a2f68f19c5 Bug 736563 - mark global objects held by live windows black during GC. r=smaug 2012-03-27 12:22:10 -07:00
Bobby Holley
89832a4812 Bug 738956 - Wrap values in nsStructuredCloneContainer::InitFromVariant before passing them to JS_WriteStructuredClone. r=khuey 2012-03-27 11:43:11 -07:00
Bill McCloskey
d0f06adfac Bug 738841 - Fix handling of 'this' in methodjit without TI (r=bhackett) 2012-03-27 10:54:04 -07:00
Luke Wagner
dc718f1471 Bug 739494 - rm JSOP_DEFLOCALFUN (r=bhackett)
--HG--
extra : rebase_source : bb055d312548d6f04096e2320838addfbffd65fc
2012-03-26 22:08:03 -07:00
Luke Wagner
2679471c45 Bug 737552 - Remove 'funargs' (r=jimb)
--HG--
extra : rebase_source : 768b5b36503747a7ab95cc745439be4c36e64168
2012-03-20 11:18:37 -07:00
Luke Wagner
5db503d729 Bug 737570 - Fix handling of overwritten arguments via non-toplevel function statement named 'arguments' (r=waldo)
--HG--
extra : rebase_source : 91a45e78412a86f647375485fcd038505a134f0d
2012-03-19 19:22:59 -07:00
Bill McCloskey
610d48849d Bug 736605 - Add more timers to GC statistics (r=terrence) 2012-03-16 14:55:56 -07:00
Bobby Holley
948121e077 Bug 596351 - Proxies should throw TypeErrors for assignments to read-only properties in ES5 strict mode. r=luke 2012-03-16 12:47:21 -07:00
Bobby Holley
a150898fc0 Bug 734475 - Take the full union of native sets when bringing non-PreCreate XPWNs across compartments. r=mrbkap 2012-03-16 12:47:20 -07:00
Luke Wagner
a9aaa7d6ba Bug 736012 - Unwind current frame on failure to enter jit code from loop header (r=bhackett)
--HG--
extra : rebase_source : 5dcfb53368a6f816b44d26cf43b564f1525d74bb
2012-03-16 10:04:17 -07:00
Terrence Cole
f6713d22de Bug 730961 - Make internal marking interface indirect; r=billm
Now that all of the marking interface users use indirect marking, we can pass
through the indirection internally and stop passing every object through the
stack.
2012-03-14 14:07:16 -07:00
Peter Van der Beken
299c3b3d05 Fix for bug 736229 (Stop storing expando objects in the wrapper cache, store the proxy instead). r=jst. 2012-03-14 15:22:10 +01:00
Marco Bonardo
312ed3ed80 Merge inbound and central 2012-03-16 13:42:16 +01:00
Ms2ger
a494664e3f Bug 722154 - Part f: Remove custom quickstubs for vertexAttrib[1-4]fv; r=bjacob 2012-03-16 10:53:41 +01:00
Ms2ger
3456d2d5e4 Bug 722154 - Part e: Remove custom quickstubs for uniform[1-4][i,f]v and uniformMatrix[2-4]fv; r=bjacob 2012-03-16 10:52:42 +01:00
Ms2ger
d5d2b74974 Bug 722154 - Part d: Remove custom quickstub for readPixels; r=bjacob 2012-03-16 10:50:51 +01:00
Ms2ger
58d4fde71b Bug 722154 - Part c: Remove custom quickstubs for compressedTexImage2D and compressedTexSubImage2D; r=bjacob 2012-03-16 10:50:33 +01:00
Ms2ger
3850828e22 Bug 722154 - Part b: Remove custom quickstub for bufferSubData; r=bjacob 2012-03-16 10:50:18 +01:00
Ms2ger
b3ff1e4405 Bug 722154 - Part a: Remove custom quickstub for bufferData; r=bjacob 2012-03-16 10:50:00 +01:00
Ms2ger
090a26ea3d Bug 550309 - Part e: Remove custom quickstub for getImageData and return an actual ImageData; r=bz 2012-03-16 10:48:55 +01:00
Ms2ger
7ea9d494ee Bug 550309 - Part c: Implement ImageData; r=bz 2012-03-16 10:44:08 +01:00
Bobby Holley
0ac4c57a81 Bug 735826 - Fix jit-tests for browser builds on mac. r=dmandelin 2012-03-15 19:47:06 -07:00
Bobby Holley
2f9f8383f8 Bug 736316 - Components.utils.getGlobalForObject should unwrap cross-compartment wrappers. r=khuey 2012-03-15 19:47:06 -07:00
Jeff Walden
59b081a07d Bug 735313 - StringBuffer still needs length validation. r=luke 2012-03-14 15:29:29 -07:00
Ryan VanderMeulen
5f5c3e0dbd Backout ca1873b20652 (bug 735594) due to mochitest-4 orange. r=http://i.qkme.me/36kr7a.jpg 2012-03-15 21:27:51 -04:00
David Mandelin
2cf98e5ce6 Bug 728623: disable jitcode address randomization on Win64, r=dvander 2012-03-14 17:36:34 -07:00
Matthew Gregan
7bec686e54 Bug 734784 - Update system-headers to reflect changes to libvpx includes. r=cpearce 2012-03-15 12:06:02 +13:00
Jeff Walden
506f58f3c4 Back out bug 735313, an invariant was relaxed but not all assertions of it were adjusted properly, and I'm not 100% confident tinderboxen will correctly handle the new failure mode. r=bustage 2012-03-14 15:24:51 -07:00
Prabindh Sundareson
e814c5d876 Bug 735594 - Add check for MOZ_JSDEBUGGER so that --enable-jsd=no works. r=bholley 2012-03-15 20:12:45 -04:00
Jeff Walden
2b8b6c9759 Bug 735313 - StringBuffer still needs length validation. r=luke 2012-03-14 12:41:15 -07:00
Ehsan Akhgari
83186bf501 Backout changeset ea6be5f60c42 (bug 722946) for breaking Windows builds 2012-03-14 14:29:58 -04:00
Terrence Cole
f8733065ed Bug 722946 - Add method to HashTable for inline rekeying/removal; r=luke
It is possible in several places to have unconstrained client objects as the key
of a HashMap/HashSet.  For generational and compacting GC, we will need to move
these objects in memory.  This means we will need to remove and re-insert these
keys in a new location, during GC.  Because we cannot safely allocate memory
for this, we need a specialized algorithm inside the HashTable itself.
2012-02-03 15:43:34 -08:00
Terrence Cole
abaf272fb9 Bug 734517 - Fix barriering of funName in InitExnPrivate; r=billm
InitExnPrivate needs to trigger barriers when copying out to the heap, but not
when copying data into the on-stack vector.
2012-03-12 18:32:39 -07:00
Blake Kaplan
2c581e8da4 Bug 727884 - Make nsWrapperCache::WrapObject take a JSObject scope instead of XPCWrappedNativeScope. r=peterv 2012-03-14 16:25:40 +01:00
Brian Hackett
9cafbe15fa Don't generate addprop PIC for JSOP_SETNAME, bug 735161. r=dvander 2012-03-14 08:11:14 -07:00
Jacek Caban
70b87ca690 Bug 729067 - configure.in changes LDFLAGS before calling js/src/configure r=glandium 2012-03-14 15:07:34 +01:00
Mike Hommey
245ca066a4 Bug 716544 - Only define android bionic headers as system headers, and only use stlport includes when compiling C++. r=khuey 2012-03-13 09:47:02 +01:00
Ekanan Ketunuti
0fb802fc1b Bug 722180 - Remove error codes for proxies. r=khuey 2012-02-01 18:53:29 +07:00
Bobby Holley
3b2b440f54 Bug 735544 - Allow exception stacks to cross compartment boundaries. r=luke 2012-03-15 15:19:52 -07:00
Terrence Cole
f0d6b86912 Bug 736168 - Remove MarkablePtr; r=billm
Now that the marking indirection work is complete, this is no longer used and
should be removed.

--HG--
extra : rebase_source : e8116e9680c5a2005d0f9e6aea774b292cdca59c
2012-03-15 11:14:14 -07:00
Luke Wagner
a15b5ea71e Bug 733950 - re-add the f.apply(arguments) optimization (r=bhackett) 2012-02-10 16:31:48 -08:00
Luke Wagner
f3939cce37 Bug 733950 - create arguments object eagerly (r=bhackett)
--HG--
rename : js/src/jsfun.cpp => js/src/vm/ArgumentsObject.cpp
2012-01-17 16:35:12 -08:00
Luke Wagner
4d11f631ed Backed out changeset d2107141265f to fix message 2012-03-15 10:39:02 -07:00
Luke Wagner
de282a3b73 Backed out changeset 8f3b804118ef to fix message 2012-03-15 10:37:24 -07:00
Luke Wagner
435531d3a4 Bug 730497 - re-add the f.apply(arguments) optimization (r=bhackett)
--HG--
rename : js/src/jsfun.cpp => js/src/vm/ArgumentsObject.cpp
extra : rebase_source : 28c9c4c7ea9841ea42142cf88d1091d20a4f7f9d
2012-02-10 16:31:48 -08:00
Luke Wagner
f81c65703b Bug 730497 - create arguments object eagerly (r=bhackett)
--HG--
rename : js/src/jsfun.cpp => js/src/vm/ArgumentsObject.cpp
extra : rebase_source : 78e9eccc7c3dd4570d2f78f7b5b5eb2138813e99
2012-01-17 16:35:12 -08:00
Luke Wagner
7db6258ebf Bug 730497 - rm flat closures (r=bhackett,waldo)
--HG--
extra : rebase_source : cf704765ad227abced9e8804aaeb1dc8d12fc5a8
2012-02-27 23:49:02 -08:00
Terrence Cole
0d9d3bda35 Bug 722946 - Add method to HashTable::Enum for inline rekeying; r=luke
It is possible in several places to have unconstrained client objects as the key
of a HashMap/HashSet. For generational and compacting GC, we will need to move
these objects in memory. This means we will need to remove and re-insert these
keys in a new location, during GC. Because we cannot safely allocate memory for
this, we need a specialized algorithm inside the HashTable itself.
2012-03-14 13:48:59 -07:00
Steve Fink
d5521267b6 Bug 735118 - Add a --debugger flag on jstests.py to allow setting the debugger name and args to use. r=dmandelin
--HG--
extra : rebase_source : 19d4aaeaf8ddbe83d7b529cafd472e1edae783c1
2012-03-13 14:21:58 -07:00
Steve Fink
275ff2ea23 Bug 735519 - Fix a bunch of "inlined function used but not defined" warnings. r=dmandelin
--HG--
extra : rebase_source : 3886a738be227a90f78b872dc17c308b2f9ebcc5
2012-03-14 12:28:48 -07:00
Terrence Cole
77273dc17b Bug 735533 - Don't copyright empty files; r=dmandelin 2012-03-13 17:21:06 -07:00
Terrence Cole
370e1eba06 Bug 735491 - Fix possible recursion when tracing Debugger objects; r=billm
--HG--
extra : rebase_source : 9a1365dd7dffdd4a34f2390bc1739b490369cbe5
2012-03-13 15:38:05 -07:00
Ed Morley
abcf43a320 Merge mozilla-central to mozilla-inbound 2012-03-13 20:52:11 +00:00
Lukas Blakk
b307cc1a9c Merging in version bump NO BUG 2012-03-13 13:38:38 -07:00
Kyle Huey
4342ab2ff7 No bug: Fix ply being stupid, take 2. r=me 2012-03-13 10:31:53 -07:00
David Mandelin
eca22bdb78 Bug 704259: part 2, don't set cx->generatingError in JS_ReportPendingException, r=luke 2012-03-06 18:49:05 -08:00
David Mandelin
0c352d36f8 Bug 704259: part 1, refactor use of cx->generatingError without changing behavior, r=luke
--HG--
extra : rebase_source : 748e23ae07d8dc3c2cec165228d858abfc6a535f
2012-03-06 18:49:00 -08:00
Terrence Cole
2fc27e9994 Bug 531396 - Expose detailed GC timing information API; r=smaug,billm
Extensions such as MemChaser would really like an easier to parse and more
complete record of GC events than what can be gleaned from the message console.
This patch adds GC and CC observer messages formatted as JSON containing
detailed statistics.
2012-03-05 15:33:24 -08:00
Brian Hackett
cc4b062387 Disable regexp cloning optimization for global/sticky regexps, bug 728021. r=dmandelin 2012-03-13 08:37:52 -07:00
Marco Bonardo
80af6e193a Merge last green PGO from inbound to central 2012-03-13 11:17:21 +01:00
Masatoshi Kimura
d1e291fd89 Bug 721569 - Implement Blob constructor. r=sicking 2012-03-12 21:44:56 -07:00
Masatoshi Kimura
c76813f196 Bug 721569 - Implement nullable types. r=khuey 2012-03-12 21:44:51 -07:00
Masatoshi Kimura
9105b69daf Bug 721569 - Support default values for Web IDL dictionaries. r=khuey CLOBBER BUILD 2012-03-12 21:44:48 -07:00
Bill McCloskey
191348bbdb Back out 85ffbb752398 and 8cae4bde9534 (bug 728686 and bug 734946) due to possible leaks 2012-03-12 22:43:43 -07:00
Bill McCloskey
4cf745b8ad Bug 728686 - JS_NewPropertyIterator shouldn't disable IGC (r=igor) 2012-02-21 17:04:53 -08:00
Bill McCloskey
3a3e68ebf0 Bug 728686 - JS_NewPropertyIterator shouldn't disable IGC (r=igor) 2012-02-21 17:04:53 -08:00
David Mandelin
def552f2d2 No bug, mark slow test, r=me 2012-03-12 18:16:14 -07:00
David Mandelin
5a6ef8737b No bug, fix MSVC warnings, r=none 2012-03-12 18:12:54 -07:00