Commit Graph

5366 Commits

Author SHA1 Message Date
Sebastian Hengst
3cfa07e6d2 Bug 1304829 - Rename test_xrayToJS.xul's isReleaseBuild to isReleaseOrBeta. r=gabor
MozReview-Commit-ID: GCPbc0IfzTN
2016-10-08 11:15:44 +02:00
Jon Coppeard
123936bacd Bug 1306382 - Automatically ExposeToActiveJS when reading out of a TenuredHeap<T> r=sfink r=mccr8 2016-10-07 13:58:37 +02:00
Tom Schuster
774a8bf34d Bug 1302163 - Change code to use SprintfLiteral instead of snprintf. r=ehsan 2016-10-04 17:57:51 +02:00
Tom Schuster
4e49d5103f Bug 1303714 - Always Unwrap ArrayBuffer in TypedArray constructor. r=bholley 2016-10-03 21:19:09 +02:00
Terrence Cole
0edc10380c Bug 1297558 - Use a read barrier on Heap to ExposeToActiveJS r=sfink r=mccr8 2016-02-07 09:08:55 -08:00
Tooru Fujisawa
681cacc1f6 Bug 1290337 - Part 15: Replace Value parameter to const Value& in js/xpconnect. r=jandem 2016-09-11 18:15:24 +09:00
Carsten "Tomcat" Book
6636b09ddd merge mozilla-inbound to mozilla-central a=merge 2016-09-30 12:02:16 +02:00
Sylvestre Ledru
f833237445 Bug 1302401 - This check is responsible for using the auto type specifier for variable declarations to improve code readability and maintainability. r=Waldo
MozReview-Commit-ID: 5elj65A6dzO

--HG--
extra : rebase_source : 2696ee83dab7856cb8f599ef9f3c13fd4cd5e5f7
2016-09-13 14:23:04 +02:00
Tooru Fujisawa
10dd75211d Bug 1289050 - Part 2: Use ASCII or Latin1 variants of JS_ReportError in not-simple cases. r=jwalden 2016-08-15 19:20:01 +09:00
Tooru Fujisawa
8dff9a4d76 Bug 1289050 - Part 10: Use Latin1 variant of JS_ReportErrorNumber for strerror. r=jwalden 2016-08-16 03:11:59 +09:00
Tooru Fujisawa
13d64d6825 Bug 1289050 - Part 3.1: Add mozJSComponentLoader::Location and use UTF8 variant of JS_ReportError in mozJSComponentLoader. r=jwalden 2016-09-30 12:34:44 +09:00
Tooru Fujisawa
215be0c5d2 Bug 1289050 - Part 3: Use UTF8 variant of JS_ReportError after re-encoding string. r=jwalden 2016-08-15 19:20:04 +09:00
Tooru Fujisawa
f2542c1849 Bug 1289050 - Part 2.1: Use JS_ReportErrorLatin1 in mozJSComponentLoader::LoadModule. r=jwalden 2016-09-30 12:34:43 +09:00
Tooru Fujisawa
6d493d48ec Bug 1289050 - Part 1: Use ASCII variant of JS_ReportError in simple case. r=jwalden 2016-08-14 20:39:28 +09:00
Phil Ringnalda
556a8f6ea1 Backed out 3 changesets (bug 1301301) for crashing
Backed out changeset da70c5abd73a (bug 1301301)
Backed out changeset 6186eae0c2b7 (bug 1301301)
Backed out changeset 45fb9c1ce63a (bug 1301301)
2016-09-27 19:49:17 -07:00
Andrew McCreight
9d11cb0868 Bug 1301301, part 3 - Implement Begin and EndCycleCollectionCallback in CCJSContext. r=smaug
This will let my later patch run code at the start and end of each CC.

This patch should not change any behavior.

MozReview-Commit-ID: Fu6v3wo8qKB
2016-09-26 10:19:07 -07:00
Ehsan Akhgari
0baf8d2b40 Bug 1300908 - Avoid using expanded principals as the loading principal of XHR; r=smaug 2016-09-27 14:11:28 -04:00
Thomas Wisniewski
ba6cb5196e Bug 1305202 - Use NullString() more and remove superfluous Truncates(). r=smaug 2016-09-23 21:10:01 -04:00
Andrew McCreight
5b9c57b7a2 Bug 1301301, part 1 - Unify NoteJSObject and NoteJSScript into NoteJSChild. r=smaug
This will let my next patch pass in other GC things.

This should not change behavior in any important way.

MozReview-Commit-ID: FykviKKvQzI
2016-09-23 15:42:13 -07:00
Jan de Mooij
ff16d58af3 Backed out changeset aad183efb09a (bug 1303754) for regressions. 2016-09-23 09:50:47 +02:00
Terrence Cole
02f5e80db6 Bug 1245316 - Use Rooted<GCVector> to implement AutoVector; r=sfink
--HG--
extra : rebase_source : 24a7c4e21ea94820d94a4e8454044e4f1988365e
2016-09-22 17:01:38 -07:00
Ehsan Akhgari
f993ff03ab Bug 1297687 - Part 4: Specify an OriginAttribute for the XBL content's expanded principal; r=bholley 2016-09-22 13:27:58 -04:00
Ehsan Akhgari
e45aad00ec Bug 1297687 - Part 3: Ensure that the expanded principal of a sandbox has a sensible OriginAttributes; r=bholley
This patch allows specifying an OriginAttributes when creating a sandbox
using Components.utils.Sandbox() by specifying an originAttributes
member on the options dictionary.

If an OA is specified in this way, it is used for creating codebase
principals from the string arguments passed to the function.  Otherwise,
if one or more principals are passed in the array argument to Sandbox(),
the OA of the principal(s) is used to construct codebase principals from
the strings inside the array.  In this case, we check to make sure that
all of the passed principals have the same OA, otherwise we'll throw an
exception.

In case no explicit OA is specified and no principals are passed in the
array argument, we create the codebase principals using a default OA.
2016-09-22 13:27:51 -04:00
Steve Fink
3d7c5d34f5 Bug 1303461 - Limit Android stack size to 3/4 of the actual 1MB, r=jandem
--HG--
extra : rebase_source : fc0994289923f36c577dd97e1d5eb35747102e36
2016-09-19 10:08:18 -07:00
Benjamin Bouvier
b81b572a1c Bug 1303013: Account memory for wasm guard pages; r=njn, r=luke
MozReview-Commit-ID: BHS1UfgT1yf

--HG--
extra : rebase_source : 7fea9606f776a904870fdfb4bbb93e43fd4b0a44
2016-09-19 19:39:50 +02:00
Jan de Mooij
3b07adfba8 Bug 1303754 - Don't use the lazySource option for JSMs, so we can benefit from syntax parsing. r=bholley 2016-09-22 10:15:36 +02:00
Tom Schuster
2f144c36e0 Bug 1299593 - Disable Array.prototype.values outside Nightly. r=jorendorff, r=smaug
--HG--
extra : rebase_source : 976a15181c0d263b62094a1524b8a27cf7c1fc4d
2016-09-21 11:53:00 -04:00
Carsten "Tomcat" Book
23879d2b18 Merge mozilla-central to mozilla-inbound 2016-09-21 12:07:46 +02:00
Andi-Bogdan Postelnicu
c574b38335 Bug 1301333 - mark XPCJSContext::Initialize as initialisation function for XPCJSContext. r=bobbyholley
MozReview-Commit-ID: HYj244xg1VD
2016-09-16 15:00:52 +03:00
Andrew McCreight
51db16e7f5 Bug 1288909, part 4 - Use a strong reference to the set in ClassInfo2NativeSetMap. r=billm
Entries should end up getting cleared out from this table before the
value dies, so let's just make the reference strong so that any
mistakes will result in leaks and not use-after-frees.

Using smart pointer classes with PLDHashtable is a little
questionable, and I don't want to convert this one hash table to
nsTHashtable, so I use manual addref and release.

MozReview-Commit-ID: Kfg9veS6r11

--HG--
extra : rebase_source : 865ab48c2cf67546dd705cf79f8873efe695ac5c
2016-09-06 12:58:27 -07:00
Andrew McCreight
946ffa2384 Bug 1288909, part 3 - XPCWrappedNative:: and XPCWrappedNativeProto::Mark() don't do anything any more. r=billm
Also clean up some random comments for code that was deleted earlier.

MozReview-Commit-ID: 8JQx0FAH8wA

--HG--
extra : rebase_source : 614bda8caf0647ff0220986904ac6fb5fd4573a8
2016-08-05 13:56:14 -07:00
Andrew McCreight
58a9259670 Bug 1292694 - Don't skip marking at Shutdown due to fear of "bad locking problems". r=mrbkap
MozReview-Commit-ID: HetNpQR2s8Y

--HG--
extra : rebase_source : 727a86bcacf35c6f0ab68ba69d1860839cb27730
2016-08-05 15:19:41 -07:00
Andrew McCreight
93c15e825f Bug 1288909, part 2 - Remove a bunch of now-useless XPCNativeSet marking-related things. r=billm
MozReview-Commit-ID: 4YRn9Wx64a4

--HG--
extra : rebase_source : 7298dfd78142a1d544922fb5f78f7ca4a5562a6c
2016-07-27 16:38:42 -07:00
Andrew McCreight
bbaa5c3f54 Bug 1288909, part 1 - Implement refcounting of XPCNativeSet. r=billm
This patch is similar to bug 1288870.

Strong references:

- XPCCallContext::mSet: Like XPCNativeInterface, this only roots it
when |mState >= HAVE_NAME|, and again this only requires changing
SystemIsBeingShutDown().

- XPCWrappedNativeProto::mSet and XPCWrappedNative::mSet. These become
RefPtrs.

- stack: AutoMarkingNativeSetPtr become RefPtr<XPCNativeSet>. This
lets me eliminate some uses of AutoJSContext. This is the bulk of the
patch.

Weak references:

- mNativeSetMap. This reference gets cleared in the dtor. This
requires bug 1290239 to actually find the entry for removal.

- mClassInfo2NativeSetMap. The reference is in the value for this hash
table, and we don't have the key in the set dtor. Fortunately, the
only code that adds to this table is
XPCNativeSet::GetNewOrUsed(nsIClassInfo* classInfo), which in turn is
only called by GetNewOrUsed(nsIClassInfo* classInfo). This code
creates a new XPCWrappedNativeProto, which (with my patch) holds a
strong reference to the set that has been added to the table. This set
is never changed or released until the dtor for the proto, which calls
ClearCacheEntryForClassInfo(), removing the entry from the
hashtable. Thus, the lifetime of the set is always going to be longer
than the lifetime of the entry.

Other notes:

- Like XPCNativeInterface, this class uses placement |new| that
requires a special destruction function, which with my patch is hidden
away in the refcounting code.

- This patch delete a bunch of marking/sweeping code from
XPCJSRuntime::FinalizeCallback(), because the lifetimes are managed by
the refcounting now. Some of the marking code is left behind to be
cleaned up in a later patch.

- I didn't see any methods that had XPCNativeSet** outparams.

- MOZ_COUNT_{CTOR,DTOR}(XPCNativeSet) is not needed because it is now
refcounted.

MozReview-Commit-ID: 7oTorCwda1n

--HG--
extra : rebase_source : 0c477e18c405e4ea88393279cf8bea62c5b0f4c7
2016-07-27 16:38:30 -07:00
Bill McCloskey
a51047b439 Bug 1279086 - Allow multiple interrupt callbacks (r=dvander) 2016-09-16 20:33:49 -07:00
Wes Kocher
14c8653f72 Merge inbound to central, a=merge 2016-09-15 16:28:10 -07:00
Andrew McCreight
ac4b6dabc5 Bug 1300830 - Remove XPCJSRuntime::mDetachedWrappedNativeProtoMap. r=mrbkap
Nothing is ever added to this hash table.

MozReview-Commit-ID: 7gmlBZKNPOc

--HG--
extra : rebase_source : 9a14e405facedc8148c5dd8e363f98c691e23231
2016-09-07 11:49:38 -07:00
Jan de Mooij
7f794780e0 Bug 1302448 part 2 - Rename XPCJSRuntime to XPCJSContext. r=mrbkap
--HG--
rename : js/xpconnect/src/XPCJSRuntime.cpp => js/xpconnect/src/XPCJSContext.cpp
extra : rebase_source : e6b435ab1ca2739e340669195dff77c561ea573e
2016-09-14 15:48:17 +02:00
Jan de Mooij
a53986bf29 Bug 1302448 part 1 - Rename CycleCollectedJSRuntime to CycleCollectedJSContext. r=mccr8
--HG--
rename : xpcom/base/CycleCollectedJSRuntime.cpp => xpcom/base/CycleCollectedJSContext.cpp
rename : xpcom/base/CycleCollectedJSRuntime.h => xpcom/base/CycleCollectedJSContext.h
extra : rebase_source : 075214b5057f151520926715b6154e99ae80a0b3
2016-09-14 15:47:32 +02:00
Benjamin Bouvier
daec611782 Bug 1288778: Add a telemetry probe for usage of asm.js / wasm; r=luke, data-review=bsmedberg
MozReview-Commit-ID: D8yiiobompo

--HG--
extra : rebase_source : 889800ed00a5f05522bd8235491dfd0bee059f9a
extra : amend_source : 268b1d5b811e58d2748f9780992e4769432cb681
2016-09-08 16:07:15 +02:00
Zibi Braniecki
8ef8bb9efc Bug 1289340 - Expose Intl.DateTimeFormat.prototype.formatToParts. r=waldo
MozReview-Commit-ID: Ii7TqMDRzu4
2016-09-13 20:49:21 -07:00
Terrence Cole
6af2f7d660 Bug 1257387 - Move OOM callback annotation to the common runtime for workers; r=mccr8
--HG--
extra : rebase_source : 3278a5bc32ce245003b890fbfbbf4f32e3d42944
2016-09-13 10:57:07 -07:00
Nicholas Nethercote
8c9e80a613 Bug 1297300 - Add missing checks to GetSpec() calls in caps/ and js/. r=mrbkap.
This required making GetScriptLocation() fallible.

--HG--
extra : rebase_source : a678e86c443988897d88550bec1cd1d21c3e919e
2016-08-30 14:22:04 +10:00
Tooru Fujisawa
b2e122e612 Backed out changeset 8272530c90ef (bug 1276626) for bug 1284511 r=blassey 2016-09-09 00:45:40 +09:00
Tooru Fujisawa
cbdf488f5b Backed out changeset 2872d7dca33b (bug 1284511) r=blassey 2016-09-09 00:45:40 +09:00
Michael Layzell
e12728495c Bug 1018486 - Part 9: Changes to account for modifications to clang plugin, r=ehsan
MozReview-Commit-ID: EPQMbfHYxUK
2016-09-07 10:50:47 -04:00
Michael Layzell
36e08437d0 Bug 1018486 - Part 8: Various other changes, r=smaug
MozReview-Commit-ID: B0dsomkWgEk
2016-09-07 10:50:45 -04:00
Till Schneidereit
5f85932d39 Bug 1298597 - Properly handle the target Promise having been nuked in resolve/reject functions for xray'd Promises. r=jandem
MozReview-Commit-ID: EBAwzff9vOM
2016-09-05 14:48:38 +02:00
Tooru Fujisawa
382083077f Bug 1284511 - Fix slow script check to use elapsed time from last check. r=mrbkap 2016-09-03 09:51:15 +09:00
Wes Kocher
a2e7bd60fc Merge m-c to inbound, a=merge 2016-09-02 13:34:10 -07:00