Commit Graph

7144 Commits

Author SHA1 Message Date
Sylvestre Ledru
7f60810d86 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-04-12 13:14:25 +00:00
Andrea Marchesini
a438b12ebd Bug 1536411 - StoragePrincipal - part 1 - Implementation, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D24025

--HG--
extra : moz-landing-system : lando
2019-04-12 05:31:32 +00:00
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