Commit Graph

133 Commits

Author SHA1 Message Date
Tom Schuster
050d853e33 Bug 1468774 - Remove getPropertyDescriptor from CPOWs. r=mrbkap r=mccr8 2018-04-03 18:21:40 +02:00
Jan de Mooij
fddc23c346 Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Alex Gaynor
717ac53588 Bug 1470890 - handle deserialization failure gracefully in JS IPC; r=evilpie
Summary: This primarily affects the efficiency of fuzzing.

Reviewers: evilpie

Reviewed By: evilpie

Bug #: 1470890

Differential Revision: https://phabricator.services.mozilla.com/D1797
2018-06-27 16:10:41 +03:00
Alex Gaynor
ea7d08f175 Bug 1470181 - handle deserialization failure gracefully in JS IPC; r=evilpie
This primarily effects the efficiency of fuzzing.

Differential Revision: https://phabricator.services.mozilla.com/D1751
2018-06-21 18:47:08 +00:00
Alex Gaynor
687ce91a32 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
Jan de Mooij
e5f8a28c84 Bug 1461292 part 1 - Rename JSAutoCompartment to JSAutoRealm. r=bz,luke 2018-05-16 10:53:16 +02:00
Adrian Wielgosik
93eb294385 Bug 1460940 - Clean up most remaining C++-side uses of nsIDOMDocument. r=bz
MozReview-Commit-ID: LKRnyDPNlle
2018-05-11 19:46:15 +02:00
Jan de Mooij
37b8f5c8c3 Bug 1413867 - Remove StopIteration object. r=evilpie 2017-11-05 19:01:04 +01:00
Jon Coppeard
92628b5345 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
Jan de Mooij
e959a1182a 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
0603cbc370 Backed out changeset 3a0a2ffe803b (bug 1379461) for hazard failure 2017-07-11 12:59:09 +02:00
Jan de Mooij
a2a13185d4 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
4afba77787 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
a58025002f 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.
2017-06-22 17:08:53 +10:00
Jan de Mooij
6ad0a86b42 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
Jon Coppeard
d60b70fa01 Bug 1352430 - Add barrier to CPOWs table to remove dying objects r=billm 2017-04-26 11:18:53 +01:00
Jon Coppeard
1690b0506c Bug 1345177 - Remove use of RegExpGuard r=sfink 2017-03-27 10:38:29 +01:00
Jon Coppeard
f2dc766532 Backed out changesets e66f564d9749 and 0380d914ad39 (bug 1345177) for rooting hazards 2017-03-27 11:09:54 +01:00
Jon Coppeard
08352c6c76 Bug 1345177 - Remove use of RegExpGuard r=sfink 2017-03-27 10:38:29 +01:00
Boris Zbarsky
b0f35c60e3 Bug 1335368 part 8. Stop using IsCallerChrome in UnwrapArgImpl. r=bholley 2017-02-01 15:43:37 -05:00
Andrew McCreight
1bde316c56 Bug 1331809 - Remove unused variable in WrapperOwner::hasInstance(). r=kanru
MozReview-Commit-ID: 3de6HDTVpU0
2017-01-17 16:34:16 -08:00
David Major
c4864e69d5 Bug 1311825: Pass by reference in fromObjectVariant and related methods. r=billm
MozReview-Commit-ID: GIhK1zRMsYb
2016-10-20 15:37:26 -05:00
Bill McCloskey
1deceb4b29 Bug 1311212 - Add dead CPOW debugging facility (r=mrbkap) 2016-10-19 16:26:23 -07:00
Terrence Cole
ed32b698b3 Bug 1297558 - Use a read barrier on Heap to ExposeToActiveJS r=sfink r=mccr8 2016-02-07 09:08:55 -08:00
Tooru Fujisawa
a33ab4d32a Bug 1290337 - Part 13: Replace Value parameter to const Value& in finalizeInBackground. r=sfink 2016-09-11 18:15:23 +09:00
Tooru Fujisawa
a5294e0308 Bug 1289050 - Part 1: Use ASCII variant of JS_ReportError in simple case. r=jwalden 2016-08-14 20:39:28 +09:00
Kan-Ru Chen
a9b19d0584 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
2016-08-24 14:47:04 +08:00
Jan de Mooij
519f0d4bf1 Bug 1292892 part 7 - Remove unnecessary JSContext arguments from IPC classes. r=bz 2016-08-11 14:39:23 +02:00
Jan de Mooij
bd0f1c9018 Bug 1292892 part 1 - Stop using JSRuntime outside SpiderMonkey. r=bz,terrence,fitzgen,kanru 2016-08-11 14:39:22 +02:00
Wei-Cheng Pan
0a2691dccf Bug 1249698 - Use parent stack instead of vanished child stack. r=billm
MozReview-Commit-ID: LaX5K1uPZo9
2016-07-26 18:30:42 +08:00
Chris Peterson
c35faf4632 Bug 1277775 - Replace MOZ_CONSTEXPR{_VAR,_TMPL} with constexpr. r=froydnj 2016-07-08 14:39:53 -07:00
Tom Schuster
88135ce2c1 Bug 1114580 - Change ESClassValue to an enum class. r=jorendorff 2016-06-30 00:04:56 +02:00
Jeff Walden
f0a3c8bf07 Bug 1264896 - Kill off nsIRemoteTagService and do what it does, in its sole caller, in far-faster C++. r=billm 2016-04-21 21:51:16 -07:00
Jeff Walden
51488fefe9 Bug 888969 - Make the getPrototypeOf/setPrototypeOf traps scriptable. r=efaust, r=bholley 2016-02-23 13:42:30 -08:00
Tooru Fujisawa
029eaac034 Bug 1219757 - Part 10: Remove HandleObject parameter from JS_NewRegExpObject and JS_NewUCRegExpObject. r=till 2015-11-25 22:38:05 +09:00
Tom Schuster
8436c3c6c9 Bug 1242214 - Rename JSPropertyDescriptor JS::PropertyDescriptor in js. r=sstangl 2016-01-28 11:28:04 +01:00
David Rajchenbach-Teller
323ccee44c Bug 1224374 - Profiler labels for the top 26-100 chrome hangs;r=BenWa 2016-01-15 11:38:03 +01:00
Sebastian Hengst
2e241e7e5e Backed out 2 changesets (bug 1224374) for Windows bustage. r=bustage on a CLOSED TREE
Backed out changeset 5f458e6e4997 (bug 1224374)
Backed out changeset 0dc02cb0b604 (bug 1224374)
2016-01-19 21:30:41 +01:00
David Rajchenbach-Teller
f7045cd073 Bug 1224374 - Profiler labels for the top 26-100 chrome hangs;r=BenWa 2016-01-15 11:38:03 +01:00
Bill McCloskey
7953e46b07 Bug 1215167 - Forbid unsafe browser CPOWs (disabled by default for now) (r=mrbkap) 2015-11-05 13:17:04 -08:00
Wes Kocher
dd9e3ef892 Backed out changeset 89446bf8d6b8 (bug 1215167) for introducing a hazard 2015-11-04 16:16:59 -08:00
Bill McCloskey
f333296703 Bug 1215167 - Forbid unsafe browser CPOWs (disabled by default for now) (r=mrbkap) 2015-11-04 13:40:15 -08:00
Birunthan Mohanathas
ac37dec517 Bug 1219392 - Capitalize mozilla::unused to avoid conflicts. r=froydnj 2015-11-02 07:53:26 +02:00
Jeff Walden
9399e8c7de Bug 1179003 - Convert the infallible objectClassIs proxy hook into a fallible getBuiltinClass hook that indicates class type via outparam. r=efaust, r=bz on DOM bits, r=billm on IPC bits 2015-08-28 21:55:40 -07:00
Jeff Walden
ff30226147 Bug 1187234 - Throw a TypeError when Array.isArray is passed a revoked proxy. r=efaust 2015-08-23 01:10:24 -07:00
Tom Schuster
62062f042f Bug 603201 - Change GetProperty receiver argument to Value in the browser. r=smaug 2015-09-18 00:14:41 +02:00
Bill McCloskey
858dc93281 Bug 1177013 - Use CancelCurrentTransaction to avoid crashes (r=dvander) 2015-07-06 19:58:44 -07:00
Phil Ringnalda
3397b7a81c Back out 12 changesets (bug 1177013) on suspicion of causing b2g emulator debug test bustage
CLOSED TREE

Backed out changeset 912aae0815f8 (bug 1177013)
Backed out changeset 3b6448172e50 (bug 1177013)
Backed out changeset 2af18bef5703 (bug 1177013)
Backed out changeset e6bf35115c11 (bug 1177013)
Backed out changeset 4d7f5205b60b (bug 1177013)
Backed out changeset f7de893911bc (bug 1177013)
Backed out changeset de79eba232f0 (bug 1177013)
Backed out changeset 978a77b60f2a (bug 1177013)
Backed out changeset f5b52fa19511 (bug 1177013)
Backed out changeset e14a7b70b6fa (bug 1177013)
Backed out changeset d0f5a3474659 (bug 1177013)
Backed out changeset bff9f07dad52 (bug 1177013)
2015-07-02 22:08:54 -07:00
Bill McCloskey
7e4531ff83 Bug 1177013 - Use CancelCurrentTransaction to avoid crashes (r=dvander) 2015-07-02 17:18:10 -07:00
David Rajchenbach-Teller
c2a2e375fc Bug 1156264 - Activate/deactivate jank and CPOW monitoring separately (low-level). r=jandem 2015-06-04 13:12:07 +02:00