Commit Graph

7193 Commits

Author SHA1 Message Date
Liang-Heng Chen
2cb34bb8bf Bug 1539641 - Log and report storage access granted reason; r=Ehsan,chutten
Differential Revision: https://phabricator.services.mozilla.com/D26720

--HG--
extra : moz-landing-system : lando
2019-04-12 00:38:57 +00:00
Cosmin Sabou
3e6ef756b6 Merge mozilla-central to autoland. 2019-04-12 06:48:11 +03:00
Cosmin Sabou
90efd04259 Merge mozilla-inbound to mozilla-central. a=merge 2019-04-12 06:45:27 +03:00
André Bargull
16ab6e389e Bug 1539694 - Part 3: Update xray tests for Promise. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D26144

--HG--
extra : moz-landing-system : lando
2019-04-11 21:07:00 +00:00
Cosmin Sabou
af07021e88 Backed out 10 changesets (bug 1536411) for causing leaks in CondVar, MessagePortService, MessagePortServiceData.
Backed out changeset eda5854cd7e8 (bug 1536411)
Backed out changeset f94dfbf2476c (bug 1536411)
Backed out changeset c68dc3152faa (bug 1536411)
Backed out changeset f67d157e8baf (bug 1536411)
Backed out changeset 1107a9767f38 (bug 1536411)
Backed out changeset ccbe1af00fb9 (bug 1536411)
Backed out changeset 552c4b588524 (bug 1536411)
Backed out changeset 2eb20578159b (bug 1536411)
Backed out changeset 45708d22bb6d (bug 1536411)
Backed out changeset 87601ef1d4d4 (bug 1536411)
2019-04-11 22:48:49 +03:00
Oana Pop Rus
fdb93637f9 Backed out 3 changesets (bug 1539694) for spidermonkey build bustage in Promise.cpp CLOSED TREE
Backed out changeset b69cb7f4f305 (bug 1539694)
Backed out changeset 2e36a4f4d996 (bug 1539694)
Backed out changeset 75b6666c5095 (bug 1539694)
2019-04-11 22:21:56 +03:00
Jeff Walden
43acc4e9ce Bug 1543458 - Compile lines of UTF-8 interactive input to xpcshell and jsshell without inflating to UTF-16. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26956

--HG--
extra : rebase_source : b7c8192533c8b8a6b824441c9813d5b928bb9900
2019-04-10 09:42:58 -07:00
Boris Zbarsky
d0bcf72821 Bug 1543564 part 2. Get rid of pointless nsPIDOMWindowInner::AsInner methods. r=farre
Differential Revision: https://phabricator.services.mozilla.com/D27027

--HG--
extra : moz-landing-system : lando
2019-04-11 14:12:43 +00:00
André Bargull
a74b1bb84f Bug 1539694 - Part 3: Update xray tests for Promise. r=peterv
Depends on D25209

Differential Revision: https://phabricator.services.mozilla.com/D26144

--HG--
extra : moz-landing-system : lando
2019-04-10 10:29:49 +00:00
Jeff Walden
08efb53319 Bug 1543455 - Make JS::CompileUtf8{,ForNonSyntacticScope} omit Utf8 from their names and take SourceText<Utf8Unit>&. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26951

--HG--
extra : rebase_source : dc8b4fd9f60eb56e4e438b143aff45f2ac691c82
2019-04-09 17:03:32 -07:00
Jeff Walden
f9114beee7 Bug 1543455 - Rename JS::EvaluateUtf8 to JS::Evaluate and make it take |JS::SourceText<mozilla::Utf8Unit>&| for consistency with the UTF-16 form of the API. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26949

--HG--
extra : rebase_source : d84c7c1081442d0e45aba942dbdd16e626be3047
2019-04-09 13:56:18 -07:00
Andrea Marchesini
5cfeeda19e Bug 1536411 - StoragePrincipal - part 1 - Implementation, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D24025

--HG--
extra : moz-landing-system : lando
2019-04-11 16:27:12 +00:00
Narcis Beleuzu
065ab21012 Merge inbound to mozilla-central. a=merge 2019-04-10 01:09:36 +03:00
Jeff Walden
c904278324 Bug 1542910 - Make all script compilation APIs directly return a JSScript*, rather than returning a success code and returning the JSScript* via outparam that exactly duplicates the success code value's meaning. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26616

--HG--
extra : moz-landing-system : lando
2019-04-09 17:58:52 +00:00
Brindusan Cristian
149c6ee879 Backed out changeset 53e379a5738f (bug 1542910) as requested by waldo on irc. CLOSED TREE
--HG--
extra : histedit_source : 8714b8dac07c146822952ede6a8d85b3bf4caf50
2019-04-09 20:43:52 +03:00
Jeff Walden
9f030a47c2 Bug 1542910 - Make all script compilation APIs directly return a JSScript*, rather than returning a success code and returning the JSScript* via outparam that exactly duplicates the success code value's meaning. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26616

--HG--
extra : moz-landing-system : lando
2019-04-09 17:24:31 +00:00
Noemi Erli
4a518ba201 Backed out changeset d470f958ea61 (bug 1542910) for bustages in testEmptyWindowIsOmitted.cpp 2019-04-09 19:24:46 +03:00
Jeff Walden
1a5a3f4e6e Bug 1542910 - Make all script compilation APIs directly return a JSScript*, rather than returning a success code and returning the JSScript* via outparam that exactly duplicates the success code value's meaning. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D26616

--HG--
extra : moz-landing-system : lando
2019-04-09 03:50:03 +00:00
Andrew McCreight
1b901ff2db Bug 1542024 - Eliminate nsXPCWrappedJSClass by moving its methods into nsXPCWrappedJS. r=bzbarsky
I changed DelegatedQueryInterface and CallMethod to be non-static
methods rather than taking an explicit |self| parameter.

There is already a method nsXPCWrappedJS::CallMethod() with the same
signature, but it is a shim, so I inlined it into the version in
XPCWrappedJSClass.cpp.

I also fixed up a few comments that mention nsXPCWrappedJSClass.

The new comments starting with "We now need to enter the realm" were
written by Boris, and are a little more explicit so they are easier to
understand.

I renamed DebugDump() to DebugDumpInterfaceInfo() to be more
informative.

Differential Revision: https://phabricator.services.mozilla.com/D26422

--HG--
extra : moz-landing-system : lando
2019-04-08 21:39:27 +00:00
Ciure Andrei
3ff6ff6d6f Backed out changeset 5937ad352b2d (bug 1542024) for perma failing 406106-1.html CLOSED TREE 2019-04-09 00:12:32 +03:00
Andrew McCreight
ccc11f67db Bug 1542024 - Eliminate nsXPCWrappedJSClass by moving its methods into nsXPCWrappedJS. r=bzbarsky
I changed DelegatedQueryInterface and CallMethod to be non-static
methods rather than taking an explicit |self| parameter.

I did a tiny bit of cleanup in the nsIXPConnectJSObjectHolder case of
DelegatedQueryInterface().

There is already a method nsXPCWrappedJS::CallMethod() with the same
signature, but it is a shim, so I inlined it into the version in
XPCWrappedJSClass.cpp.

I also fixed up a few comments that mention nsXPCWrappedJSClass.

The new comments starting with "We now need to enter the realm" were
written by Boris, and are a little more explicit so they are easier to
understand.

I renamed DebugDump() to DebugDumpInterfaceInfo() to be more
informative.

Differential Revision: https://phabricator.services.mozilla.com/D26422

--HG--
extra : moz-landing-system : lando
2019-04-08 19:44:45 +00:00
Andy Wingo
5db3645882 Bug 1539136 - XrayWrappers filter out disabled DataView properties. r=kmag
Differential Revision: https://phabricator.services.mozilla.com//D25249

--HG--
extra : rebase_source : 1f0758c939945df368cceeb6c8e047c99b8d4542
2019-04-08 09:31:33 +02:00
Yoshi Cheng-Hao Huang
222255214e Bug 1534967 - Part 1: use RootedIdVector. r=jonco
Differential Revision: https://phabricator.services.mozilla.com/D25042
2019-04-08 10:46:53 +08:00
Andrew McCreight
90abea1653 Bug 1540301, part 5 - Replace instances of nsXPCWrappedJSClass with nsXPTInterfaceInfo. r=bzbarsky
nsXPCWrappedJSClass now only adds indirections and dynamic
allocations, so eliminate it. The class is kept around as a collection
of static helper functions to avoid needing to move around all of this
code and messing with history. In total, these patches save around 2kb
of dynamic allocations per process.

The major parts of this patch are:
* Dropping indirection for accessing things on nsXPTInterfaceInfo and
  renaming things from class to info.
* Removing the stuff related to instances of nsXPCWrappedJSClass
  existing (ctor, dtor, field, ISupports implementation, getter methods).
* Removing IID2WrappedJSClassMap, because we only need the map from IIDs
  to info.

I dropped the null check in TraverseNative because mInfo is never
cleared, while mClass was.

I dropped the forward declaration of nsXPCWrappedJSClass because no
instances of that class exist, so no function will take or return a
pointer to one.

Differential Revision: https://phabricator.services.mozilla.com/D26218

--HG--
extra : moz-landing-system : lando
2019-04-06 12:57:02 +00:00
Andrew McCreight
8f23fc71ea Bug 1540301, part 4 - Make nsXPCWrappedJSClass::DebugDump into an infallible static method. r=bzbarsky
Ultimately, this method is really about dumping XPConnect-ish
information about an nsXPTInterfaceInfo, so change it into a static
method that takes an info directly. This loses logging of the
nsXPCWrappedJSClass's ref count, but that is going away in the next
patch anyways.

Differential Revision: https://phabricator.services.mozilla.com/D26217

--HG--
extra : moz-landing-system : lando
2019-04-06 12:57:00 +00:00
Andrew McCreight
2ea25a6e9f Bug 1540301, part 3 - Eliminate nsIXPCWrappedJSClass. r=bzbarsky
This interface serves no real purpose, aside from some weird XPConnect
debugging function. If you are in a debugger already, you can just
call the nsXPCWrappedJSClass DebugDump method directly.

For now, I changed nsXPCWrappedJSClass to just implement nsISupports,
but this will go away later.

I also devirtualized DebugDump(), because it is no longer an XPCOM
method.

Differential Revision: https://phabricator.services.mozilla.com/D26216

--HG--
extra : moz-landing-system : lando
2019-04-06 12:56:53 +00:00
Andrew McCreight
d320f01e48 Bug 1540301, part 2 - Make nsXPCWrappedJSClass::CallMethod() into a static method. r=bzbarsky
The first idea here is that |this| is actually the GetClass() of the
|wrapper| argument (the one call site looks like
"GetClass()->CallMethod(this, ...)"), so we can locally reconstruct it
when CallMethod is a static method.

The second idea here is that the only real use of the
nsXPCWrappedJSClass is to grab some data from the nsXPTInterfaceInfo
in a few places. This means that we can take a pointer to the info
early on in the function and use that rather than go through the
nsXPCWrappedJSClass. This in turn means that because the info is
statically allocated we no longer need to do a kungFuDeathGrip on the
wrapper's nsXPCWrappedJSClass.

Differential Revision: https://phabricator.services.mozilla.com/D26215

--HG--
extra : moz-landing-system : lando
2019-04-06 12:56:51 +00:00
Andrew McCreight
5d994e0f0e Bug 1540301, part 1 - Make trivially static nsXPCWrappedJSClass methods static. r=bzbarsky
There are a number of nsXPCWrappedJSClass methods that don't use any
data from |this|, so go ahead and make them static. This is one step
towards eliminating nsXPCWrappedJSClass entirely.

In addition, devirtualize a few methods, because they are going to
have to get devirtualized anyways, and there's no need for them to be
virtual.

Differential Revision: https://phabricator.services.mozilla.com/D26214

--HG--
extra : moz-landing-system : lando
2019-04-06 12:56:49 +00:00
Andrew McCreight
184afc9483 Bug 1541684, part 4 - Remove nsXPCWrappedJSClass:mDescriptors. r=nika
This field now just caches the IsReflectable() field from the method
info, so get rid of it.

Differential Revision: https://phabricator.services.mozilla.com/D26071

--HG--
extra : moz-landing-system : lando
2019-04-05 23:48:20 +00:00
Andrew McCreight
8f597c742f Bug 1541684, part 3 - Statically compute if a method is reflectable. r=nika
XPCConvert::IsMethodReflectable() is derived entirely from
nsXPTMethodInfo, so we can compute it at build time and include it in
nsXPTMethodInfo. It is the only use of mNotXPCOM and mHidden, so we
can get rid of those fields at the same time.

This paves the way for getting rid of XPCWrappedJSClass::mDescriptors
in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D26070

--HG--
extra : moz-landing-system : lando
2019-04-05 23:48:18 +00:00
Andrew McCreight
a8dbd5d65f Bug 1541684, part 2 - Remove nsXPCWrappedJSClass::mIID. r=nika
This is already stored on mInfo.

Differential Revision: https://phabricator.services.mozilla.com/D26069

--HG--
extra : moz-landing-system : lando
2019-04-05 23:48:11 +00:00
Andrew McCreight
c1d8f269ef Bug 1541684, part 1 - Remove XPCWrappedJSClass::mRuntime. r=bzbarsky
There is only a single XPC JS runtime now, so there's no need to keep a
special pointer around.

Differential Revision: https://phabricator.services.mozilla.com/D26068

--HG--
extra : moz-landing-system : lando
2019-04-05 23:48:09 +00:00
Sylvestre Ledru
03c8e8c2dd Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-05 21:41:42 +00:00
Boris Zbarsky
39bd790515 Bug 1541513 part 7. Stop using AutoJSContext in XPConnect. r=mccr8
The change to the second FindTearOff call in XPCWrappedNative::GetNewOrUsed is
fixing a longstanding bug that was introduced in bug 903891 when the sense of
the check was incorrectly reversed.  Luckily that code is unreached in
practice, because the two PreCreate hooks we have left never create the wrapper.

Differential Revision: https://phabricator.services.mozilla.com/D26007

--HG--
extra : moz-landing-system : lando
2019-04-04 18:12:18 +00:00
Boris Zbarsky
cb3918b746 Bug 1541513 part 6. Stop using AutoJSContext in XPCWrappedNativeInfo. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26006

--HG--
extra : moz-landing-system : lando
2019-04-04 13:14:40 +00:00
Boris Zbarsky
10328fb59d Bug 1541513 part 5. Stop using AutoJSContext in XPCWrappedNativeProto. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26005

--HG--
extra : moz-landing-system : lando
2019-04-04 02:10:05 +00:00
Boris Zbarsky
5057288ed8 Bug 1541513 part 4. Stop using AutoJSContext in NativeData2JS. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26003

--HG--
extra : moz-landing-system : lando
2019-04-04 02:08:47 +00:00
Boris Zbarsky
6f668b8c00 Bug 1541513 part 3. Stop using AutoJSContext in NativeInterface2JSObject. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26002

--HG--
extra : moz-landing-system : lando
2019-04-04 02:07:53 +00:00
Boris Zbarsky
953426c78f Bug 1541513 part 2. Stop using AutoJSContext in some simple XPCConvert cases. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26000

--HG--
extra : moz-landing-system : lando
2019-04-03 23:33:35 +00:00
Boris Zbarsky
6c53c36a79 Bug 1541513 part 1. Stop requiring a JSContext for JS_SetAllNonReservedSlotsToUndefined. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D25999

--HG--
extra : moz-landing-system : lando
2019-04-05 07:36:32 +00:00
Csoregi Natalia
ba58e936bd Backed out changeset 4ad80127f89f (bug 1519636) for bustage on MarkupMap.h and nsAccessibilityService.cpp. CLOSED TREE 2019-04-05 09:48:19 +03:00
Sylvestre Ledru
d1c1878603 Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 21:36:16 +00:00
Narcis Beleuzu
ed1878b2ce Backed out 4 changesets (bug 1541684) for bustages on xpcprivate.h . CLOSED TREE
Backed out changeset b021ea89cf04 (bug 1541684)
Backed out changeset 16d5f0b792d4 (bug 1541684)
Backed out changeset a37029984f13 (bug 1541684)
Backed out changeset 900f639d72a3 (bug 1541684)
2019-04-05 03:57:09 +03:00
Andrew McCreight
1a6c8f3740 Bug 1541684, part 4 - Remove nsXPCWrappedJSClass:mDescriptors. r=nika
This field now just caches the IsReflectable() field from the method
info, so get rid of it.

Differential Revision: https://phabricator.services.mozilla.com/D26071

--HG--
extra : moz-landing-system : lando
2019-04-04 21:01:26 +00:00
Andrew McCreight
98dd357c68 Bug 1541684, part 3 - Statically compute if a method is reflectable. r=nika
XPCConvert::IsMethodReflectable() is derived entirely from
nsXPTMethodInfo, so we can compute it at build time and include it in
nsXPTMethodInfo. It is the only use of mNotXPCOM and mHidden, so we
can get rid of those fields at the same time.

This paves the way for getting rid of XPCWrappedJSClass::mDescriptors
in the next patch.

Differential Revision: https://phabricator.services.mozilla.com/D26070

--HG--
extra : moz-landing-system : lando
2019-04-04 21:01:24 +00:00
Andrew McCreight
a838eacb5c Bug 1541684, part 2 - Remove nsXPCWrappedJSClass::mIID. r=nika
This is already stored on mInfo.

Differential Revision: https://phabricator.services.mozilla.com/D26069

--HG--
extra : moz-landing-system : lando
2019-04-04 21:01:22 +00:00
Andrew McCreight
bd9b8350ab Bug 1541684, part 1 - Remove XPCWrappedJSClass::mRuntime. r=bzbarsky
There is only a single XPC JS runtime now, so there's no need to keep a
special pointer around.

Differential Revision: https://phabricator.services.mozilla.com/D26068

--HG--
extra : moz-landing-system : lando
2019-04-04 21:02:15 +00:00
Narcis Beleuzu
24dbe577a5 Backed out changeset 389b6bbd76db (bug 1519636) for bustages on MarkupMap.h . CLOSED TREE 2019-04-05 00:27:56 +03:00
Sylvestre Ledru
399dbd28fe Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan
clang-format-8 upstream had some improvements wrt macros
See: https://reviews.llvm.org/D33440
This is why the diff is bigger than usual

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D26098

--HG--
extra : moz-landing-system : lando
2019-04-04 20:12:23 +00:00
Boris Zbarsky
8b2ada715e Bug 1541600 part 2. Stop using AutoJSContext for the slow script dialog. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D26224

--HG--
extra : moz-landing-system : lando
2019-04-04 20:00:36 +00:00
Andrew McCreight
ec3b52a535 Bug 1541677, part 2 - Remove the unused XPIDL version of GetInterfaceInfo. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D26066

--HG--
extra : moz-landing-system : lando
2019-04-04 05:05:04 +00:00
Andrew McCreight
2f250e281e Bug 1541677, part 1 - Remove unused cx arg to the nsXPCWrappedJSClass ctor. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D26065

--HG--
extra : moz-landing-system : lando
2019-04-04 05:04:41 +00:00
Petr Sumbera
c54d6f748b Bug 1434726 - Avoid SIGBUS on SPARC systems in HashIIDPtrKey r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D25429

--HG--
extra : moz-landing-system : lando
2019-04-02 17:27:23 +00:00
Eden Chuang
72b79c6fbd Bug 1442778 - Add "chromeContext" parameter to console API and console service messages. r=smaug
1. Adding a new attribute chromeContext in ConsoleEvent
2. Adding a new boolean attribute isFromChromeContext in nsIConsoleMessage
3. Sending IsFromChromeContext to the parent process

Differential Revision: https://phabricator.services.mozilla.com/D23330

--HG--
extra : moz-landing-system : lando
2019-04-01 22:42:34 +00:00
Jonathan Kew
243b72de64 Bug 1533428 - patch 1 - Use fully-qualified name for mozilla::ipc::FileDescriptor in AutoMemMap.h, rather than depending on a 'using' declaration. r=jwatt
Differential Revision: https://phabricator.services.mozilla.com/D22908

--HG--
extra : moz-landing-system : lando
2019-04-01 14:32:12 +00:00
Nathan Froyd
206cdc4471 Bug 1540273 - fix undefined behavior in nsXPCWrappedJSClass; r=mccr8
Left shifts exhibit undefined behavior if the sign bit changes, which
would happen in this code for indices that are 31 mod 32.  Fix this by
always making sure the shifted value is an unsigned integer.

Differential Revision: https://phabricator.services.mozilla.com/D25476

--HG--
extra : moz-landing-system : lando
2019-03-29 22:58:07 +00:00
Sylvestre Ledru
ef0bfc3822 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D24168

--HG--
extra : moz-landing-system : lando
2019-03-31 15:12:55 +00:00
Oana Pop Rus
a759d6f62b Merge inbound to mozilla-central. a=merge 2019-03-29 23:54:39 +02:00
Jan de Mooij
126dd4fe64 Bug 1534902 - Move more of XPConnect's PreWrap code into the JS engine. r=kmag
This ensures the JS shell and browser behave the same way and it's nice for fuzzing.

Differential Revision: https://phabricator.services.mozilla.com/D25204

--HG--
extra : moz-landing-system : lando
2019-03-29 09:06:31 +00:00
Tom Schuster
9d316167b9 Bug 1536860 - Telemetry for deprecated Array generics. r=jorendorff datareview=chutten
Differential Revision: https://phabricator.services.mozilla.com/D24208

--HG--
extra : moz-landing-system : lando
2019-03-28 17:15:37 +00:00
Peter Van der Beken
85c5f963e6 Bug 1532025 - Remove support for WrappedNatives from PreserveWrapper, since we don't have DOM objects using WrappedNatives anymore. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D21832

--HG--
extra : moz-landing-system : lando
2019-03-28 14:19:53 +00:00
Jan de Mooij
3ad6efea42 Bug 1382650 part 4 - Split Ion warmup threshold JitOption in 'normal' and 'full' options. r=nbp
Also adds a javascript.options.ion.full.threshold browser pref and similar shell
flags.

This doesn't rename the existing prefs yet.

Differential Revision: https://phabricator.services.mozilla.com/D24156

--HG--
extra : moz-landing-system : lando
2019-03-27 18:57:58 +00:00
Jason Orendorff
785ed53165 Bug 1537609 - Cap the stack size at 2MB on Windows. r=jandem
In bug 256180, the size of the stack on 64-bit Windows was changed from 2MB to
8MB, and on 32-bit Windows, from 1MB to 1.5MB. This is so large that it takes
significantly longer for a runaway recursive function to throw "too much
recursion", which causes terrible performance in scripts obfuscated using
obfuscator.io.

This patch leaves the actual stack size as-is, but changes the
JS-engine-specific stack quota back to 2MB on 64-bit Windows (6MB if ASAN is
enabled). 32-bit Windows is unaffected by the new cap.

Differential Revision: https://phabricator.services.mozilla.com/D24597

--HG--
extra : moz-landing-system : lando
2019-03-27 15:12:00 +00:00
Yoshi Cheng-Hao Huang
7f012345b7 Bug 1521732 - Part 5: RootedObjectVector. r=sfink,jonco
s/AutoObjectVector/RootedObjectVector/g

Depends on D23185

Differential Revision: https://phabricator.services.mozilla.com/D23186

--HG--
extra : moz-landing-system : lando
2019-03-26 14:00:51 +00:00
Yoshi Cheng-Hao Huang
edbc333422 Bug 1521732 - Part 3: Use RootedValueVector instead. r=sfink,jonco
s/AutoValueVector/RootedValueVector/g

Depends on D23183

Differential Revision: https://phabricator.services.mozilla.com/D23184

--HG--
extra : moz-landing-system : lando
2019-03-26 13:58:20 +00:00
Jason Orendorff
1c204efb75 Bug 1495072 - Part 2: Add pref for the await fix. r=arai
Differential Revision: https://phabricator.services.mozilla.com/D24255

--HG--
extra : moz-landing-system : lando
2019-03-26 18:16:55 +00:00
Cosmin Sabou
78fc71e3c3 Backed out changeset 7fa7d6e6dedc (bug 1442778) for devtools failures on browser_webconsole_check_stubs_console_api.js CLOSED TREE 2019-03-26 20:27:55 +02:00
Eden Chuang
5e4df764d9 Bug 1442778 - Add "chromeContext" parameter to console API and console service messages. r=smaug
1. Adding a new attribute chromeContext in ConsoleEvent
2. Adding a new boolean attribute isFromChromeContext in nsIConsoleMessage
3. Sending IsFromChromeContext to the parent process

Differential Revision: https://phabricator.services.mozilla.com/D23330

--HG--
extra : moz-landing-system : lando
2019-03-26 15:18:20 +00:00
Andy Wingo
baaa715e33 Bug 1538488 - Fix XPConnect/BigInt test when bigint is off r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D24667

--HG--
extra : moz-landing-system : lando
2019-03-26 07:17:47 +00:00
sakshaat
d781937a67 Bug 1517483 - Get rid of nsIScriptSecurityManager::IsSystemPrincipal r=bzbarsky
Replaced instances of callers in both C++ and JS files to query the state from the principal directly.

Differential Revision: https://phabricator.services.mozilla.com/D22532

--HG--
extra : moz-landing-system : lando
2019-03-24 20:36:25 +00:00
Tom Schuster
d65d068e74 Bug 1222552 - Fix xpconnect test. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D24537

--HG--
extra : moz-landing-system : lando
2019-03-22 18:11:10 +00:00
Tom Schuster
dc40a0d446 Bug 1222552 - Remove String generics. r=jorendorff
Differential Revision: https://phabricator.services.mozilla.com/D24406

--HG--
extra : moz-landing-system : lando
2019-03-22 18:11:08 +00:00
Matthew Gaudet
872e0839a3 Bug 1505574 - Remove Unboxed Objects Option Code r=iain
Differential Revision: https://phabricator.services.mozilla.com/D24048

--HG--
extra : moz-landing-system : lando
2019-03-22 15:33:12 +00:00
Andy Wingo
83128e6945 Bug 1531293 - Enable javascript.options.bigint on Nightly r=jandem,kmag
Differential Revision: https://phabricator.services.mozilla.com/D21528

--HG--
extra : moz-landing-system : lando
2019-03-22 08:57:44 +00:00
Jason Orendorff
b0968b1c83 Bug 1536887 - Remove obsolete getter syntax in an old test file. r=jwalden
Noticed by Ian Moody [:Kwan] while watching test output. (!)

The test was introduced in bug 515475, 10 years ago. However, the syntax used
in this patch seems to have been removed from SpiderMonkey around that time,
maybe even before the patch landed; that is, this is not among the syntax
removed in bug 517580. As far as I can tell, this test has never functioned
properly.

Differential Revision: https://phabricator.services.mozilla.com/D24236

--HG--
extra : moz-landing-system : lando
2019-03-20 20:41:01 +00:00
Olli Pettay
1dc9c72510 Bug 1536266, remove unused XPCVariant::mCCGeneration, r=mbrodesser
Differential Revision: https://phabricator.services.mozilla.com/D24016

--HG--
extra : moz-landing-system : lando
2019-03-19 14:52:35 +00:00
Chris Peterson
3f655a7340 Bug 1534878 - xpcom: Rename NS_InitXPCOM2() to NS_InitXPCOM(). r=froydnj
--HG--
extra : rebase_source : 6e7a46cf49f78e46e12d1e7fc76aba6f0c377be0
2019-03-14 23:38:09 -07:00
Sylvestre Ledru
4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
David Major
e5773183d6 Bug 1528074 - Remove MSVC warning flags that clang-cl doesn't understand r=chmanchester
Per the previous patch, clang-cl only understands five MSVC-style warning flags: 7219c7e9af/clang/include/clang/Driver/CLCompatOptions.td (L188-L197)

This patch removes the flags that clang-cl doesn't understand.

Differential Revision: https://phabricator.services.mozilla.com/D22588

--HG--
extra : moz-landing-system : lando
2019-03-13 20:19:08 +00:00
Jason Orendorff
8d46729792 Bug 1529758 - Add a pref for fields. r=tcampbell
This creates a shell command-line option, `--enable-experimental-fields`, and a
Gecko pref, `javascript.options.experimental.fields`.

Both are off by default everywhere, for now.

Differential Revision: https://phabricator.services.mozilla.com/D22045

--HG--
extra : moz-landing-system : lando
2019-03-12 19:14:57 +00:00
Ciure Andrei
0d9d47364c Backed out changeset 2b5f40fc403b (bug 1529758) for FullParseHandler build bustages CLOSED TREE 2019-03-12 19:28:03 +02:00
Jason Orendorff
51eb0a44fd Bug 1529758 - Add a pref for fields. r=tcampbell
This creates a shell command-line option, `--enable-experimental-fields`, and a
Gecko pref, `javascript.options.experimental.fields`.

Both are off by default everywhere, for now.

Differential Revision: https://phabricator.services.mozilla.com/D22045

--HG--
extra : moz-landing-system : lando
2019-03-12 16:42:41 +00:00
Jeff Walden
8c1d08c491 Bug 1534437 - Make JSFlatString::new_ always take ownership of the |chars| passed to it, and add the same sensible ownership handling to a bunch of callers. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D23043

--HG--
extra : rebase_source : 60741661edc946794e97736dd013ed6eb9609d56
extra : amend_source : 0379248e2bee7588180739224b8008d927ab03f7
2019-03-08 22:28:08 -08:00
Jeff Walden
b299df2f1a Bug 1533636 - Don't bother explicitly aligning when XDRing char16_t data: the operations we use to perform the little/native-endian conversion will correctly translate into, or translate out of, unaligned memory. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D22654

--HG--
extra : rebase_source : 2013431c35fff24bb003671dc257005903ff3c07
2019-03-06 13:36:47 -08:00
Jason Orendorff
e6312a3716 Bug 1533413 - Add Symbol.matchAll to list of expected RegExp methods. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D22583

--HG--
extra : moz-landing-system : lando
2019-03-11 10:20:38 +00:00
Jan de Mooij
d105968a3d Bug 1533302 part 3 - Use UniquePtr for CompartmentPrivate's XPCWrappedNativeScope. r=mccr8
`CompartmentPrivate::GetScope()` was added so callers don't have to do `scope.get()`
manually. The `scope` field is now private and was renamed to `mScope`.

Also replaces some `CompartmentPrivate::Get(obj)->scope` instances with
`ObjectScope(obj)`. It's equivalent but shorter.

Differential Revision: https://phabricator.services.mozilla.com/D22664

--HG--
extra : moz-landing-system : lando
2019-03-09 10:44:18 +00:00
Jan de Mooij
caa37e0fbf Bug 1533302 part 2 - Tie XPCWrappedNativeScope lifetime to CompartmentPrivate. r=mccr8
XPCWrappedNativeScope is now allocated and destroyed with the CompartmentPrivate
that owns it. In follow-up bugs we could merge the two classes (see bug 1032928).

This also removes the dying-scopes list. XPCJSRuntime now stores the list of all
scopes as mozilla::LinkedList.

Differential Revision: https://phabricator.services.mozilla.com/D22492

--HG--
extra : moz-landing-system : lando
2019-03-08 13:28:47 +00:00
Jan de Mooij
b196cb4d46 Bug 1533302 part 1 - Remove unused XPCWrappedNativeScope::IsDyingScope. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D22491

--HG--
extra : moz-landing-system : lando
2019-03-07 19:05:36 +00:00
Andrea Marchesini
8e20bbbc9a Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D21538

--HG--
extra : moz-landing-system : lando
2019-03-08 09:04:11 +00:00
arthur.iakab
93997623bd Merge mozilla-central to autoland a=merge on a CLOSED TREE 2019-03-08 00:14:12 +02:00
Doug Thayer
cc84fd752b Bug 1533056 - Move test_startup_caches out of marionette unit tests r=whimboo
Renamed the test to reflect that it is really just a test of the script preloader
as well. I just moved it to get it close to the ScriptPreloader and near existing
tests.

Differential Revision: https://phabricator.services.mozilla.com/D22330

--HG--
rename : testing/marionette/harness/marionette_harness/tests/unit/test_startup_caches.py => js/xpconnect/tests/marionette/test_preloader_telemetry.py
extra : moz-landing-system : lando
2019-03-07 06:30:38 +00:00
Ciure Andrei
712dd2bb8c Backed out 16 changesets (bug 1525245) for perma failing test_document_cookie.html CLOSED TREE
Backed out changeset 3fd27215698f (bug 1525245)
Backed out changeset d9a9e8e77873 (bug 1525245)
Backed out changeset 0e6f7be92e3f (bug 1525245)
Backed out changeset 6790802e2fa5 (bug 1525245)
Backed out changeset a5a9e01116ed (bug 1525245)
Backed out changeset 66e19a0c38dd (bug 1525245)
Backed out changeset fb90d51ba853 (bug 1525245)
Backed out changeset 4772db3625b3 (bug 1525245)
Backed out changeset 9affaf0cb998 (bug 1525245)
Backed out changeset a91b7ebe8bdd (bug 1525245)
Backed out changeset c2a13a7480e1 (bug 1525245)
Backed out changeset abe4482fa137 (bug 1525245)
Backed out changeset b3920c0bcf84 (bug 1525245)
Backed out changeset 0821b81f2724 (bug 1525245)
Backed out changeset 70bed2ad7899 (bug 1525245)
Backed out changeset 5f72ba232cc8 (bug 1525245)
2019-03-07 17:54:18 +02:00
Andrea Marchesini
6856f88972 Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 12 - nsICookieSettings for the channel creation, r=ckerschb,asuth,Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D21538

--HG--
extra : moz-landing-system : lando
2019-03-07 10:21:15 +00:00
Lars T Hansen
deeddf1721 Bug 1488205 - Repurpose the --wasm-gc switch for GC. r=jseward
Differential Revision: https://phabricator.services.mozilla.com/D21692

--HG--
extra : rebase_source : 83d2b48fd76a03a8cf175e5f820b4b33f087e4d2
extra : histedit_source : e90289fdb70c787a90a338a2d64e902f4051b34c
2019-03-01 09:55:31 +01:00
Olli Pettay
37d309e927 Bug 1412485, disable legacy touch APIs on desktop, r=masayuki
Hiding document.createEvent("TouchEvent"), document.createTouch, document.createTouchList and ontouch* event
handlers on desktop to follow what Chrome has done.
This patch explicitly does not remove createTouch or createTouchList everywhere, although those seem to have been
removing already on some other browsers.
Devtools use TOUCHEVENTS_OVERRIDE_ENABLED for touch event testing, and this patch keeps the old behavior per discussion
with devtools devs.

Differential Revision: https://phabricator.services.mozilla.com/D22081

--HG--
extra : rebase_source : 562588a289632ba2f11db7f3ac8782c26c3b05f8
2019-03-04 13:35:53 +02:00
Doug Thayer
55db157391 Bug 1364235 - Collect telemetry stats on startup cache hits and misses r=kmag
In bug 1264235 we have some indication that observed bugs with the
startup cache might have been resolved, but we don't really know
until we collect data. Collecting these stats will give us the
ability to have more certainty that the startup cache is functioning
correctly in the wild.

Differential Revision: https://phabricator.services.mozilla.com/D19573

--HG--
extra : moz-landing-system : lando
2019-03-05 16:52:57 +00:00
Jan de Mooij
68ebf9f2e2 Bug 1530608 part 2 - Use the isSameCompartment JS testing function in test_sharedChromeCompartment.html. r=bzbarsky
Depends on D21568

Differential Revision: https://phabricator.services.mozilla.com/D21569

--HG--
extra : moz-landing-system : lando
2019-02-28 19:51:42 +00:00
Gurzau Raul
a218f01445 Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-03-01 15:14:00 +02:00
Cameron Kaiser
651429b4c2 Bug 1512162 - Reenable stack protection for ppc64le in XPConnect. r=bholley 2019-02-27 19:31:08 -08:00
Boris Zbarsky
3f1bb52920 Bug 1530146 part 2. Back out the fix for bug 1526624, since it's no longer needed. r=bholley
Differential Revision: https://phabricator.services.mozilla.com/D21482

--HG--
extra : moz-landing-system : lando
2019-03-01 00:19:53 +00:00