Commit Graph

5826 Commits

Author SHA1 Message Date
Zibi Braniecki
6d98bad59d Bug 1335983 - Migrate nsCollation::CreateCollection to use LocaleService::GetAppLocale. r=jfkthame
MozReview-Commit-ID: bJVrVj2dAS

--HG--
extra : rebase_source : f3a28e003415f0c58462a73b5fd987455e102fc5
2017-02-06 14:57:09 -08:00
Tim Huang
72200b06f7 Bug 1319773 - Part 3: Making the WrapperFactory ignores the First Party Domain of the originAttributes when rewrapping the wrapper. r=mrbkap
--HG--
extra : rebase_source : 6013d2b7386f907af761098d006949ba07c163d7
2017-01-18 20:34:31 +08:00
Boris Zbarsky
0041276515 Bug 1335654 part 4. Fix some CrossOriginXrayWrapper error reporting bits to follow the HTML spec for cross-origin objects. r=bholley 2017-02-02 12:48:49 -05:00
Boris Zbarsky
bcc1d4ab44 Bug 1335654 part 3. Implement actually throwing a SecurityError when cross-origin property accesses are denied. r=bholley 2017-02-02 12:48:49 -05:00
Boris Zbarsky
72ca8d1730 Bug 1335654 part 2. Change the deny() methods of our wrapper security policies to take a JSContext and a mayThrow boolean. r=bholley 2017-02-02 12:48:49 -05:00
Boris Zbarsky
52118e082c Bug 1335654 part 1. Propagate AutoEnterPolicy's mayThrow argument to the enter() methods of proxy handlers, so they know whether it's OK to throw some sort of custom exception or whether they should just silently deny. r=bholley,jandem 2017-02-02 12:48:49 -05:00
Hannes Verschore
65f3d3c7f2 Bug 1331414: Adding javascript.options.jit.full_debug_checks in about:config for people that want to use debug builds for surfing with less slowdown, r=jandem 2017-02-01 22:05:14 +01:00
Jon Coppeard
5c43c1ac3b Bug 1332745 - Split runtime-wide pointer udpates from per-zone updates in compacting GC r=sfink 2017-02-02 16:17:28 +00:00
Sebastian Hengst
e855f7f79d Backed out changeset dbf9a55f1101 (bug 1331414) for unused variable 'fullJitDebugChecks' at XPCJSContext.cpp:1452. r=backout 2017-02-01 22:26:23 +01:00
Hannes Verschore
f48573af0c Bug 1331414: Adding javascript.options.jit.full_debug_checks in about:config for people that want to use debug builds for surfing with less slowdown, r=jandem 2017-02-01 22:05:14 +01:00
Boris Zbarsky
970a120fb5 Bug 1335368 part 21. Get rid of some IsCallerChrome usage in XPConnect. r=bholley 2017-02-01 15:43:59 -05:00
Boris Zbarsky
1f816c60cf Bug 1335368 part 12. Remove the use of IsCallerChrome in FetchRequest. r=bkelly 2017-02-01 15:43:37 -05:00
Boris Zbarsky
c41740271d Bug 1334537. Make sure to clear out our external string cache if the length doesn't match, since our length no longer needs to match our stringbuffer. r=froydnj
Without this change, we could do a "short" get of a string (e.g. from
XMLHttpRequest), then do another get that returns the same stringbuffer but a
longer length.  But we wouldn't notice, hit our cache, and return the same,
too-short, external string.  The site would not see the new data it should have
seen.
2017-02-01 15:29:47 -05:00
Sebastian Hengst
ccd3fc9950 Backed out changeset 99587cc6ef23 (bug 1335536) for failing robocop testFilePicker on Android. r=backout 2017-02-01 19:08:22 +01:00
Andrea Marchesini
3b9eaa7785 Bug 1335536 - File.createFromNsIFile and File.createFromFileName should be async - part 1 - tests, r=smaug 2017-02-01 17:13:08 +01:00
Benjamin Smedberg
ca77995f5d Bug 1333826 - Remove SDK_FILES, SDK_LIBRARY, and related is_sdk support in the build goop, r=mshal
MozReview-Commit-ID: 52vPyDXdFte

--HG--
extra : rebase_source : c3217730bb70eb7319152dd07536b12f49d6a597
2017-01-30 11:24:10 -05:00
Brian Hackett
8033ed29a8 Bug 1324002 - Mark atoms separately in each zone, r=jonco,mccr8,peterv.
--HG--
extra : rebase_source : 53cf4fa94f122a991c2adbd7bae3714de4391bb4
2017-01-30 06:31:47 -07:00
Cameron McCormack
9c4ea5685f Bug 1334768 - stylo: Back out 800030115d2e and 404506488cfb for being completely wrong due to bug 1334938.
MozReview-Commit-ID: 8CGTqmtlguT
2017-01-30 16:49:54 +08:00
Florian Quèze
bdc1ffa608 Bug 1334831 - script-generated patch to use .remove() instead of .parentNode.removeChild, r=jaws. 2017-01-30 08:10:22 +01:00
Cameron McCormack
7805d4716e Bug 1334768 - stylo: Test expectation adjustments for 2017-01-29 merge.
MozReview-Commit-ID: FFmvs6SHIwW
2017-01-29 15:31:56 +08:00
Tom Schuster
48ee845dbd Bug 1333073 - Enable DataView Xray. r=bz 2017-01-28 21:52:45 +01:00
Wes Kocher
18e735dcef Merge m-c to inbound, a=merge
MozReview-Commit-ID: EfMOcZbAiSe
2017-01-27 16:39:29 -08:00
Wes Kocher
7cd28f7e5d Merge inbound to central, a=merge
MozReview-Commit-ID: HvoljuLV6Gj
2017-01-27 16:37:18 -08:00
Boris Zbarsky
ecfa536932 Bug 1332713 part 3. Implement a version of XrayAwareCalleeGlobal that works for specialized getters. r=bholley
The problem is that JSJitGetterInfo doesn't contain a callee.  So we can't use
xpc::XrayAwareCalleeGlobal in a specialized getter, because we don't have our
callee function available.
2017-01-27 18:53:36 -05:00
Gijs Kruitbosch
8faf5c08a8 Bug 1333164 - fix invalid references to mochitest stylesheet, r=erahm
MozReview-Commit-ID: 1Xxt72jYdm7

--HG--
extra : rebase_source : 15d854ffd6a142687fe5232149a0e370f1c058c2
2017-01-24 14:24:04 +00:00
Florian Quèze
be4dbae285 Bug 1334199 - script-generated patch to omit getComputedStyle's second argument when it's falsy, r=jaws. 2017-01-27 10:51:02 +01:00
Wes Kocher
8fa84ca644 Merge inbound to central, a=merge
MozReview-Commit-ID: BZgxmhS6OtM
2017-01-26 16:19:05 -08:00
Jan de Mooij
1ea46b80dd Bug 1330593 part 1 - Allow non-flat external strings. r=jwalden,bz 2017-01-26 18:40:41 +01:00
Tooru Fujisawa
ddd36fec56 Bug 1332245 - Move nsScriptError from js/xpconnect to dom/bindings. r=bz
--HG--
rename : js/xpconnect/idl/nsIScriptError.idl => dom/bindings/nsIScriptError.idl
rename : js/xpconnect/src/nsScriptError.cpp => dom/bindings/nsScriptError.cpp
rename : js/xpconnect/src/nsScriptErrorWithStack.cpp => dom/bindings/nsScriptErrorWithStack.cpp
2017-01-28 00:42:47 +09:00
Christian Holler
4dc29b3b09 Bug 1332361 - Expose TestingFunctions to content in FUZZING builds. r=jandem.
MozReview-Commit-ID: HA0oodPzAeS

--HG--
extra : rebase_source : 896f4d9465b8bd2a5655dec63165f893b0f0f5df
2017-01-25 13:39:54 +01:00
Florian Quèze
0e0865f4fc Bug 1331599 - script-generated patch to replace removeEventListener calls with the once option when possible, r=jaws. 2017-01-25 07:01:52 +01:00
Nicholas Nethercote
22b6d342d7 Bug 1333296 (part 1) - Rename MOZ_ENABLE_PROFILER_SPS as MOZ_GECKO_PROFILER. r=mstange,glandium.
--HG--
extra : rebase_source : 223f3a17f009645369be503392cc1f0cea7f19a1
2017-01-24 14:15:12 +11:00
Makoto Kato
0d01065054 Bug 1215247 - Turn on ICU and Intl API for Android. r=Waldo
Intl API (ECMA-402) already supports most web browsers such as Edge (including Windows 10 Mobile), Chrome (including Android), and upcoming Safari 10(https://developer.apple.com/library/prerelease/content/releasenotes/General/WhatsNewInSafari/Articles/Safari_10_0.html).

Also IDN2008 support, and number control by <input type="number"> require ICU.  And, although gfx has own unicode table, we want to remove this if ICU is supported on all platform.

Also, new L20N framework (aka L20N) wants to use Intl API to localize UI.

So I would like to use ICU as default on Fennec Android.

Negative issue is file size.  ICU has big table, file size of libxul.so will be following.  This support requires additional 4.4MB.

before this ... 26287379 bytes
after this  ... 30692696 bytes

Although android OS already has ICU, ICU version is different per OS version.  And our ICU requirement is 50.1+ (Android 4.0 uses ICU 48) and exported fucntion name of ICU has ICU version suffix.  So we cannot use it.

MozReview-Commit-ID: 5R5iNMzWNjS

--HG--
extra : rebase_source : fceb3ee320f885e7c03749f76cf0ad7699a21c2c
2016-08-01 14:14:22 +09:00
Nicholas Nethercote
bf48aecf29 Bug 1332172 - Remove XPC_MAP_WANT_*. r=mccr8.
nsIXPCScriptable flags handling in xpc_map_end.h is a bit of a mess.

- Half the flags relate to whether various functions are defined (PreCreate,
  GetProperty, etc). These are set using the XPC_MAP_WANT_* macros;
  for each one xpc_map_end.h  inserts the corresponding flag using the
  preprocessor (see XPC_MAP_CLASSNAME::GetScriptableFlags()).

- The other half of the flags relate to other things (IS_GLOBAL_OBJECT,
  DONT_REFLECT_INTERFACE_NAMES, etc). These are set using the XPC_MAP_FLAGS
  macro.

Having two similar but different mechanisms to set the flags for a class is
confusing. (Indeed, until recently we had some classes where a single flag was
redundantly specified via both mechanisms.) Note also that the classes done in
dom/base/nsIDOMClassInfo.h also specify all the flags in a single value,
similar to how XPC_MAP_FLAGS works.

This patch removes the XPC_MAP_WANT_* macros. All flags are now set
via XPC_MAP_FLAGS. This is a significant simplification to xpc_map_end.h and
all the places that use it.

The downside of this change is that I had to change the flag constants from
class constants (i.e. nsIXPCScriptable::FOO) to macros (i.e.
NSIXPCSCRIPTABLE_FOO) because they need to be used in #if statements like this
in xpc_map_end.h:

  #if !((XPC_MAP_FLAGS) & NSIXPCSCRIPTABLE_WANT_PRECREATE)

and you can't use a '::'-qualified name inside a #if. I think this downside is
outweighed by the simplification described above.

Overall the patch removes 80 lines of code.

--HG--
extra : rebase_source : 6d5c341d0deba8f1529d81c17bb8819e09620b05
2017-01-23 13:33:58 +11:00
Phil Ringnalda
74f10163fe Merge m-i to m-c, a=merge 2017-01-21 15:24:42 -08:00
Nicholas Nethercote
12647a7223 Bug 1332577 (part 7) - Rename mozilla_get_pseudo_stack() as profiler_get_pseudo_stack(). r=mstange.
This makes it consistent with other profiler functions.

--HG--
extra : rebase_source : 1e52acdc448691b8859bb147a0c70b198b432fe2
2017-01-20 15:07:05 +11:00
Boris Zbarsky
2daa8920fe Bug 851892 part 12. Convert CSSStyleRule to WebIDL. r=peterv,heycam,mccr8
The .style PutForwards bit is coming along for the ride; I did check that Chrome
already implements this, so we're not the only ones.
2017-01-13 10:41:03 -05:00
Boris Zbarsky
d274f30b35 Bug 851892 part 11. Convert CSSImportRule to WebIDL. r=peterv,heycam,mccr8
Note that the .media PutForwards is a new feature coming along for the ride now
that we're using the spec IDL.
2017-01-13 10:41:03 -05:00
Sebastian Hengst
e533169d2c Backed out changeset eab8ccda41b8 (bug 851892) 2017-01-20 19:30:19 +01:00
Sebastian Hengst
d4070f77eb Backed out changeset 31103a03f2c2 (bug 851892) 2017-01-20 19:30:14 +01:00
Boris Zbarsky
2132f0075d Bug 851892 part 12. Convert CSSStyleRule to WebIDL. r=peterv,heycam,mccr8
The .style PutForwards bit is coming along for the ride; I did check that Chrome
already implements this, so we're not the only ones.
2017-01-13 10:41:03 -05:00
Boris Zbarsky
a5709a4cb8 Bug 851892 part 11. Convert CSSImportRule to WebIDL. r=peterv,heycam,mccr8
Note that the .media PutForwards is a new feature coming along for the ride now
that we're using the spec IDL.
2017-01-13 10:41:03 -05:00
Lars T Hansen
6d7b1e9cef Bug 1312446 - Enable SharedArrayBuffer and Atomics by default. r=shu
--HG--
extra : rebase_source : 308016a3820017d790d7a77d8fc25e1388f04df4
extra : amend_source : 1fc3635840cd1a1021f6f3f9d6491c381a122dc9
2017-01-19 17:22:47 +01:00
Mark Banner
16e6d381ac Bug 503613 - Remove old 'tail =' lines from xpcshell.ini files; r=gps
MozReview-Commit-ID: 62Hp5ISxowJ

--HG--
extra : rebase_source : daa8efb3409031fea553f4fd0c9d0746e38dc308
extra : histedit_source : b4c23aacf678ba0d0ac9c09191a7c494ead11a08
2017-01-18 10:30:39 +00:00
Nicholas Nethercote
b1100b7e94 Bug 1330904 - Remove XPCNativeScriptableCreateInfo. r=mccr8.
XPCNativeScriptableCreateInfo is now a very thin wrapper around
nsIXPCScriptable. Removing it simplifies things quite a bit.

Note especially the change to GatherScriptableCreateInfo(), which is a
confusing function. Previously its fourth argument was never touched it was
called, but it did have a return value. Now the fourth argument is touched and
effectively replaces that return value, and the function now returns void.
* * *
Bug 1330904 - fixups. r=mccr8.

I will fold this into the previous patch before landing.

--HG--
extra : rebase_source : 22e7fd0c44dd7c4174f8edf3e1d3ae362bf95757
2017-01-13 11:26:02 +11:00
Boris Zbarsky
3293a4cd98 Bug 1330759 part 3. Add a "stringbuffer we own" mode to DOMString. r=froydnj
We're going to need it because we're going to add a consumer that cannot in fact
promise that its stringbuffer reference will outlive the DOMString.
2017-01-18 22:20:14 -05:00
Boris Zbarsky
ced1c6138f Bug 1330759 part 2. Fix XPCConvert::JSData2Native to not share an external string stringbuffer if it would create a non-null-terminated string. r=froydnj 2017-01-18 22:20:14 -05:00
Kris Maglione
d00d51d963 Bug 1273251: Part 6 - Test that extension window wrappers are nuked on close. r=billm
MozReview-Commit-ID: 3sWNuLqZBzp

--HG--
extra : rebase_source : f094357f5bf5b0de0dd1da22c9afeed233f19bb3
2016-11-17 12:44:30 -08:00
Kris Maglione
1a992eb125 Bug 1273251: Part 5 - Add tests for event listeners in nuked sandboxes. r=peterv
MozReview-Commit-ID: 1Ok8hhaOdp4

--HG--
extra : rebase_source : b8d10e28367a35fd1da1a59364741ce261e2e898
2016-11-17 12:26:51 -08:00
Kris Maglione
e51f27d8cb Bug 1273251: Part 1 - Mark nuked sandboxes as nuked and non-scriptable. r=bholley
MozReview-Commit-ID: tq9nExa1P7

--HG--
extra : rebase_source : 3c0e856335b8585457e2679b30177bd1df9ac6bb
2017-01-12 14:47:38 -08:00
Mike Hommey
09dc362a61 Bug 1306327 - Use the new XRE Bootstrap API in Desktop Firefox. r=bsmedberg
This just wraps all the XRE method calls to go through the Bootstrap API
instead of relying on the XPCOM glue methods.

--HG--
extra : rebase_source : eccbe18b9b21ca1ab6c403515ffd60f0a9174d9c
2016-12-16 11:10:02 +09:00
Florian Quèze
85611a7b6d Bug 1331081 - script generated patch to omit addEventListener/removeEventListener's third parameter when it's false, r=jaws.
--HG--
extra : rebase_source : a22344ee1569f58f1f0a01017bfe0d46a6a14602
2017-01-17 11:50:25 +01:00
Phil Ringnalda
686006613e Backed out 20 changesets (bug 851892) for load failures in Android crashtest-4
Backed out changeset b9c4115cdeac (bug 851892)
Backed out changeset 5f491bf49b85 (bug 851892)
Backed out changeset 9bf5bcb3e8c5 (bug 851892)
Backed out changeset a9cab46e8b45 (bug 851892)
Backed out changeset 73858e15c8c0 (bug 851892)
Backed out changeset a25638588b6b (bug 851892)
Backed out changeset d58e0e5069ef (bug 851892)
Backed out changeset d8da2a3d8f10 (bug 851892)
Backed out changeset a8da3c34983f (bug 851892)
Backed out changeset 29cf8acbd21e (bug 851892)
Backed out changeset c53cd7bdf8b3 (bug 851892)
Backed out changeset e841a2796375 (bug 851892)
Backed out changeset 2eab85b00159 (bug 851892)
Backed out changeset ca4b1fb9cae4 (bug 851892)
Backed out changeset 74c0ba66f108 (bug 851892)
Backed out changeset 719bb9f41e5b (bug 851892)
Backed out changeset d6aa4c6192df (bug 851892)
Backed out changeset dc81a167a75d (bug 851892)
Backed out changeset 65422477b3a5 (bug 851892)
Backed out changeset 3089dd379077 (bug 851892)
2017-01-15 11:50:10 -08:00
Boris Zbarsky
12d9bfeec4 Bug 851892 part 12. Convert CSSStyleRule to WebIDL. r=peterv,heycam,mccr8
The .style PutForwards bit is coming along for the ride; I did check that Chrome
already implements this, so we're not the only ones.
2017-01-13 10:41:03 -05:00
Boris Zbarsky
596effcfff Bug 851892 part 11. Convert CSSImportRule to WebIDL. r=peterv,heycam,mccr8
Note that the .media PutForwards is a new feature coming along for the ride now
that we're using the spec IDL.
2017-01-13 10:41:03 -05:00
Boris Zbarsky
0c844d909c Back out bug 851892 for Windows build bustage on CLOSED TREE 2017-01-13 11:47:22 -05:00
Boris Zbarsky
440a3a3356 Bug 851892 part 12. Convert CSSStyleRule to WebIDL. r=peterv,heycam,mccr8
The .style PutForwards bit is coming along for the ride; I did check that Chrome
already implements this, so we're not the only ones.
2017-01-13 10:41:03 -05:00
Boris Zbarsky
3379caebf7 Bug 851892 part 11. Convert CSSImportRule to WebIDL. r=peterv,heycam,mccr8
Note that the .media PutForwards is a new feature coming along for the ride now
that we're using the spec IDL.
2017-01-13 10:41:03 -05:00
Nicholas Nethercote
3bbc82eb80 Bug 1329846 (follow-up) - Fix bustage. r=bustage. 2017-01-13 11:28:49 +11:00
Nicholas Nethercote
7a8872808f Bug 1329846 (part 2) - Remove NATIVE_HAS_FLAG. r=mccr8.
It's only used in three places, and it no longer makes the code more readable.

--HG--
extra : rebase_source : 1d66cc542dda8d66a72d567f271fcab60c2d92c4
2017-01-11 07:40:19 +11:00
Nicholas Nethercote
e3685c4266 Bug 1329846 (part 1) - Remove XPCNativeScriptableInfo. r=mccr8.
XPCNativeScriptableInfo is now a very thin wrapper around nsIXPCScriptable, and
it uses manual memory management. Removing it simplifies things quite a bit.

In particular, when setting XPCWrappedNative::mScriptable in
XPCWrappedNative::WrapNewGlobal() and XPCWrappedNative::Init() we no longer
have to worry about sharing the XPCNativeScriptableInfo object with the proto.
And XPCWrappedNative::{Init,Destroy}() have similar simplifications.

--HG--
extra : rebase_source : e58eb28f1574224a8e8badf25fcfa25e5a5b8ad8
2017-01-10 12:47:57 +11:00
Andrea Marchesini
359ae91eac Bug 1328653 - Merging all the various *OriginAttributes to just one, r=huseby 2017-01-12 17:38:48 +01:00
Ehsan Akhgari
cfca13cda1 Bug 1330188 - Add hidden prefs for adjusting the baseline and ion JIT thresholds; r=sstangl 2017-01-11 14:55:04 +08:00
Nicholas Nethercote
7fad269a06 Bug 1324330 (part 6) - Streamline nsIXPCScriptable flags. r=mccr8.
This patch adjusts the values so there are no skipped bits, and removes the
no-longer-used RESERVED flag.

--HG--
extra : rebase_source : 88a50110d66ad85c1277213afea7e08f7aa9538a
2016-12-23 08:30:45 +11:00
Nicholas Nethercote
c7018d9f7d Bug 1325542 - Remove XPCNativeScriptableFlags. r=mccr8.
WantFoo() and the similar methods remain, but they've been moved from
XPCNativeScriptableFlags to nsIXPCScriptable.

One consequence of this change is that in places where we used to get the flags
from an XPCNativeScriptableCreateInfo we now need a null check on the
nsIXPCScriptable. (This isn't true when getting flags from
XPCNativeScriptableInfo, however, because nsIXPCScriptable is always non-null
within that type.)

--HG--
extra : rebase_source : 3d1e1d1c313b4629bb2e337cc2fb7c0d1092ed99
2016-12-23 16:14:32 +11:00
Florian Quèze
fc6379e827 Bug 1329182 - remove trailing newURI null parameters in the rest of the tree, r=jaws. 2017-01-09 20:27:26 +01:00
Nicholas Nethercote
2fde95af84 Bug 1324330 (part 4) - Remove some unused functions. r=mccr8.
--HG--
extra : rebase_source : 093a6ae13879deafc070ffa658d5822dc310cf88
2016-12-23 08:30:29 +11:00
Nicholas Nethercote
d7a51c9a2f Bug 1324330 (part 3) - Don't mix |Cant| and |Cannot| in function names in XPCWrappedNativeJSOps.cpp. r=mccr8.
Use |Cannot| consistently.

--HG--
extra : rebase_source : dfef428a88953a01dcaca866d82d6277ac779c8d
2016-12-23 08:30:27 +11:00
Nicholas Nethercote
47b78b17ae Bug 1324330 (part 2) - Make XPC_MAP_FLAGS non-optional when using xpc_map_end.h. r=mccr8.
I'd like to remove XPC_MAP_WANT_* altogether and use XPC_MAP_FLAGS for all the
nsIXPCScriptable flag setting, but I haven't worked out how to handle the
method definitions in xpc_map_end.h yet. In the meantime, it seems good to make
the flag setting more consistent and explicit.

In particular, the three "Module" classes have "#define XPC_MAP_WANT_CALL" and
"#define XPC_MAP_FLAGS nsIXPCScriptable::WANT_CALL" which both have the same
effect. The patch removes the latter, to make them consistent with other
classes.

--HG--
extra : rebase_source : 3119e895809bb14e63f61e4e440c84e16cc4c5f9
2016-12-23 08:30:22 +11:00
Markus Stange
4bdc4ca0fb Bug 1323100 - Register most of the remaining threadfunc threads with the profiler. r=froydnj
As far as I can tell, this covers all the remaining threads which we start
using PR_CreateThread, except the ones that are created inside NSPR or NSS,
and except for the Shutdown Watchdog thread in nsTerminator.cpp and the
CacheIO thread. The Shutdown Watchdog thread stays alive past leak detection
during shutdown (by design), so we'd report leaks if we profiled it. The
CacheIO thread seems to stay alive past shutdown leak detection sometimes as
well.

This adds a AutoProfilerRegister stack class for easy registering and
unregistering. There are a few places where we still call
profiler_register_thread() and profiler_unregister_thread() manually, either
because registration happens conditionally, or because there is a variable that
gets put on the stack before the AutoProfilerRegister (e.g. a dynamically
generated thread name). AutoProfilerRegister needs to be the first object on
the stack because it uses its own `this` pointer as the stack top address.

MozReview-Commit-ID: 3vwhS55Yzt

--HG--
extra : rebase_source : 56dd27282e7bd09a7e7dc7ca09ccfe3a0198e7af
2017-01-05 16:34:26 +01:00
Olli Pettay
d4f2be7cde Bug 1326507, rename Traverse to TraverseNative, r=mccr8
--HG--
extra : rebase_source : cb10292c2b9685855a6027a0377d10f168bbcbf6
2017-01-03 21:50:10 +02:00
Olli Pettay
0364dbc792 Bug 1326507, remove NS_IMPL_CYCLE_COLLECTION_TRAVERSE_SCRIPT_OBJECTS, r=mccr8
--HG--
extra : rebase_source : 3ae1207308de120b7299b13ecaa95dd1612b3459
2017-01-03 21:47:55 +02:00
Masatoshi Kimura
5aabeea338 Bug 1325217 - Remove Windows Vista from <supportedOS> manifest. r=jimm
MozReview-Commit-ID: BoZo3XKCgv0

--HG--
extra : rebase_source : 8ad6fa7d6fcc3741e308287a57471f61dd62f97b
2016-12-22 07:17:30 +09:00
Jan de Mooij
158805801d Bug 1325075 - Fix Value::isGCThing footgun, stop returning true for NullValue. r=jonco,baku 2016-12-26 16:40:21 +01:00
Jan de Mooij
e67d1ceec6 Bug 1325345 - Add compartment asserts to JS_FireOnNewGlobalObject and other APIs. r=jonco,bholley
--HG--
extra : rebase_source : 07f26b60760e20f4ada79f02222588e79460ead8
2016-12-22 12:25:26 +01:00
Phil Ringnalda
bcbe2e1fcc Merge m-c to autoland 2017-01-20 19:15:16 -08:00
Mike Hommey
f9c3dd278b Bug 1332523 - Make the Bootstrap API entry point the same for both dependent and standalone linkage. r=bsmedberg
--HG--
extra : rebase_source : 21d9371dfa0a7ed7ff056d8486f28c978df8932d
2017-01-13 07:29:56 +09:00
Cameron McCormack
d4d8ba1d5f Bug 1324624 - stylo: Mark currently failing crashtests with asserts-if(stylo,...). r=xidorn
MozReview-Commit-ID: 7iiwRwiQ8s4
2016-12-21 15:42:36 +08:00
Yoshi Huang
2ceecc22f5 Bug 1324115 - Part 2: replace the callers to use C++ helper. r=smaug 2016-12-21 14:59:21 +08:00
Nicholas Nethercote
df925b776c Bug 1321374 - Simplify js::Class handling relating to nsIXPCScriptable. r=mccr8, sr=bholley.
This patch removes XPCNativeScriptableShared and XPCNativeScriptableSharedMap,
which results in a net reduction of ~100 lines of code.
2016-12-14 08:33:46 +11:00
Ehsan Akhgari
d67534c9f0 Bug 1320201 - When an XHR is made with an expanded principal, use the expanded principal for CORS security checks; r=bzbarsky
We should only ensure that the resulting document doesn't end up
inheriting the expanded principal.
2016-12-15 16:49:35 -05:00
Carsten "Tomcat" Book
4a9a623faf Merge mozilla-central to mozilla-inbound 2016-12-15 14:24:41 +01:00
Steve Fink
7f97277dc2 Bug 1308236 - Don't trigger read barriers when comparing wrapped pointers types r=sfink r=mccr8 2016-10-28 15:11:56 -07:00
Wes Kocher
c3693bf65e Merge m-c to autoland, a=merge 2016-12-14 16:12:33 -08:00
Till Schneidereit
95b8398292 Bug 1322920 - Remove DOM Promise implementation. r=bz
MozReview-Commit-ID: 1zzd0x2LNNb
2016-12-14 17:11:48 +01:00
Pawan Sasanka
46399d1148 Bug 1306538 - Move js::ReportASCIIErrorWithId to AddonWrapper.cpp. r=arai 2016-12-13 14:57:21 +05:30
Andi-Bogdan Postelnicu
1ce5b7e29b Bug 1323183 - prevent memory leak from CheckTargetAndPopulate. r=bholley
MozReview-Commit-ID: 6iMg2eUHoU6

--HG--
extra : rebase_source : b075cd1b7f8897b776b17c201f2b33c4992a0a9a
2016-12-14 20:56:46 +02:00
Olli Pettay
6f87bd6cd5 Bug 1323226, re-enable the accidentally disabled xpc_TryUnmarkWrappedGrayObject also in opt builds, r=ehsan 2016-12-14 01:07:42 +02:00
Sebastian Hengst
42d867c83e Backed out changeset 8574c820840b (bug 1323226) for static analysis bustage. r=backout on a CLOSED TREE 2016-12-13 20:25:40 +01:00
Olli Pettay
a0607eb3a5 Bug 1323226, re-enable the accidentally disabled xpc_TryUnmarkWrappedGrayObject also in opt builds, r=ehsan
--HG--
extra : rebase_source : 372d56e1ed73968d64fa53d9f3ca7aab5e8370e9
2016-12-13 20:56:27 +02:00
Boris Zbarsky
43e94e6458 Bug 1322415. Fix property enumeration on cross-origin windows to include indexed props, and add some tests for the ordering of the indexed, named, and symbol-named props on cross-origin objects (window and location). r=bholley 2016-12-13 13:14:43 -05:00
Tom Schuster
fffde16165 Bug 1313112 - Remove non-standard static ArrayBuffers.slice. r=arai 2016-12-13 15:40:22 +01:00
Nicholas Nethercote
f81fa28212 Bug 1322080 (part 3, attempt 2) - Remove nsIXPCScriptable::addProperty. r=peterv.
--HG--
extra : rebase_source : af5d98e2d84bd7592b499134e06c98821302f488
2016-12-02 17:37:55 +11:00
Nicholas Nethercote
b654a853d9 Bug 1322080 (part 2, attempt 2) - Remove XPC_MAP_WANT_POST_CREATE_PROTOTYPE. r=peterv.
--HG--
extra : rebase_source : 38e7b889e7fa8ea76aba402baf536a3f8d7e297d
2016-12-02 17:12:08 +11:00
Carsten "Tomcat" Book
9788e20a9e Backed out changeset 5b3a011acc01 (bug 1322080) 2016-12-12 12:15:51 +01:00
Carsten "Tomcat" Book
5f2a9e53a6 Backed out changeset 9356d8836ca8 (bug 1322080) 2016-12-12 12:15:49 +01:00
Nicholas Nethercote
d307e2a3a9 Bug 1322080 (part 3) - Remove nsIXPCScriptable::addProperty. r=peterv.
The only non-trivial implementation of this method is in nsEventTargetSH, but
it's never called, so no point keeping it around. (Similar methods were removed
in bug 1132184 and bug 1132187.)
2016-12-02 17:37:55 +11:00
Nicholas Nethercote
f4dc382625 Bug 1322080 (part 2) - Remove XPC_MAP_WANT_POST_CREATE_PROTOTYPE. r=peterv.
It's never defined, and there's a comment in
XPCWrappedNativeProto::CallPostCreatePrototype() explaining how
PostCreatePrototype() doesn't have an associated "want" check.
2016-12-02 17:12:08 +11:00
Jon Coppeard
b8a1fc66c2 Bug 1295033 - Handle failure in nsXPCWrappedJS constructor r=mccr8 2016-12-07 13:43:24 -10:00
Shu-yu Guo
72e9231d47 Bug 1315592 - Handle JS compilation errors in the async subscript loader. (r=bholley) 2016-12-02 17:36:42 -08:00
Boris Zbarsky
11fbb63457 Bug 1321299. Cross-origin objects should allow gets of certain symbol-named properties but force the value to be undefined. r=bholley 2016-12-02 15:24:20 -05:00
Tooru Fujisawa
10515acfd3 Bug 1321222 - Remove legacy generator from js/xpconnect/. r=mrbkap 2016-12-01 18:12:14 +09:00
Tom Schuster
a4860e9fe0 Bug 1192038 - Update RegExp Xray code. r=bholley,arai 2016-11-26 19:17:39 +01:00
Tom Schuster
f5ca1e8eea Bug 1213341 - Simplify Error Xray code. r=bholley 2016-11-22 20:53:38 +01:00
Tom Schuster
78e10f98ab Bug 755821 - Parse arguments of Function constructor properly. r=shu 2016-10-15 11:47:00 +09:00
Ehsan Akhgari
7009c0e03a Bug 1318768 - Part 2: Make nsIURIClassifier::Classify() available in the content process; r=gcp,baku 2016-11-22 08:17:26 -05:00
André Bargull
8a555a2bfd Bug 1303091 - Share static Intl data across compartments. r=Waldo, r=jonco
--HG--
rename : js/src/builtin/IntlTzData.js => js/src/builtin/IntlTimeZoneData.h
extra : rebase_source : 558f4fba32efdee429423055f3786e1dc09e4d68
2016-11-17 14:40:18 -08:00
Tooru Fujisawa
62e286f0d5 Bug 1293305 - Part 1.7: Remove already disabled test that uses for-each. r=bholley 2016-11-21 15:03:35 +09:00
Ehsan Akhgari
4a7e1635a3 Bug 1318875 - Stop using nsIPrincipal.APP_STATUS_INSTALLED in test_xpcwn_tamperproof.js; r=baku
Instead of the principal object, we use the command line object which is
another XPCOM object with classinfo that has an attribute, a method and
a constant.
2016-11-20 11:20:56 -05:00
Tom Schuster
9ecd567697 Bug 1155700 - Enable Map/Set Xrays. r=bz 2016-11-19 01:17:53 +01:00
Ryan VanderMeulen
85a696c413 Bug 1318195 - Only build RegisterXPCTestComponents if tests are enabled. r=froydnj
--HG--
extra : rebase_source : b02e7acb1299a816be1f182fc7c1821f1d566ee7
2016-11-17 12:48:23 -05:00
Benjamin Smedberg
ef89ac1033 Bug 1314955 part A - Move the binary xpconnect testing components into libxul so that we can remove support for external binary components. Ideally we'd only compile these into the xul-gtest version, but currently we can't run xpcshell tests against that version, so I'm going to put them into the release xul, r=mrbkap
MozReview-Commit-ID: Lr6uKtzXdEb

--HG--
extra : rebase_source : d6c813e568ba62bcc7174a0fc990ccf4364717e6
extra : source : c78f97c0b77126fa37c857728192f2e2d0c2d99c
2016-11-16 12:28:57 -05:00
Iris Hsiao
5f1776f800 Backed out changeset c78f97c0b771 (bug 1314955) 2016-11-16 15:19:46 +08:00
Benjamin Smedberg
e6c91228b2 Bug 1314955 part A - Move the binary xpconnect testing components into libxul so that we can remove support for external binary components. Ideally we'd only compile these into the xul-gtest version, but currently we can't run xpcshell tests against that version, so I'm going to put them into the release xul, r=mrbkap
MozReview-Commit-ID: Lr6uKtzXdEb

--HG--
extra : rebase_source : 5e9e9d065010b3d772c1795b798530cb00828637
2016-10-26 11:47:52 -04:00
Jan de Mooij
44e40b79ad Bug 981201 - Stop using JS_IsRunning in PreciseGCRunnable::Run and remove JS_IsRunning. r=bholley 2016-11-15 10:58:30 +01:00
Andrea Marchesini
2aba798852 Bug 1303518 - Remove the chrome only constructor for File, r=qdot 2016-11-11 18:56:44 +01:00
Tom Schuster
77bdad13e3 Bug 1015798 - Improve ClassSpec depedent behavior especially with inheritance. r=bz 2016-11-08 22:08:28 +01:00
Tom Schuster
63d908c446 Bug 1015798 - Add int32 type to PropertySpec. r=arai 2016-11-08 22:08:28 +01:00
Lars T Hansen
03a640d849 Bug 1232966 - Adapt Xrays tests for SharedArrayBuffer.prototype.slice. r=bz
--HG--
extra : rebase_source : 3274877fbffb56153ffaa7e08f27d79898cdbee1
2016-11-01 10:00:34 +01:00
Lars T Hansen
16602df083 Bug 1314564 - adapt xray tests for SharedArrayBuffer to include new properties. r=bz
--HG--
extra : rebase_source : 9b84f4e1ac126964d241e51666188e0d7b137d49
2016-11-03 19:00:09 +01:00
Sebastian Hengst
265bb0f27f Bug 1310297 - Remove test annotations using b2g, mulet or gonk: js. r=RyanVM
MozReview-Commit-ID: 3ACHxcWBQh6

--HG--
extra : rebase_source : 2fcd0af0cbee005e1493076183245655914d46f9
2016-11-05 11:29:20 +01:00
Jon Coppeard
99aa8489c8 Bug 1313098 - Assert we only access heap state on the main thread r=sfink r=mccr8 2016-11-04 17:32:36 +00:00
Boris Zbarsky
598f3f4180 Bug 1021289 part 4. Implement support for WebIDL deleters over Xrays. r=peterv 2016-11-04 12:41:26 -04:00
Boris Zbarsky
6a713608c0 Bug 1021289 part 1. Change XrayWrapper::delete_ to call through to the traits delete_ method if the property doesn't actually exist on the expando. r=peterv 2016-11-04 12:41:26 -04:00
Kris Maglione
74012f4fcd Bug 1312690: Load content scripts asynchronously when possible. r=aswan
MozReview-Commit-ID: BzpZA4stbCI

--HG--
extra : rebase_source : 1b93f4ee7add989b3716b75c26ee9835e086d29c
2016-11-02 13:57:19 -07:00
Michelangelo De Simone
6314d37360 Bug 1310020 - Remove DOM/bluetooth and related code. r=jst
MozReview-Commit-ID: IEhwzzBgb3x

--HG--
extra : rebase_source : 664e30c1d3babc71b2ef77c00e393fa767f4c159
2016-10-28 14:25:23 -07:00
Tom Schuster
5bdbfd162a Bug 1130988 - Add SharedArrayBuffer to JSXray. r=bz 2016-10-29 20:11:42 +02:00
Tom Schuster
13263ee62f Bug 1248865 - Some small changes to JSXray and tests. r=bz 2016-10-25 10:18:40 +02:00
Michelangelo De Simone
8641036d15 Bug 1310859 - Remove DOM/nfc and related code. r=jst
MozReview-Commit-ID: FiS7uGytipN

--HG--
extra : rebase_source : cd9be62d334568b4abd850398467bce4c4eb1544
2016-10-18 15:16:56 -07:00
Tooru Fujisawa
2496019988 Bug 1283710 - Part 9: Make JSErrorToXPCException a file static function. r=bholley 2016-10-19 02:10:33 +09:00
Tooru Fujisawa
6f9d4ca127 Bug 1283710 - Part 5: Rename message to toStringResult if it is the result of toString. r=bholley,jwalden,froydnj 2016-08-14 20:39:31 +09:00
Tooru Fujisawa
23d868fa20 Bug 1283710 - Part 2: Change JSErrorReport.ucmessage to JSErrorReport.message_ with ConstUTF8CharsZ, and release them in destructor if it is owned. r=jwalden 2016-08-14 20:39:30 +09:00
Ryan VanderMeulen
75888fe1aa Merge autoland to m-c on a CLOSED TREE. a=merge 2016-10-21 17:12:27 -04:00
Tom Tromey
0dc689acdd Bug 553032 - use MOZ_FORMAT_PRINTF in js; r=evilpie
MozReview-Commit-ID: DD3DJRkOxmC

--HG--
extra : rebase_source : 61cdf0da1a82b626abc79209ee41e43c3bb152ca
2016-10-11 12:44:40 -06:00
Bill McCloskey
cbd15a0459 Bug 1311212 - Add dead CPOW debugging facility (r=mrbkap) 2016-10-19 16:26:23 -07:00
Wes Kocher
71f24926ed Backed out 10 changesets (bug 1283710) for osx xpcshell failures a=backout
Backed out changeset eb95a12e5d86 (bug 1283710)
Backed out changeset f727edc4be48 (bug 1283710)
Backed out changeset fed60fbf645d (bug 1283710)
Backed out changeset 98339fa564f1 (bug 1283710)
Backed out changeset 51b8d69edca0 (bug 1283710)
Backed out changeset d72527b7d3c0 (bug 1283710)
Backed out changeset ee5215f1a38e (bug 1283710)
Backed out changeset dcedbaefe399 (bug 1283710)
Backed out changeset 61f8250cbe0b (bug 1283710)
Backed out changeset 239382846137 (bug 1283710)
2016-10-18 17:27:58 -07:00
Tooru Fujisawa
fe381e93f3 Bug 1283710 - Part 9: Make JSErrorToXPCException a file static function. r=bholley 2016-10-19 02:10:33 +09:00
Tooru Fujisawa
8d69b4f507 Bug 1283710 - Part 5: Rename message to toStringResult if it is the result of toString. r=bholley,jwalden,froydnj 2016-08-14 20:39:31 +09:00
Tooru Fujisawa
81c1a988e3 Bug 1283710 - Part 2: Change JSErrorReport.ucmessage to JSErrorReport.message_ with ConstUTF8CharsZ, and release them in destructor if it is owned. r=jwalden 2016-08-14 20:39:30 +09:00
Jon Coppeard
1989821a93 Bug 1308116 - Improve GC telemetry for non-incremental GCs r=sfink 2016-10-18 18:02:54 +01:00
Jon Coppeard
556585c65f Bug 1297558 - Remove explicit calls to Expose*ToActiveJS r=mccr8 2016-10-18 17:58:19 +01:00
Brian Hackett
7b7d057eda Bug 1306281 - Defer release during finalization of sandbox principals, r=bholley.
--HG--
extra : rebase_source : 331f8d0f8010dd3d522d00511bb9f89348f7fa03
2016-10-13 18:07:02 -06:00
Jon Coppeard
6ca64e3652 Bug 1308919 - Don't make Handles to Heap<T> as it avoids the read barrier r=bz 2016-10-14 09:45:28 +01:00
Sebastian Hengst
9b55cff586 Backed out changeset 0d4f60fa9597 (bug 1306281) for hazard. r=backout 2016-10-13 18:33:08 +02:00
Brian Hackett
d04d2b9c49 Bug 1306281 - Defer release during finalization of sandbox principals, r=bholley.
--HG--
extra : rebase_source : 19cc22ea009390de6661d2d77ea4f976c650947f
2016-10-12 13:09:49 -06:00
Andrea Marchesini
793b227795 Bug 1309818 - Fixing some warning when compiling dom/*, r=smaug 2016-10-13 14:33:07 +02:00
Ho-Pang Hsu
ea1ffcd54c Bug 1282671 - Loose the assertion checking win->IsDying(). r=bholly 2016-10-12 19:49:00 +02:00
Nicolas B. Pierron
c4ddfd637a Bug 1286009 - Distinguish failure reasons of JS_{En,De}codeScript. r=luke 2016-10-12 12:13:22 +00:00
Jan de Mooij
16f561144e Bug 1303754 - Don't use lazy source code if the startup cache is not available (i.e. content processes). r=bholley 2016-10-12 11:51:02 +02:00
Tooru Fujisawa
f13e53f272 Bug 1309473 - Set browser.dom.window.dump.enabled to true in xpcshell to print error. r=bholley 2016-10-20 23:10:36 +09:00
Tooru Fujisawa
9d05259251 Bug 1308947 - Report uncaught error in xpcshell interactive mode. r=bholley 2016-10-20 23:10:35 +09:00
Phil Ringnalda
25afef5692 Merge m-i to m-c, a=merge
MozReview-Commit-ID: HlGgqNI8vwD
2016-10-10 19:07:58 -07:00
Boris Zbarsky
13514334ba Bug 946906 part 8. When getting a cacheable property off a DOM Xray, cache it on the Xray's expando object. r=bholley 2016-10-10 18:16:26 -04:00
Boris Zbarsky
fba67a8141 Bug 946906 part 6. Clear the relevant slots on Xray expandos when clearing cached slots on a DOM object. r=bholley 2016-10-10 18:16:26 -04:00
Boris Zbarsky
8070de70a2 Bug 946906 part 5. Use the codegenned JSClass, if available, when creating Xray expando objects. r=bholley 2016-10-10 18:16:26 -04:00
Boris Zbarsky
7f2945874f Bug 946906 part 3. Create a macro for declaring Xray expando classes, and move the default Xray expand class definition to bindings code. r=bholley 2016-10-10 18:16:25 -04:00
Boris Zbarsky
171911dd94 Bug 946906 part 2. Declare XrayExpandoObjectClassOps in XrayWrapper.h so we can use it from bindings code. r=bholley 2016-10-10 18:16:25 -04:00
Boris Zbarsky
4d566db15c Bug 946906 part 1. Move the ExpandoSlots enum to XrayWrapper.h. r=bholley
The other option, of course, is to just define an "expando slot count" constant
in the header and then static_assert it has the right value once the
ExpandoSlots enum is declared.
2016-10-10 18:16:25 -04:00
Andi-Bogdan Postelnicu
1bb22fcee7 Bug 1308884 - clean return from functions that use variable number of arguments. r=bholley
MozReview-Commit-ID: JXvNwPJyOvb

--HG--
extra : rebase_source : bcc602c6a10c0c157edbb8bbb568a0aaf1e06f64
2016-10-10 14:31:16 +03:00
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
Nicolas B. Pierron
b3e4b94e1e Bug 1288104 part 1 - Move XDR buffer to the caller. r=luke
Add a typedef on top of mozilla::Vector to define the TranscodeBuffer which owns
the encoded content of a Script / Function.

This modification renames JS_EncodeScript, into JS::EncodeScript, and change its
prototype to have a JSContext, a TranscodeBuffer, and a Handle on a script that
we want to encode.

Similar modifications are made to JS_EncodeInterpretedFunction, and the Decode
variant of these.
2016-10-20 09:44:33 +00: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
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
Andrew McCreight
d01e63e95e Bug 1290614, part 3 - The last argument to the third XPCNativeSetKey ctor is always the interface count. r=mrbkap
The mPosition field will be eliminated in a later patch.

MozReview-Commit-ID: EyVYZGgUWrH

--HG--
extra : rebase_source : 229ec989485bdd3ef86670a7c7db4149281a8d79
2016-07-31 13:36:39 -07:00
Andrew McCreight
d55f0d4d23 Bug 1290614, part 2 - Split XPCNativeSetKey into three constructors. r=mrbkap
This explicitly represents the three types of keys that are used:

1. A key for an existing set.
2. A key for a new set with one interface added.
3. A key for an existing set with one new interface added at a
specified position.

MozReview-Commit-ID: Ctw41EymHbd

--HG--
extra : rebase_source : d7ce7d608a3d09df752313116c99bc2079d15a13
2016-07-31 13:25:05 -07:00
Andrew McCreight
e453d61e92 Bug 1290614, part 1 - Pass around XPCNativeSetKeys to better encapsulate argument invariants. r=mrbkap
XPCNativeSet::GetNewOrUsed() and ::NewInstanceMutate() essentially
take XPCNativeSetKeys as arguments, but pass them around
unboxed. Passing around the keys explicitly will allow later changes
to enforce stronger invariants on keys.

MozReview-Commit-ID: CyQU3bUGinq

--HG--
extra : rebase_source : 5cdc651c1e4b9566dccd61b66de5e2bb8d6f33f5
2016-07-31 13:00:02 -07:00
Jon Coppeard
d1435a2a8c Bug 1296688 - Add JSCLASS_FOREGROUND_FINALIZE flag r=sfink r=smaug 2016-08-24 14:18:10 +01:00
Kan-Ru Chen
b6d880aca1 Bug 1297276 - Rename mfbt/unused.h to mfbt/Unused.h for consistency. r=froydnj
The patch is generated from following command:

  rgrep -l unused.h|xargs sed -i -e s,mozilla/unused.h,mozilla/Unused.h,

MozReview-Commit-ID: AtLcWApZfES


--HG--
rename : mfbt/unused.h => mfbt/Unused.h
2016-08-24 14:47:04 +08:00
Phil Ringnalda
b25ad4c181 Back out changeset bba47d5c2583 (bug 1296484) for isNurseryAllocAllowed() assertion failures in devtools tests
CLOSED TREE
2016-08-23 22:37:03 -07:00
Terrence Cole
d00af19508 Bug 1296484 - Automatically CycleCollect if COMPARTMENT_REVIVED GC ends mostly gray; r=mccr8,r=jonco
--HG--
extra : rebase_source : d8df564fb782c4d8cfa4a5b153e5cda00e6343a2
2016-08-18 13:30:32 -07:00
Ryan VanderMeulen
cd2e02c188 Merge m-c to inbound. a=merge 2016-08-23 10:06:36 -04:00
Andrew McCreight
8fcd1d9885 Bug 1288870, part 5 - Remove the now-vestigial Mark code for XPCNativeInterface. r=billm
XPCNativeInterface::Mark(), Unmark() and IsMarked() don't do anything
any more, so anything that calls them can be deleted. This removes the
only use of XPCCallContext::CanGetInterface(), so delete that, too.

MozReview-Commit-ID: 4w3aPTVXNDI
2016-08-23 05:59:57 -07:00
Andrew McCreight
f1d540176d Bug 1288870, part 4 - Make XPCNativeInterface refcounted. r=billm
There are four classes that call Root() on XPCNativeInterface, and
thus keep interfaces alive. Each of these gets converted to use a
RefPtr:

1. XPCCallContext. This could be on some kind of hot path, but the
FindMemberCall involves various string operations and hashtable
lookups, so adding a single AddRef shouldn't matter. One weirdness
here is that the context only roots the interface when |mState >=
HAVE_NAME|. With a RefPtr<>, this requires nulling out
mInterface. Fortunately, in most cases where it moves from rooting to
non-rooting, it already does this. The one case it does not is in
SystemIsBeingShutDown(), so my patch adds that.

2. XPCNativeSet. This holds an array of interfaces in a weird
placement new array at the end of the object. I wasn't sure how a
non-POD class would interact with the way the array is handled with
casting, so I manually AddRef and Release things put into or removed
from the array.

3. AutoMarkingNativeInterfacePtr simply becomes RefPtr<>. This is the
bulk of the patch, in terms of number of lines changed.

4. Similarly, the one AutoMarkingNativeInterfacePtrArrayPtr becomes
nsTArray<RefPtr<>>. This is the last use of the auto marking array
class, so I deleted it.

Here are some other notes on what the patch does:

- XPCNativeInterfaces are created with placement new. This requires a
special version of refcounting that calls DestroyInstance, defined in
the previous patch. The GetNewOrUsed methods used to explicitly call
DestroyInstance(), but with refcounting this is no longer needed.

- The Mark() etc. methods are gutted so they don't do anything and
mMarked is removed because it is no longer used. The methods will be
cleaned up in later patches in this bug.

- Interfaces are removed from mIID2NativeInterfaceMap in the dtor
instead of during sweeping, requiring an extra hash table lookup.

- All of the methods that can create a new interface (NewInstance,
GetISupports, GetNewOrUsed) now return an already_AddRefed<>, which
gives some static checking that we don't accidentally fail to hold
onto a newly created interface.

MozReview-Commit-ID: CrlH1ENAzvr
2016-08-23 05:59:57 -07:00
Andrew McCreight
e410eeed77 Bug 1288870, part 3 - Root the return value of the prewrap callback. r=mrbkap,terrence
Like part 2, this patch is to work around a false GC hazard in
~XPCNativeInterface in part 4. This hazard is around the return value
of WrapperFactory::PrepareForWrapping(), because ~XPCCallContext might
call ~XPCNativeInterface. The fix is to pass the return value into a
mutable handle. Unfortunately, this function is used in the JSAPI, so
JS minor engine changes are also needed.

MozReview-Commit-ID: GwFxmrXFXmb
2016-08-23 05:59:57 -07:00
Andrew McCreight
f487fbbfce Bug 1288870, part 2 - Handlify the argument to XPCNativeSet::FindMember(). r=mrbkap
This is to work around false GC hazards in ~XPCNativeInterface in part
4 of this bug. Putting RefPtr<XPCNativeInterface> on the stack means
that ~XPCNativeInterface can get called in various places, and the GC
hazard analysis does not understand the virtual methods involved, so
it assumes they might possibly GC.

This fixes one hazard by taking a jsid handle argument. The callers
already pass in handles, so no other changes are needed.

MozReview-Commit-ID: LpNpTlujpkm
2016-08-23 05:59:56 -07:00
Wes Kocher
b38dbd1378 Backed out 2 changesets (bug 1279086) for causing painting issues a=backout
Backed out changeset b1c893387fdd (bug 1279086)
Backed out changeset 277c54118c8a (bug 1279086)
2016-08-22 16:00:34 -07:00
Jan de Mooij
d8047f2b2f Bug 1295967 - Share Shapes and BaseShapes across compartments. r=jonco,fitzgen,njn 2016-08-23 11:25:54 +02:00
Bill McCloskey
1613c2cbc9 Bug 1279086 - Allow multiple interrupt callbacks (r=dvander) 2016-08-19 14:40:52 -07:00
Wes Kocher
3a31be9c17 Backed out 2 changesets (bug 1279086) for failures in browser_menu_item_01.js a=backout
Backed out changeset 00bb53b58e96 (bug 1279086)
Backed out changeset cff59fe2b933 (bug 1279086)
2016-08-19 12:31:55 -07:00
Bill McCloskey
95c5d71549 Bug 1279086 - Allow multiple interrupt callbacks (r=dvander) 2016-08-19 09:59:39 -07:00
Wes Kocher
55897634c1 Backed out 3 changesets (bug 1288870) for hazards a=backout
Backed out changeset 83bbd356da97 (bug 1288870)
Backed out changeset 4f0ab1a0d8dd (bug 1288870)
Backed out changeset 8d71aba5c1e7 (bug 1288870)
2016-08-18 16:50:13 -07:00
Andrew McCreight
e5e0b12c27 Bug 1288870, part 3 - Remove the now-vestigial Mark code for XPCNativeInterface. r=billm
XPCNativeInterface::Mark(), Unmark() and IsMarked() don't do anything
any more, so anything that calls them can be deleted. This removes the
only use of XPCCallContext::CanGetInterface(), so delete that, too.

MozReview-Commit-ID: 4w3aPTVXNDI
2016-08-18 15:20:48 -07:00
Andrew McCreight
f8d14c904a Bug 1288870, part 2 - Make XPCNativeInterface refcounted. r=billm
There are four classes that call Root() on XPCNativeInterface, and
thus keep interfaces alive. Each of these gets converted to use a
RefPtr:

1. XPCCallContext. This could be on some kind of hot path, but the
FindMemberCall involves various string operations and hashtable
lookups, so adding a single AddRef shouldn't matter. One weirdness
here is that the context only roots the interface when |mState >=
HAVE_NAME|. With a RefPtr<>, this requires nulling out
mInterface. Fortunately, in most cases where it moves from rooting to
non-rooting, it already does this. The one case it does not is in
SystemIsBeingShutDown(), so my patch adds that.

2. XPCNativeSet. This holds an array of interfaces in a weird
placement new array at the end of the object. I wasn't sure how a
non-POD class would interact with the way the array is handled with
casting, so I manually AddRef and Release things put into or removed
from the array.

3. AutoMarkingNativeInterfacePtr simply becomes RefPtr<>. This is the
bulk of the patch, in terms of number of lines changed.

4. Similarly, the one AutoMarkingNativeInterfacePtrArrayPtr becomes
nsTArray<RefPtr<>>. This is the last use of the auto marking array
class, so I deleted it.

Here are some other notes on what the patch does:

- XPCNativeInterfaces are created with placement new. This requires a
special version of refcounting that calls DestroyInstance, defined in
the previous patch. The GetNewOrUsed methods used to explicitly call
DestroyInstance(), but with refcounting this is no longer needed.

- The Mark() etc. methods are gutted so they don't do anything and
mMarked is removed because it is no longer used. The methods will be
cleaned up in later patches in this bug.

- Interfaces are removed from mIID2NativeInterfaceMap in the dtor
instead of during sweeping, requiring an extra hash table lookup.

- All of the methods that can create a new interface (NewInstance,
GetISupports, GetNewOrUsed) now return an already_AddRefed<>, which
gives some static checking that we don't accidentally fail to hold
onto a newly created interface.

MozReview-Commit-ID: CrlH1ENAzvr
2016-08-18 15:20:48 -07:00
Terrence Cole
1432ea6638 Bug 1296484 - Automatically run a CC if COMPARTMENT_REVIVED GC ends mostly gray; r=jonco,r=mccr8
--HG--
extra : rebase_source : 26aa07342c0b286d772422401bd7d5dd4efbb2fa
2016-08-18 13:30:32 -07:00
Nathan Froyd
82b3f6d3c5 Bug 1297486 - mark xpc::NonVoidStringToJsval as an ordinary inline function instead of MOZ_ALWAYS_INLINE; r=bz
This change has a negligible impact on benchmarks, and saves a lot of
space (550K+ on x86-64 Linux).
2016-08-25 20:33:01 -04:00
Tom Schuster
92024846c1 Bug 1114580 - Define getBuiltinClass on Xray. r=peterv 2016-08-18 10:59:36 +02:00
Chris Manchester
b0b84a1928 Bug 1240134 - Incorporate the interfaces.xpt from downloaded artifacts instead of building XPIDL during an artifact build. r=glandium
MozReview-Commit-ID: 8oEyS1xLOwV
2016-08-17 15:02:31 -07:00
Bob Clary
faa4e6f42c Bug 1295138 - remove expected assertion from test_chrometoSource.xul, r=nfroyd 2016-08-16 22:26:40 -07:00
Nicholas Nethercote
e0229c761e Bug 1295053 (part 5) - Remove an unnecessary use of NS_CALLBACK in ClassInfoData. r=froydnj.
--HG--
extra : rebase_source : 6b14b91e8cd4c056e40148064b396a55c6f451a3
2016-08-16 07:56:26 +10:00
Andrew McCreight
b42d29f1f8 Bug 1288817, part 3 - Stop calling XPCNativeScriptableInfo::Mark() from various places because it doesn't do anything. r=billm
MozReview-Commit-ID: IcjcFti2k7A
2016-08-16 14:29:51 -07:00
Andrew McCreight
323130b5ec Bug 1288817, part 2 - Remove marking methods from XPCNativeScriptableShared and XPCNativeScriptableFlags. r=billm
Nothing depends on the value of the mark bit now.

MozReview-Commit-ID: 9k06XdtR9KB
2016-08-16 14:29:51 -07:00
Andrew McCreight
821b59184e Bug 1288817, part 1 - Make XPCNativeScriptableShared refcounted. r=billm
This adds a heap allocation in
XPCNativeScriptableSharedMap::GetNewOrUsed() on the fast
path. Hopefully that code is not hot enough for it to matter. I could
work around this if needed, but it would be ugly.

mNativeScriptableSharedMap has a weak pointer to
XPCNativeScriptableShared. I moved this removal from
XPCJSRuntime::FinalizeCallback() to the dtor.

There are two types of scriptable: one is a dummy one created in
GetNewOrUsed() to do a lookup, and the other is a fully filled out
one. The dummy one is not added to the hashtable, and may have had its
name stolen if we created a new scriptable. The latter makes it so
that you crash if you try to look it up in the hashtable anyways, so
this patch only looks up fully filled out scriptables.

This patch also removes MOZ_COUNT_CTOR/DTOR because they are not
needed for refcounted classes.

Stop destroying mScriptableInfo in XPCWrappedNative's
SystemIsBeingShutDown(), because that will end up destroying
XPCNativeScriptableShared, while their js::ClassOps are still in use
by JS objects. This matches the existing behavior, which does not
sweep these ScriptableShared during shutdown. (This came up in opt
xpcshell tests.)

MozReview-Commit-ID: GeG0pAYqXpR
2016-08-16 14:29:51 -07:00
Jon Coppeard
17304689a2 Bug 1291292 - Use dynamic chunk allocation for the nursery r=terrence 2016-08-11 17:14:56 +01:00
Jan de Mooij
c33bac8363 Bug 1292892 part 5 - Replace most nsContentUtils::RootingCx calls with dom::RootingCx. r=bz,terrence 2016-08-11 14:39:23 +02:00
Jan de Mooij
4ec9b6fc7e Bug 1292892 part 4 - Pass RootingContext to ModuleEntry. r=bz 2016-08-11 14:39:22 +02:00
Jan de Mooij
da9820d563 Bug 1292892 part 3 - Pass RootingContext to ScriptErrorEvent, DispatchScriptErrorEvent. r=bz 2016-08-11 14:39:22 +02:00
Jan de Mooij
0ad12515f4 Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
Jon Coppeard
5e361d2da5 Bug 1293262 - Refactor pretenuring after minor GC and add telemetry r=terrence 2016-08-11 10:41:06 +01:00
Nicholas Nethercote
4d2f91d5f5 Bug 1293117 (part 6) - Fix a comment and return type in XPCComponents.cpp. r=froydnj.
The comment is wrong. NS_METHOD is the appropriate thing to use here.

--HG--
extra : rebase_source : 68ada96c01f7941d5266298356ba5f493bcda67c
2016-08-09 14:03:12 +10:00
Wes Kocher
565cdb97f5 Backed out changeset 3fbb8651a171 (bug 1121938) for breaking encrypted-media-syntax.html CLOSED TREE 2016-08-10 13:17:39 -07:00
André Bargull
878648c8cf Bug 1121938 - Implement TypedArray.prototype.toString and .toLocaleString. r=waldo, r=froydnj 2016-07-29 09:04:06 -07:00
Shih-Chiang Chien
a8326d97ea Bug 1288600 - reject promise with NotFoundError while no device, and NotAllowedError while canceled by user. r=smaug.
MozReview-Commit-ID: ArQHhdIpQjg
2016-08-09 09:58:14 +08:00
Carsten "Tomcat" Book
553a2da922 merge mozilla-inbound to mozilla-central a=merge 2016-08-10 15:54:26 +02:00
Nicholas Nethercote
e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Andrew McCreight
b22f612021 Bug 1289137 - Make XPCNativeSet::NewInstance() take an nsTArray argument. r=billm
I could clean up ArrayAutoMarkingPtr more, but it is going to be
removed entirely in bug 1288870.

MozReview-Commit-ID: Jyjc2ZfvF3i

--HG--
extra : rebase_source : d7954ab821722b26fe5fc4f5ddc319dd824c6879
2016-07-27 16:36:48 -07:00
Andrew McCreight
d2be3b7515 Bug 1292289, part 1 - Stop unnecessarily using xpcprivate in XPCWrapper.h. r=mrbkap
This file is included in caps/, but it only uses generic JS things,
aside from a macro.

AccessCheck.cpp was bootlegging xpcprivate.h.

MozReview-Commit-ID: C6fGOFxsTvg

--HG--
extra : rebase_source : bd5e7bf9010acf83ccab8ce6cce77a557ad76196
2016-08-04 11:14:35 -07:00
Alexandre Lissy
0af5b943b6 Bug 1284674 - Remove NUWA r=cyu
MozReview-Commit-ID: GyMRNzOBKw6

--HG--
extra : rebase_source : 293af1cd55f2035ce6a99f4ebf144059c32a2b8f
2016-08-02 14:54:00 +02:00
Tooru Fujisawa
f9e30f8e42 Bug 1284099 - Part 2: Assert nsIScriptError.*Flags constants match to JSREPORT_*. r=baku 2016-08-03 18:09:42 +09:00
Tom Schuster
c955774058 Bug 1251364 - Remove our custom printf implementation (jsprf.cpp). r=tromey 2016-08-02 22:16:15 +02:00
Boris Zbarsky
7ad35e1f86 Bug 1289428. Make sure JSCompartment::wrap never returns a gray object, except when it returns "existing". r=bholley,jonco
The basic idea is that we assume the invariant that the "obj" argument is never
gray if "existing" is null (and add asserts to that effect).  Starting from that
assumption, terrence and I audited all the return paths to ensure that gray
objects are never returned.  We found a few places, generally after crossing
compartments with UncheckedUnwrap, where we could have gray things and inserted
corresponding calls to ExposeObjectToActiveJS.

If "existing" is passed in, all bets are off: both "obj" and "existing" can be
gray and can get returned from here.  But the only caller that passes "existing"
doesn't allow the return value to escape, so it's actually safe to do this.
2016-08-02 11:10:58 -07:00
Boris Zbarsky
599897e926 Bug 1291142. Ensure that we don't return gray objects when getting child windows by name or index. r=bholley 2016-08-02 11:06:25 -07:00
Carsten "Tomcat" Book
bd81ddd0b0 merge mozilla-inbound to mozilla-central a=merge 2016-08-02 17:09:31 +02:00
Andrew McCreight
800e8e167f Bug 1290612 - XPCNativeSet::NewInstanceMutate() is always called with a non-null first argument. r=mrbkap
MozReview-Commit-ID: FQGL7pe02xY

--HG--
extra : rebase_source : ec4cb70c54cb0c9775612f68a676fbfcd5f60793
2016-07-29 10:50:12 -07:00
Andrew McCreight
526180e419 Bug 1290587, part 6 - Remove unused method NativeSetMap::Add. r=mrbkap
Also convert some NS_PRECONDITION in NativeSetMap.

MozReview-Commit-ID: IU9C5oXKvGK

--HG--
extra : rebase_source : 5fc36e95667d42a1c0cdfb9bbbf99a7ea008bf34
2016-07-29 10:47:52 -07:00
Andrew McCreight
719e8d80ff Bug 1290587, part 5 - Add helper function to hash pointers in HashNativeKey. r=mrbkap
Also, use NS_PTR_TO_UINT32 instead of NS_PTR_TO_INT32 because it is not
undefined.

Get rid of the optimization of 0 ^ x which required a comment.

MozReview-Commit-ID: HPz5VgRnLN1

--HG--
extra : rebase_source : a4602964ff739c4e37aaa5883e6ed667bff1a963
2016-07-29 10:46:54 -07:00
Andrew McCreight
9e43b3ee66 Bug 1290587, part 4 - Lower case Current in XPCNativeSetKey::Hash(). r=mrbkap
MozReview-Commit-ID: 809S9fDCCLj

--HG--
extra : rebase_source : d3885bb9ccb7778c9375bc2abd8f16d24b594ae8
2016-07-29 10:42:26 -07:00
Andrew McCreight
67ecabec0e Bug 1290587, part 3 - Inline accessors in XPCNativeSetKey::Hash(). r=mrbkap
MozReview-Commit-ID: DVp7uNo3Myn

--HG--
extra : rebase_source : 70e64e7401617d57e378707cd6f20f618d9d7635
2016-07-31 11:36:18 -07:00
Andrew McCreight
09b6a5dd3c Bug 1290587, part 2 - Make XPCNativeSetKey hashing a method. r=mrbkap
MozReview-Commit-ID: 67XbmFN4ThW

--HG--
extra : rebase_source : 812ff5e6926e49821e1949bec54fd554efc40f50
2016-07-29 10:42:05 -07:00
Andrew McCreight
5accbb517d Bug 1290587, part 1 - Fix style for XPCNativeSetKey. r=mrbkap
MozReview-Commit-ID: 4bsItyOAbpN

--HG--
extra : rebase_source : bf3f237038b9c376283127425da542a33c34d83c
2016-07-29 10:35:49 -07:00
Carsten "Tomcat" Book
fc8e03f0d8 Merge mozilla-central to autoland 2016-07-30 16:49:41 +02:00
Botond Ballo
36779c6cc3 Bug 1289608 - Define XrayWrapper<...>::singleton for all instantiations, instead of defining specializations for specific ones. r=bholley
MozReview-Commit-ID: GecaSstpxRQ

--HG--
extra : rebase_source : 30e95b590a18dee92a588d2cb4e8b44808bbe11a
2016-07-29 16:40:08 -04:00
Botond Ballo
34d65c1f90 Bug 1289608 - Provide explicit instantiation declarations for the various instantiations of XrapWrapper. r=bholley
MozReview-Commit-ID: 6rS9JJ1Ba9R

--HG--
extra : rebase_source : 29a69c5b0068bc2e948e007d656ef7b7d4efb13d
2016-07-29 16:39:14 -04:00
Andrew McCreight
82ac383602 Bug 1289457 - Take advantage of infallible new in XPCNativeSet::NewInstance{,Mutate} to skip checks. r=mrbkap
MozReview-Commit-ID: H4TEMzzT6iK
2016-07-29 16:08:06 -07:00
Andrew McCreight
28ba46abc8 Bug 1289252 - gDEBUG_LiveProtoCount does not need to be modified atomically. r=mrbkap
--HG--
extra : rebase_source : 4ed3e3d93f85d964d438d8281c21364315204ec9
2016-07-27 08:50:00 -04:00
Andrew McCreight
3e7a8efdae Bug 1289550 - Remove "fun little hack" from XPCNativeSetKey. r=bz
XPCNativeSetKey has a huge comment about this weird hack it does,
where it tags the first 16 bytes with a magic value. The purpose of
this seem to be that PLDHashtable used to require that the Match()
operation handle both the desired "key" type and the actual entry type
(NativeSetMap::Entry in this case), with the latter needed for
resizing. However, that duality in the match operation has not been
needed since bug 374906, which landed in 2007, so this class can be
greatly simplified.

IsAKey() can be replaced with true, which simplifies some hash
operations.
2016-07-27 10:11:40 -07:00
Andrew McCreight
e806f57820 Bug 1289136 - Fifth argument to XPCConvert::NativeInterface2JSObject() is always null. r=gabor 2016-07-27 10:11:40 -07:00
Matthew Wein
33de9c036e Bug 1285063 - Part 1: Add a helper to XPCOMUtils to iterate over entries in a category. r=kmag
MozReview-Commit-ID: 3mjrPrRuLej

--HG--
extra : rebase_source : 7b7dad1a4bab958a590c24d97f564e34b3355633
2016-07-11 17:33:06 -07:00
Boris Zbarsky
5b840d9b96 Bug 1288791 part 2. Rename WrapNativeParent to FindAssociatedGlobal and update it to actually do that. r=bkelly 2016-07-27 11:05:36 -04:00
Jon Coppeard
e110894730 Bug 1259347 - Add telemetry for nursery size r=terrence 2016-08-01 09:55:06 +01:00
Carsten "Tomcat" Book
574d0d452b merge mozilla-inbound to mozilla-central a=merge 2016-07-26 11:55:54 +02:00
Andrew McCreight
ec20330bad Bug 1288823, part 7 - Fix XPCNativeScriptableInfo ctor arguments. r=mrbkap 2016-07-25 16:32:56 -07:00
Andrew McCreight
3a21c61e93 Bug 1288823, part 6 - Remove unused methods from XPCNativeScriptableInfo and XPCWrappedNativeProto. r=mrbkap 2016-07-25 16:32:56 -07:00
Andrew McCreight
f71885f593 Bug 1288823, part 5 - Remove the unused XPCWrappedNativeProto::mClassInfoFlags. r=mrbkap 2016-07-25 16:32:56 -07:00
Andrew McCreight
9f3f1c7a9b Bug 1288823, part 4 - Mark things delete in XPConnect. r=mrbkap 2016-07-25 16:32:56 -07:00
Andrew McCreight
f8d74765b2 Bug 1288823, part 3 - Mark more classes final in xpcprivate.h. r=mrbkap 2016-07-25 16:32:56 -07:00
Andrew McCreight
192238e71d Bug 1288823, part 2 - Remove unused #defines from xpcprivate.h. r=mrbkap 2016-07-25 16:32:56 -07:00
Andrew McCreight
7e800a8998 Bug 1288823, part 1 - Use doSweep more consistently in XPCJSRuntime::FinalizeCallback. r=mrbkap 2016-07-25 16:32:55 -07:00
Andi-Bogdan Postelnicu
cd8204fb3b Bug 1289064 - eliminate null check on |iid| in XPCConvert::NativeInterface2JSObject. r=bholley
MozReview-Commit-ID: EtiVWiHlYx5

--HG--
extra : rebase_source : 4dcd94c19f0b7f68787658e8937b2535fe37b39f
2016-07-25 13:13:19 +03:00
Carsten "Tomcat" Book
b9a6c687fa merge mozilla-inbound to mozilla-central a=merge 2016-07-25 15:50:41 +02:00
Jan de Mooij
fd0edec3bf Bug 1286795 part 4 - Change some callbacks to take JSContext instead of JSRuntime. r=terrence 2016-07-23 19:52:47 +02:00
Jan de Mooij
8073c28728 Bug 1286795 part 2 - Change JS_RequestInterruptCallback to take JSContext instead of JSRuntime. r=luke 2016-07-23 19:52:20 +02:00
Jan de Mooij
1b710973b8 Bug 1286795 part 1 - Change more GC APIs to take JSContext instead of JSRuntime. r=terrence 2016-07-23 19:51:23 +02:00
Boris Zbarsky
c0fdb1ba69 Bug 1157127. When reusing the global of an initial about:blank for a new document, clear out its XBL scope when we change the global's principal. r=bholley 2016-07-22 16:19:52 -04:00
Carsten "Tomcat" Book
8b6316ec5f Merge mozilla-central to mozilla-inbound 2016-07-22 11:59:06 +02:00
Carsten "Tomcat" Book
c7846e126c Backed out changeset 16aa7041c009 (bug 1287107) for causing xpcshell and mac tests 2016-07-22 11:30:23 +02:00
Andrew McCreight
623b56a3f1 Bug 1287143 - Remove the window argument to SpecialPowers.exactGC(). r=jmaher
Cu.forceCC() is the same as DOMWindowUtils.cycleCollect(), but does
not require a window.
2016-07-19 13:13:00 +08:00
Fabrice Desré
f5b619fb28 Bug 1287107 - Making transition alive with gaia as chrome:// r=bholley,fabrice
MozReview-Commit-ID: 9uVUrmuVFXQ

--HG--
extra : rebase_source : d0c19fcda5c72ecdce3b0d0bbbafa5a7954d7a4c
2016-03-03 09:58:47 -08:00
Tom Tromey
5538d692d3 Bug 1286877 - do not set c-basic-offset for python-mode; r=gps
This removes the unnecessary setting of c-basic-offset from all
python-mode files.

This was automatically generated using

    perl -pi -e 's/; *c-basic-offset: *[0-9]+//'

... on the affected files.

The bulk of these files are moz.build files but there a few others as
well.

MozReview-Commit-ID: 2pPf3DEiZqx

--HG--
extra : rebase_source : 0a7dcac80b924174a2c429b093791148ea6ac204
2016-07-14 10:16:42 -06:00
Till Schneidereit
f8bc4fae19 Bug 911216 - Part 30: Enable SpiderMonkey Promise implementation. r=bz,efaust,bholley,Paolo,tromey,shu
Also contains folded version of the following patches that have to land at the same time with enabling the new implementation (or be backed out at the same time, if it comes to that):

Add Promise checks to test_xrayToJS.xul. r=bholley
Change Promise debugger hook tests to use Promise ctor instead of makeFakePromise. r=shu
Change DOM interface tests to assume Promise is an ES builtin, not a DOM one. r=bz
Remove some PromiseDebugging references. r=bz
Adapt promise rejections test to new xray-unwrapping error. r=bz
Fix expectations in browser_timelineMarkers tests. r=tromey
2016-07-21 12:06:30 +02:00
Chris Peterson
b175c9fdd5 Bug 1277106 - Part 2: Expand MOZ_UTF16() strings to u"" string literals. r=Waldo 2016-07-20 22:03:25 -07:00
Wes Kocher
2f160622c6 Backed out changeset 539b9c11ee64 (bug 1286009) for xpcshell bustage CLOSED TREE 2016-07-20 11:04:05 -07:00
Aaron Klotz
cca20d7ddd Bug 1285356: Fix blocklist initialization regressions; r=bsmedberg
MozReview-Commit-ID: AlWyzVhtPLL

--HG--
extra : rebase_source : 865aff712f83a567c16b81f4512e072a04f7c6df
2016-07-07 17:00:23 -06:00
Nicolas B. Pierron
97d3593afc Bug 1286009 - Distinguish failure reasons of JS_{En,De}codeScript. r=luke 2016-07-20 13:20:49 +00:00
Christoph Kerschbaumer
9ec95d3d9d Bug 471020 - Implement X-Content-Type-Options: nosniff. r=dveditz,bz,mcmanus 2016-07-20 12:22:27 +02:00
Carsten "Tomcat" Book
8428cd56e3 merge mozilla-inbound to mozilla-central a=merge 2016-07-20 11:20:15 +02:00
Andi-Bogdan Postelnicu
3187c6542a Bug 1287776 - eliminate assignment from MOZ_ASSERT in EnsureContentXBLScope. r=bholley
MozReview-Commit-ID: 47a4XSAiQRP

--HG--
extra : rebase_source : e1a2b1732d598ee577c0f541d4fc5ceb961dc68f
2016-07-19 21:57:37 +03:00
Fabrice Desré
7846da76d6 Bug 1287107 - Making transition alive with gaia as chrome:// r=bholley,fabrice
MozReview-Commit-ID: 9uVUrmuVFXQ

--HG--
extra : rebase_source : 20f6f0235667530c21aca4889b5d33e39c2d1a48
2016-03-03 09:58:47 -08:00
Carsten "Tomcat" Book
ca457776f8 merge mozilla-inbound to mozilla-central a=merge 2016-07-18 17:07:59 +02:00
Carsten "Tomcat" Book
779d97cbaf Backed out changeset a80fdfc128b0 (bug 911216) for high crash-rate on developers - RyanVM request 2016-07-18 16:14:59 +02:00
Till Schneidereit
3a9eed06fe Bug 911216 - Part 30: Enable SpiderMonkey Promise implementation. r=bz,efaust,bholley,Paolo,tromey,shu
Also contains folded version of the following patches that have to land at the same time with enabling the new implementation (or be backed out at the same time, if it comes to that):

Add Promise checks to test_xrayToJS.xul. r=bholley
Change Promise debugger hook tests to use Promise ctor instead of makeFakePromise. r=shu
Change DOM interface tests to assume Promise is an ES builtin, not a DOM one. r=bz
Remove some PromiseDebugging references. r=bz
Adapt promise rejections test to new xray-unwrapping error. r=bz
Fix expectations in browser_timelineMarkers tests. r=tromey
2016-07-16 15:05:12 +02:00
Nicholas Nethercote
2ebfc5116b Bug 1197973 - Use MOZ_MUST_USE in AutoJSAPI. r=bz. 2016-07-14 13:18:11 +10:00
Tom Schuster
7bd3f26521 Bug 1285750 - Remove __defineGetter__/__defineSetter__ telemetry. r=Waldo 2016-07-12 11:08:12 +02:00
Jan de Mooij
9a3db3c861 Bug 1283855 part 4 - Make localization APIs take JSContext instead of JSRuntime. r=terrence 2016-07-11 18:46:56 +02:00
Boris Zbarsky
efc4dcf284 Bug 1275315 part 2. Use the new Realm getters in binding code. r=peterv 2016-07-09 00:19:52 -04:00
Chris Peterson
43c2748f66 Bug 1277775 - Replace MOZ_CONSTEXPR{_VAR,_TMPL} with constexpr. r=froydnj 2016-07-08 14:39:53 -07:00
Boris Zbarsky
0184b4df38 Bug 1282150 part 6. Get rid of GetSafeJSContext. r=bholley 2016-07-07 20:08:26 -04:00
Boris Zbarsky
4f728ae258 Bug 1278608. Just bail out of mozJSComponentLoader::LoadModule if it's called on a non-main thread. r=bholley 2016-07-07 20:08:25 -04:00
Jan de Mooij
900af968f3 Bug 1283855 part 28 - Make more GC APIs take JSContext instead of JSRuntime. r=terrence
--HG--
extra : rebase_source : c2d35b5d45cad074b9a9a144bc25ea4a32b8b246
2016-07-07 09:56:09 +02:00
Jan de Mooij
7ec38687c8 Bug 1283855 part 27 - Make more GC APIs take JSContext instead of JSRuntime. r=jonco
--HG--
extra : rebase_source : b666bd88d0247b58f7311f81e5116199779cc806
2016-07-07 09:55:45 +02:00
Jan de Mooij
1ffe7cc891 Bug 1283855 part 26 - Make more GC APIs take JSContext instead of JSRuntime. r=terrence,mccr8
--HG--
extra : rebase_source : 68e6c63b179094f2441f01df58e0bdd68620ed09
2016-07-07 09:55:41 +02:00
Jan de Mooij
a53a99aab6 Bug 1284808 - Rename RuntimeOptions to ContextOptions and move it to the context. r=luke,baku
--HG--
extra : rebase_source : acd82642a27b36b98bf1bf34c29d33c7e0b57dea
2016-07-07 08:15:15 +02:00
Jan de Mooij
ea775f40f5 Bug 1283855 part 21 - Make performance monitoring APIs take JSContext instead of JSRuntime. r=Yoric 2016-07-06 16:53:50 +02:00
Jan de Mooij
96da4695c8 Bug 1283855 part 25 - Make JS_GC take JSContext instead of JSRuntime. r=terrence 2016-07-06 11:40:20 +02:00
Jan de Mooij
c1ed92b71b Bug 1283855 part 3 - Make some callback setters take JSContext instead of JSRuntime. r=efaust 2016-07-06 11:40:20 +02:00
Bill McCloskey
c952246316 Bug 1214824 - Forbid CPOW usage if add-on declares it is multiprocessCompatible (r=mrbkap) 2016-07-05 13:59:36 -07:00
Jan de Mooij
95d24f32ab Bug 1283855 part 22 - Make GetErrorTypeName take JSContext instead of JSRuntime. r=arai
--HG--
extra : rebase_source : b8fee2c303140257fdae29ea709a94a99fc6739d
2016-07-05 16:49:48 +02:00
Jan de Mooij
078a91ca56 Bug 1283855 part 19 - Make security callbacks take JSContext instead of JSRuntime. r=jorendorff
--HG--
extra : rebase_source : c106826540912b00550b2d6162dcae6e1fb616d4
2016-07-05 16:49:44 +02:00