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

475 Коммитов

Автор SHA1 Сообщение Дата
Alex Gaynor 3dc2139816 Bug 1465860 - Don't crash in JS IPC on invalid object id. r=evilpie
Instead, return an error up to the caller, who can return an IPC error, which
will kill the child. This is significantly friendlier to fuzzing.

MozReview-Commit-ID: C67xSqUeN1i
2018-05-31 16:29:03 -04:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Steve Fink 0680fed494 Bug 1464266 - Rename GCForReason to NonIncrementalGC, r=jonco
--HG--
extra : topic : GCForReason
extra : rebase_source : e81bf7bb8ca0824f8b63f25a46ccbe26c4002325
2018-05-24 16:19:18 -07:00
Jan de Mooij 80e44e8003 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Adrian Wielgosik c501e3beb0 Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz
MozReview-Commit-ID: LKRnyDPNlle

--HG--
extra : rebase_source : a48b7c72a0f7ede38c91149a04d5de53987736f1
2018-05-11 19:46:15 +02:00
Kris Maglione 664bb69fcc Bug 1445551: Part 3 - Remove AllowCPOWsInAddon machinery. r=mccr8
This is all dead code now that the add-on manager support for shimmed add-ons
has been removed.

MozReview-Commit-ID: J6aRQDqEahs

--HG--
extra : rebase_source : 406d65b2a0be6340df6c28f42b38bd8a47b96b77
2018-03-13 19:20:17 -07:00
Andrea Marchesini 5784769019 Bug 1443079 - nsScriptError.isFromPrivateWindow must match the correct value also in e10s mode, r=smaug 2018-03-13 06:40:38 +01:00
Jason Orendorff e7c94fff59 Bug 1439063 - Part 1: Move several public headers from js/src to js/public. r=jandem.
js/src/jsalloc.h -> js/public/AllocPolicy.h
jsalloc.cpp -> js/src/util/AllocPolicy.cpp
jsbytecode.h -> merge into js/public/TypeDecls.h
jsprf.h -> js/public/Printf.h
jsprf.cpp -> js/src/util/Printf.cpp
jsprototypes.h -> public/ProtoKey.h
jswrapper.h -> js/Wrapper.h

--HG--
rename : js/src/jsalloc.h => js/public/AllocPolicy.h
rename : js/src/jsprf.h => js/public/Printf.h
rename : js/src/jsprototypes.h => js/public/ProtoKey.h
rename : js/src/jswrapper.h => js/public/Wrapper.h
rename : js/src/jsalloc.cpp => js/src/util/AllocPolicy.cpp
rename : js/src/jsprf.cpp => js/src/util/Printf.cpp
extra : rebase_source : 98b16d94c469202eab0303a8da844f1d0b6aa809
extra : amend_source : e0b16c1077226d6fe240f4d7096537f93b43f2b8
extra : histedit_source : d94e0ba7904a7d66742c7fac43f638aaec4fa4e5
2018-02-21 10:30:19 -06:00
Chris Peterson 37efe4d0e6 Bug 1428535 - Add missing override specifiers to overridden virtual functions. r=froydnj
MozReview-Commit-ID: DCPTnyBooIe

--HG--
extra : rebase_source : cfec2d96faeb11656d86d760a34e0a04cacddb13
extra : intermediate-source : 6176724d63788b0fe8caa3f91607c2d93dbaa7ec
extra : source : eebbb0600447f9b64aae3bcd47b4be66c02a51ea
2017-11-05 19:37:28 -08:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Jan de Mooij 2681f26832 Bug 1413867 - Remove StopIteration object. r=evilpie 2017-11-05 19:01:04 +01:00
Steve Fink 67d7e8dcdc Bug 1406570 - Rooting improvements, r=jonco,bz
--HG--
extra : rebase_source : 48d6fd63e016abe7a6ce22e621d25858560e61f1
2017-10-09 10:59:02 -07:00
Jan de Mooij 68e468c3ff Bug 1403136 - Clean up JSSetterOp code now that slotful setters are gone. r=evilpie 2017-09-26 22:26:40 +02:00
Jon Coppeard 1077972535 Bug 1396613 - Update the object moved hook to allow it to be called when tenuring nursery objects r=sfink r=mccr8 2017-09-19 12:31:30 +01:00
Jason Orendorff b311db1626 Bug 1363200 - JSAPI for realms: Split xpc::RealmPrivate from xpc::CompartmentPrivate. r=mrbkap
--HG--
extra : rebase_source : c4bc2da0e808f1ab7a4bfab407a61ef15d3785a5
extra : intermediate-source : a2cc554590772b94071af1df59fc62a6766a6924
extra : source : 0e7c0edaa224d2ccaa4d410fd89d859256b0dc67
2017-06-08 11:07:10 -05:00
Jan de Mooij ad11155416 Bug 1393790 part 2 - Remove JS_PropertyStub and JS_StrictPropertyStub. r=jorendorff 2017-08-28 10:40:19 +02:00
Nicholas Nethercote 72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10:00
Ehsan Akhgari b940c3d6e8 Bug 1382339 - Improve SpiderMonkey hashing functions by using MFBT's HashGeneric more; r=jandem 2017-07-20 12:59:09 -04:00
Jan de Mooij 5c5ead5942 Bug 1379461 - Refactor code to return RegExpShared* directly instead of using bool + outparam. r=evilpie,sfink 2017-07-11 11:31:12 +02:00
Carsten "Tomcat" Book 93c690a082 Backed out changeset 3a0a2ffe803b (bug 1379461) for hazard failure 2017-07-11 12:59:09 +02:00
Jan de Mooij 669d53bfea Bug 1379461 - Refactor code to return RegExpShared* directly instead of using bool + outparam. r=evilpie 2017-07-11 11:31:12 +02:00
Jan de Mooij 53de04c6f6 Bug 1375505 part 1 - Change iterator code to return JSObject* instead of returning bool + outparam. r=evilpie 2017-06-28 21:00:43 -07:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Jan de Mooij f480e9ecdf Bug 1237504 - Refactor proxy slot layout to allow proxies to have more than 2 slots. r=bz,jonco
The patch makes the following proxy changes:

* The number of slots in ProxyValueArray is now dynamic and depends on the number of reserved slots we get from the Class.
* "Extra slots" was renamed to "Reserved slots" to make this clearer.
* All proxy Classes now have 2 reserved slots, but it should be easy to change that for proxy Classes that need more than 2 slots.
* Proxies now store a pointer to these slots and this means GetReservedSlot and SetReservedSlot can be used on proxies as well. We no longer need GetReservedOrProxyPrivateSlot and SetReservedOrProxyPrivateSlot.

And some changes to make DOM Proxies work with this:

* We now store the C++ object in the first reserved slot (DOM_OBJECT_SLOT) instead of in the proxy's private slot. This is pretty nice because it matches what we do for non-proxy DOM objects.
* We now store the expando in the proxy's private slot so I removed GetDOMProxyExpandoSlot and changed the IC code to get the expando from the private slot instead.
2017-04-28 14:12:28 +02:00
Bill McCloskey 3e774f9f8a Bug 1359245 - Eliminate nsXPConnect::GetContextInstance() (r=mccr8)
This method assumes there is one global XPCJSContext. This patch eliminates
uses of it.

MozReview-Commit-ID: L2AkBGh5TnC
2017-04-27 15:34:46 -07:00
Jon Coppeard 57137dea9d Bug 1352430 - Add barrier to CPOWs table to remove dying objects r=billm
--HG--
extra : rebase_source : a923df26fc706615b248191cf544a372ff357bd4
2017-04-26 11:18:53 +01:00
Jon Coppeard 541762d31f Bug 1345177 - Remove use of RegExpGuard r=sfink 2017-03-27 10:38:29 +01:00
Jon Coppeard 1376c2700e Backed out changesets e66f564d9749 and 0380d914ad39 (bug 1345177) for rooting hazards 2017-03-27 11:09:54 +01:00
Jon Coppeard bd92dc578f Bug 1345177 - Remove use of RegExpGuard r=sfink 2017-03-27 10:38:29 +01:00
Jon Coppeard e4d62401f0 Bug 1341044 - Rename the GC's 'zone group' concept to 'sweep group' r=sfink 2017-03-22 17:30:50 +00:00
Tom Tromey d2667a2b27 Bug 1060419 - make AppendPrintf and nsPrintfCString use Printf.h, r=froydnj
MozReview-Commit-ID: 2E8FoiNxU8L

--HG--
extra : rebase_source : 810ac727bef0751f24edea18c52e0ec170bf367d
2016-12-14 09:32:21 -07:00
Tom Schuster 39312086de Bug 1339036 - Rename JSTYPE_VOID to JSTYPE_UNDEFINED. r=arai 2017-02-13 17:26:16 +01:00
Boris Zbarsky da79ef55fe Bug 1335368 part 8. Stop using IsCallerChrome in UnwrapArgImpl. r=bholley 2017-02-01 15:43:37 -05: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
Andrew McCreight 66033ff282 Bug 1331809 - Remove unused variable in WrapperOwner::hasInstance(). r=kanru
MozReview-Commit-ID: 3de6HDTVpU0

--HG--
extra : rebase_source : 19c7899e6d70ffc3f8a469b8cd0a6a08b2654b6d
2017-01-17 16:34:16 -08:00
Andrew McCreight dce0bbd67b Bug 1330018 - Ensure we always unwrap CpowEntries. r=bholley,billm
We can drop async messages that contain CPOWs, which can cause us to
leak them either until we successfully send a CPOW or forever,
depending on the direction of the message. This is causing
intermittent leaks until shutdown with e10s-multi.

MozReview-Commit-ID: 3iIaIBZKZR2

--HG--
extra : rebase_source : 3383191e12fd4a4054ad8f9bdc3755e78c16caf1
2017-01-13 13:50:35 -08:00
Andrew McCreight 1664a1d93b Bug 1331115 - Fix two typos in CPOW code. r=billm
MozReview-Commit-ID: FAh7O1U9hGP

--HG--
extra : rebase_source : 6f77705351a40924241a93ca5f2d81d607399c9e
2017-01-13 09:49:17 -08: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
Jon Coppeard 72039bc43f Bug 1318384 - Don't trigger pre barrier in WrapperAnswer::RecvDropObject r=billm 2016-11-18 13:18:09 +00:00
Kan-Ru Chen f8100451db Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm
We will use the new type for the generated IPDL message handler
prototype to make sure correct error handling method is called.

MozReview-Commit-ID: AzVbApxFGZ0
2016-11-15 04:26:00 +01:00
Bill McCloskey 4e78a26c74 Bug 792652 - Simplify IPDL type hierarchy (r=dvander)
Currently all our protocols inherit from IProtocolManager<IProtocol>. I have
no idea why. This patch switches everything over to IProtocol, without any
templates. I had to move ReadActor to the .cpp file to avoid redefinition
errors.
2016-11-08 15:22:34 -08:00
Wes Kocher 4b3d16605a Backed out 18 changesets (bug 792652) for build bustage on linux64 a=backout CLOSED TREE
Backed out changeset 90eaf6aec002 (bug 792652)
Backed out changeset ddd915ab4a48 (bug 792652)
Backed out changeset 95eff6c45cae (bug 792652)
Backed out changeset 75855b5a9ab9 (bug 792652)
Backed out changeset b658ebaad5d7 (bug 792652)
Backed out changeset 2ba36b8ac60c (bug 792652)
Backed out changeset 94fcd3bf3f34 (bug 792652)
Backed out changeset cf9c4164eb43 (bug 792652)
Backed out changeset 59e6d0a4f35b (bug 792652)
Backed out changeset bdf86b8b9c43 (bug 792652)
Backed out changeset 8edf4b247250 (bug 792652)
Backed out changeset 63a3c8e4016e (bug 792652)
Backed out changeset e3e496eab991 (bug 792652)
Backed out changeset 5a1e3136323a (bug 792652)
Backed out changeset dbbe3a8c00e7 (bug 792652)
Backed out changeset 1829d5358808 (bug 792652)
Backed out changeset 004cd692ba6d (bug 792652)
Backed out changeset 92e7fee81fa2 (bug 792652)
2016-11-08 12:05:28 -08:00
Bill McCloskey 2dc5f495db Bug 792652 - Simplify IPDL type hierarchy (r=dvander)
Currently all our protocols inherit from IProtocolManager<IProtocol>. I have
no idea why. This patch switches everything over to IProtocol, without any
templates. I had to move ReadActor to the .cpp file to avoid redefinition
errors.
2016-11-08 11:32:24 -08:00
David Major 143b6829de Bug 1311825: Pass by reference in fromObjectVariant and related methods. r=billm
MozReview-Commit-ID: GIhK1zRMsYb

--HG--
extra : rebase_source : 7da47ec2ea86e73c9d00cd4e6c1e5c830a54d7e1
2016-10-20 15:37:26 -05:00
Bill McCloskey cbd15a0459 Bug 1311212 - Add dead CPOW debugging facility (r=mrbkap) 2016-10-19 16:26:23 -07:00
Bill McCloskey f478d1188c Bug 1306708 - Rename prio to nested in IPDL (r=dvander) 2016-10-04 20:34:54 -07:00
Bill McCloskey b83db28a45 Revert "Bug 1306708 - Rename prio to nested in IPDL (r=dvander)" on a CLOSED TREE
This reverts commit b1460c626078afbb9290e7d9ecaf3af605d5e893.
2016-10-04 15:55:19 -07:00
Bill McCloskey eddd80027c Bug 1306708 - Rename prio to nested in IPDL (r=dvander) 2016-10-04 15:28:14 -07: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 e0c7801dc3 Bug 1290337 - Part 13: Replace Value parameter to const Value& in finalizeInBackground. r=sfink 2016-09-11 18:15:23 +09:00