Граф коммитов

5340 Коммитов

Автор SHA1 Сообщение Дата
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
Wes Kocher a2ca4e17ce Backed out changeset 1e7eb0625d3e (bug 1297687) a=merge 2016-09-02 13:18:37 -07:00
Tom Schuster b84fb2a919 Bug 1299321 - DOM test changes for Promise @@toStringTag. r=bz 2016-09-02 18:39:50 +02:00
Tom Schuster 55a65363a9 Bug 1299321 - Make DOM/Xray handle string values in JSPropertySpec. r=peterv 2016-09-02 18:39:50 +02:00
Boris Zbarsky bd36520bb6 Bug 1302849 part 1. Remove the now-dead SCSecurityXrayXPCWN thing. r=mrbkap 2016-09-15 11:41:45 -04:00
Boris Zbarsky 0fd831e559 Bug 1302304. Remove IDL bits that reference nsIDOMMediaError; it's not needed anymore. r=bkelly 2016-09-15 11:41:35 -04:00
Nicholas Nethercote b71747b2ac Bug 1299727 - Rename NS_WARN_IF_FALSE as NS_WARNING_ASSERTION. r=erahm.
The new name makes the sense of the condition much clearer. E.g. compare:

  NS_WARN_IF_FALSE(!rv.Failed());

with:

  NS_WARNING_ASSERTION(!rv.Failed());

The new name also makes it clearer that it only has effect in debug builds,
because that's standard for assertions.

--HG--
extra : rebase_source : 886e57a9e433e0cb6ed635cc075b34b7ebf81853
2016-09-01 15:01:16 +10:00
Ehsan Akhgari 7d8261a6b9 Bug 1297687 - Use the OriginAttributes associated with a window principal when creating a Sandbox with an expanded principal; r=baku 2016-09-01 14:34:23 -04:00
André Bargull 96b7707bfe Bug 1121938 - Implement TypedArray.prototype.toString and .toLocaleString. r=waldo 2016-08-11 09:31:22 -07:00
Wes Kocher cbdf3625fa Merge m-c to inbound, a=merge 2016-08-26 16:32:56 -07:00
Wes Kocher f09e8fef1a Merge inbound to central, a=merge 2016-08-26 16:20:50 -07:00
Boris Zbarsky 6a73ce5a82 Bug 1295322 part 1. Make ThrowExceptionObject return void, instead of bool. r=bholley 2016-08-26 15:38:16 -04:00
Terrence Cole dea2d7e2f4 Bug 1296484 - Automatically run a CC if COMPARTMENT_REVIVED GC ends mostly gray; r=jonco,r=mccr8
--HG--
extra : rebase_source : 94482f4c09e640ca9e0436316c992457dd5b9f61
2016-08-18 13:30:32 -07:00
Ryan VanderMeulen e1fdfb3b73 Merge inbound to m-c. a=merge 2016-08-26 09:37:03 -04:00
Andrew McCreight e1f78c53f2 Bug 1290239, part 2 - Add assertions about inserting into NativeSetMap. r=mrbkap
If we are inserting an XPCNativeSet into a NativeSetMap, and we failed
to find it, then the insertion should not have found some other set
there already.

Additionally in this case, the hash value of a XPCNativeSetKey for the
set we are inserting should be the same as the key we used to insert
the set into the map. If this property does not hold, then we can't
use Remove() to remove the set from the map. This condition would have
caught the error that part 1 fixes.

MozReview-Commit-ID: 23v37GzA4XV

--HG--
extra : rebase_source : 4dca7ffc436f53214eb2927bc1ff2f71927f7ac3
2016-07-29 13:19:57 -07:00
Andrew McCreight 8d254f9e91 Bug 1290239, part 1 - Compute the correct hash value for an XPCNativeSetKey when mBaseSet is null. r=mrbkap
The current hash function fails to take into account that all
XPCNativeSets have nsISupports as their first element.

MozReview-Commit-ID: 7B8TPVnaM7I

--HG--
extra : rebase_source : a357f88a7d54aa1c9f58b6d429d4a5bbaaa13e80
2016-07-29 11:41:48 -07:00
Andrew McCreight dadb0e9351 Bug 1295684 - Make JSObject2WrappedJSMap infallible. r=mrbkap
We crash sometimes if we fail to add. We should always crash, because
we don't properly attempt to handle failure, and it would be nice to
get proper OOM-annotated crash reports.

MozReview-Commit-ID: EGgYxPdUSky

--HG--
extra : rebase_source : 92faf09c52452089b32cc430c04568b81e677f74
2016-08-16 11:12:00 -07:00
Wes Kocher 00bdbfd6e2 Backed out changeset bbd6bdd463b1 (bug 1296484) for asan leaks in XPCJSRuntime a=backout 2016-08-25 17:25:00 -07:00
Wes Kocher 50954c6f31 Merge m-c to autoland, a=merge 2016-08-25 17:15:05 -07:00
Jon Coppeard a30843aba8 Bug 1297026 - Replace outdated references to 'compartment GC' with 'zone GC' r=terrence 2016-08-25 12:00:56 +01:00
Shu-yu Guo 03569f36dd Bug 1263355 - Report memory metrics for Scopes. (r=njn) 2016-08-25 01:28:47 -07:00
Shu-yu Guo e2b6833e0a Bug 1263355 - Rewrite the frontend: bindings. (r=jorendorff,Waldo) 2016-08-25 01:28:47 -07:00
Nicholas Nethercote c2306345d5 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.

--HG--
extra : rebase_source : e94323614bd10463a0c5134a7276238a7ca1cf23
2016-08-24 15:23:45 +10:00
Andrew McCreight b9fe49e715 Bug 1290614, part 7 - Further refactor XPCNativeSetKey::Hash. r=mrbkap
Now we can see what is really happening in Hash: first hash the
interfaces from the base set, if any, then hash the additional
interface, if any.

Note that this function is wrong when mBaseSet is null. This will be
fixed in bug 1290239.

MozReview-Commit-ID: KaxQ57ofO1D

--HG--
extra : rebase_source : 42012878839adb2e36580480abce7d9708288db4
2016-07-31 14:19:31 -07:00
Andrew McCreight bcc1ce175d Bug 1290614, part 6 - Hoist out the common loop over all interfaces in XPCNativeSetKey::Hash(). r=mrbkap
Both cases first hash together all of the existing interfaces.

MozReview-Commit-ID: AnUF5uPSPpN

--HG--
extra : rebase_source : 43ac016974d3ee4dfbd92361348aeeae5b6a793c
2016-07-31 14:16:52 -07:00
Andrew McCreight c2ef63a1b9 Bug 1290614, part 5 - Split out the last iteration of the XPCNativeSetKey loops. r=mrbkap
Now I take advantage of knowing that any new interface is always being
added to the end of the set.

Further cleanup of Hash() will happen in the next patch.

MozReview-Commit-ID: EoESTOfIOr

--HG--
extra : rebase_source : 8471391d23e3ff27a27156f55badbef3d1a4118b
2016-07-31 14:11:01 -07:00
Andrew McCreight c597939d49 Bug 1290614, part 4 - Stop storing mPosition in XPCNativeSetKey. r=mrbkap
There are three cases for a key, represented by the three ctors:
1. mBaseSet is non-null, mAddition is null.
2. mBaseSet is null, mAddition is non-null.
3. Both mBaseSet and mAddition are non-null.

In the three places that use the value of mPosition, condition 3
holds, so the key must have been constructed using the third ctor. For
this ctor, mPosition is equal to mBaseSet->GetInterfaceCount(), so I
substitute the value and eliminate the field.

This makes a check in NewInstanceMutate() trivially false, so I
eliminated that, too.

MozReview-Commit-ID: 1SOF6GyccU7

--HG--
extra : rebase_source : e215da19d77d6f88c216a48a07b9450c4d0e12bb
2016-07-31 13:50:11 -07:00