Commit Graph

772 Commits

Author SHA1 Message Date
Jeff Walden
4046fe1490 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
--HG--
extra : rebase_source : 6ddc3727c411fdfced6338e5e383a10572575f0f
2015-08-28 21:55:40 -07:00
Tom Schuster
e3fbb8bc43 Bug 603201 - Change GetProperty receiver argument to Value in the browser. r=smaug 2015-09-18 00:14:41 +02:00
Nicholas Nethercote
f1569466ff Bug 1200484 (part 2) - Use JS column numbers in ReportWrapperDenial(). r=mrbkap.
--HG--
extra : rebase_source : 5bb85db84152d38cdf4d6206e0b4d2d5ee95b91b
2015-08-31 21:28:50 -07:00
Nicholas Nethercote
f44287005f Bug 1198334 (part 1) - Replace the opt-in FAIL_ON_WARNINGS with the opt-out ALLOW_COMPILER_WARNINGS. r=glandium.
The patch removes 455 occurrences of FAIL_ON_WARNINGS from moz.build files, and
adds 78 instances of ALLOW_COMPILER_WARNINGS. About half of those 78 are in
code we control and which should be removable with a little effort.

--HG--
extra : rebase_source : 82e3387abfbd5f1471e953961d301d3d97ed2973
2015-08-27 20:44:53 -07:00
Till Schneidereit
36af475fe5 Bug 1198193 - Change all functions taking CallArgs to take const CallArgs& instead. r=Waldo
--HG--
extra : rebase_source : b7cd505c80b34d33d98e336490b117792030d9d5
2015-08-27 21:18:37 +02:00
Kyle Huey
74f03750da Bug 1182316: Part 3 - Add assertions to most other WebIDL entry points, clean up nsIDOMJSWindow cruft. r=peterv 2015-07-16 22:10:35 -07:00
Bobby Holley
e53c744803 Bug 1182409 - Add 'allowWaivers' sandbox option. r=gabor 2015-07-15 11:32:30 -07:00
Birunthan Mohanathas
a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07:00
Juan Gomez
258ad59e3f Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
Jan de Mooij
303b210317 Bug 1177892 part 3 - Remove OBJECT_TO_JSVAL. r=evilpie 2015-06-30 21:09:46 -07:00
Jan de Mooij
80aa064383 Bug 1177892 part 2 - Remove PRIVATE_TO_JSVAL. r=evilpie 2015-06-30 11:20:58 -07:00
Ryan VanderMeulen
7483c0563e Backed out changesets ad58c270ce87 and 849151330d60 (bug 1177892) for B2G bustage.
CLOSED TREE
2015-06-30 15:48:11 -04:00
Jan de Mooij
ba71789f3a Bug 1177892 part 2 - Remove PRIVATE_TO_JSVAL. r=evilpie
--HG--
extra : rebase_source : ab95d8c3cea6679b0dce33a9cac6a1c9b0b0871a
2015-06-30 11:20:58 -07:00
Jan de Mooij
976586cb5f Bug 1177825 - Remove JSVAL_* constants. r=evilpie 2015-06-29 18:36:44 -07:00
Ryan VanderMeulen
5f5c327690 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez
702a59d135 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj
--HG--
extra : rebase_source : 2ecbe6c1dd8a7ad8dc529b53349ad431cf1116c9
2015-06-24 14:11:00 -04:00
Bobby Holley
cc43ed1385 Bug 1174971 - Introduce two variants of getOwnPropertyFromTargetIfSafe. r=gabor,r=arai 2015-06-16 09:00:41 -07:00
Gabor Krizsanits
c5989e232b Bug 1164014 - Shim optimization. r=billm 2015-06-08 09:28:54 +02:00
Nicholas Nethercote
5ed657a8e9 Bug 1171305 - Remove lots of now-unnecessary null-checks involving XPCMaps. r=mrbkap.
Possible because both |new| and PLDHashTable initialization are infallible now.

I had to use NS_ABORT_OOM for a couple of the maps that use js::HashTable,
which still has fallible initialization. There were a couple of uses of those
maps that weren't protected by null-checks, so we would have got crashes anyway
if they had OOMed.

--HG--
extra : rebase_source : 23ff7a427f7da6e276570d14ccb1deb691962be1
2015-05-05 18:20:33 -07:00
Tom Schuster
a65f7266fe Bug 1165722 - Replace JS_GetPropertyDescriptor usage in Xray code. r=bholley 2015-06-02 23:27:39 +02:00
Ryan VanderMeulen
1bc8d0eab9 Backed out changesets eebab8b7ea69 and 5b908d656044 (bug 1164014) for e10s OOMs. 2015-06-02 12:23:12 -04:00
Gabor Krizsanits
7a422f317b Bug 1164014 - Shim optimization. r=billm 2015-06-02 16:00:30 +02:00
Bob Owen
dd609468e4 Backed out 2 changesets (bug 1164014) for WinXP debug crashtest failures on a CLOSED TREE
Backed out changeset 4f4454ece5ac (bug 1164014)
Backed out changeset 81d78a498313 (bug 1164014)
2015-06-01 07:39:25 +01:00
Gabor Krizsanits
e0bd57ba62 Bug 1164014 - Shim optimization. r=billm 2015-05-31 10:46:49 +02:00
Ryan VanderMeulen
585e87aaf9 Backed out changesets 63671ebfa2dd and da3d272ad1c2 (bug 1164011) for frequent xpc::InterposeProperty crashes. 2015-05-29 12:51:34 -04:00
Gabor Krizsanits
06f319aa35 Bug 1164011 - Shim optimisation. r=billm 2015-05-29 14:47:49 +02:00
Gabor Krizsanits
db2105a1c0 Bug 1164011 - interposition for CPOWS. r=billm 2015-05-26 11:55:38 +02:00
Terrence Cole
161a4c26ba Bug 1164602 - Replace js::NullPtr and JS::NullPtr with nullptr_t; r=sfink 2015-05-13 14:07:34 -07:00
Tooru Fujisawa
54cc04881a Bug 861219 - Part 0: Make ClassSpec be able to delegate to another ClassSpec. r=bholley 2015-05-14 13:03:14 +09:00
Carsten "Tomcat" Book
59967ca2ab Backed out changeset 3841e37b0e2f (bug 861219) for JS Crashes on a CLOSED TREE 2015-05-12 12:27:52 +02:00
Tooru Fujisawa
259232ac04 Bug 861219 - Part 0: Make ClassSpec be able to delegate to another ClassSpec. r=bholley 2015-05-12 18:05:38 +09:00
Gabor Krizsanits
0e8ed736d9 Bug 1148188 - part2: interposeCall. r=billm 2015-05-07 14:03:24 +02:00
Gabor Krizsanits
0d0e444a6c Bug 1101182 - One interpose call for one property access. r=bholley 2015-05-04 08:57:52 +02:00
Jon Coppeard
a87fc242a0 Bug 1159714 - Templatise AutoVectorRooter implementation r=terrence 2015-05-01 16:26:10 +01:00
David Major
ebde6b9f4f Bug 1157835: Remove the MSVC_ENABLE_PGO flag from the build system. r=glandium
--HG--
extra : rebase_source : 0c47c99bb8b92f8361a51fd81b20a2cc8647a986
2015-04-27 19:59:27 -04:00
Jan de Mooij
103a223716 Bug 1155946 part 1 - Add a mayResolve class hook to optimize objects with resolve hooks better. r=bhackett 2015-04-23 15:51:28 +02:00
Bobby Holley
e457975e9d Bug 1152784 - Be more robust about possible intermediate wrappers in IsFrameId. r=bz
Boris and I debugged this. It looks like we're somehow ending up with an
XrayWaiver on the other end of a CrossOriginXrayWrapper. The specifics of how
this happens are a bit fuzzy to me, but it's presumably happening in all the
brain transplant weirdness we do when recomputing wrappers during document.domain.

Having an XrayWaiver there isn't unsafe - the wrapper computation algorithm
will ignore the waiver if the principals don't allow the caller to waive. But
it does throw a wrench in some brittle code that only expects certain kinds
of wrappers. Let's just do what XrayTraits::getTargetObject does. I don't think
this is really unsafe at all, because the only wrapper with a security boundary
is the CCW, and we're already stripping that off unconditionally with
Wrapper::wrappedObject.
2015-04-10 00:28:05 -07:00
Bobby Holley
97a7bbb935 Bug 1150771 - Let ArrayBuffer through object Xrays. r=gabor 2015-04-07 15:10:00 -07:00
Jan de Mooij
b8b1677f0f Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 23:22:11 +01:00
Phil Ringnalda
c8a25251c1 Backed out changeset 0c030f97a04f (bug 1144366) for being on top of patches being backed out
CLOSED TREE
2015-03-28 10:39:56 -07:00
Jan de Mooij
8d6d44ecb8 Bug 1144366 - Switch SpiderMonkey and XPConnect style from |T *t| to |T* t|. r=jorendorff 2015-03-28 12:08:37 +01:00
Nick Fitzgerald
43962cb694 Bug 1038238 - Part 1: Make Error instances use SavedFrame objects for their
stacks; r=jorendorff
2015-03-27 13:08:46 -07:00
Jason Orendorff
1def388b28 Bug 1142794 - Change 'receiver' argument to SetProperty functions and ProxyHandler::set methods to be a HandleValue. r=Waldo.
Also: Change signature of these functions and methods to all have the same arguments in the same order: (cx, obj, id, v, receiver). Also change v from MutableHandleValue to HandleValue.

There is no change in behavior.

In fact the new error message `JSMSG_SET_NON_OBJECT_RECEIVER` is
impossible to trigger from scripts for now, I think (after re-reading
the whole patch with this in mind). JS_ForwardSetPropertyTo is the only
way to get a non-object receiver into the engine, but no caller
currently does so.

We're installing new pipes here, and they should work, but for now it's
the same cold water flowing through as before. Actually hooking up the
hot water is left for another bug (one with tests, not to put too fine a
point on it).

Notes:

*   InvokeGetterOrSetter had to be split into two functions:
    InvokeGetter takes a MutableHandleValue out-param,
    InvokeSetter a HandleValue in-param.

*   Watchpoints can still tamper with values being assigned. So can
    JSSetterOps. I'm pleased we can support this craziness in a way that
    doesn't have to spread via the type system to encompass the entire
    codebase.

*   Change in GlobalObject::setIntrinsicValue is not really a change.
    Yes, it asserted before, but an exception thrown during self-hosting
    initialization is not going to go unnoticed either.

*   Since the receiver argument to js::SetProperty() is at the end now, it
    makes sense for it to be optional. Some callers look nicer.

--HG--
extra : rebase_source : e89f916fe267800bc73890e11aceef5c4855b272
2015-03-01 13:16:19 -06:00
Jason Orendorff
2e5f991fe0 Bug 1142784, part 2 - Change ProxyHandler::defineProperty() to make the desc argument a non-mutable handle. r=Waldo.
--HG--
extra : rebase_source : c40a50b3522e8306d68d8114fe576d4f43006d82
2015-02-17 11:58:43 -06:00
Phil Ringnalda
c4745d28b1 Backed out 9 changesets (bug 1142775, bug 1139683, bug 1143810, bug 1142761, bug 1142784, bug 1142794, bug 1144819) for widespread bustage
CLOSED TREE

Backed out changeset 7613fc978d36 (bug 1142794)
Backed out changeset e5f0cb31263d (bug 1142784)
Backed out changeset dcd0af73ac84 (bug 1142784)
Backed out changeset 034f9c8e79ee (bug 1142784)
Backed out changeset ce0ee37e3ca9 (bug 1142775)
Backed out changeset 1519b8f2bbba (bug 1142761)
Backed out changeset 26fd55677841 (bug 1139683)
Backed out changeset 7ebc76a450c3 (bug 1144819)
Backed out changeset 92adb459d519 (bug 1143810)
2015-03-22 09:34:25 -07:00
Jason Orendorff
735dca6f1b Bug 1142794 - Change 'receiver' argument to SetProperty functions and ProxyHandler::set methods to be a HandleValue. r=Waldo.
Also: Change signature of these functions and methods to all have the same arguments in the same order: (cx, obj, id, v, receiver). Also change v from MutableHandleValue to HandleValue.

There is no change in behavior.

In fact the new error message `JSMSG_SET_NON_OBJECT_RECEIVER` is
impossible to trigger from scripts for now, I think (after re-reading
the whole patch with this in mind). JS_ForwardSetPropertyTo is the only
way to get a non-object receiver into the engine, but no caller
currently does so.

We're installing new pipes here, and they should work, but for now it's
the same cold water flowing through as before. Actually hooking up the
hot water is left for another bug (one with tests, not to put too fine a
point on it).

Notes:

*   InvokeGetterOrSetter had to be split into two functions:
    InvokeGetter takes a MutableHandleValue out-param,
    InvokeSetter a HandleValue in-param.

*   Watchpoints can still tamper with values being assigned. So can
    JSSetterOps. I'm pleased we can support this craziness in a way that
    doesn't have to spread via the type system to encompass the entire
    codebase.

*   Change in GlobalObject::setIntrinsicValue is not really a change.
    Yes, it asserted before, but an exception thrown during self-hosting
    initialization is not going to go unnoticed either.

*   Since the receiver argument to js::SetProperty() is at the end now, it
    makes sense for it to be optional. Some callers look nicer.

--HG--
extra : rebase_source : 68cd15627a62728061e663706cb1ff8c7bb292a0
2015-03-01 13:16:19 -06:00
Jason Orendorff
db04193771 Bug 1142784, part 2 - Change ProxyHandler::defineProperty() to make the desc argument a non-mutable handle. r=Waldo.
--HG--
extra : rebase_source : 92dd18b10e100e7e2537c151a21d4f3be37e1c08
2015-02-17 11:58:43 -06:00
Ehsan Akhgari
883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Tooru Fujisawa
7029f1c38c Bug 1079919 - Part 1: Support RegExp in Xray. r=bholley 2015-03-18 18:22:05 +09:00
Jason Orendorff
f45ce06bc8 Bug 1133081, part 5 - Remove non-asserting PropertyDescriptor accessors in favor of the new PropDesc-inspired asserting accessors. r=efaust.
value() can't assert hasValue() because too many places have plausible reasons for calling it on a PropertyDescriptor they basically know nothing about. One such place is CompartmentChecker::check(Handle<JSPropertyDescriptor>). Another is DefinePropertyByDescriptor. Maybe this will change with time.

In some cases we do things like `desc.hasWritable() && desc.writable() != existing_desc.writable()`. It is OK to write it this way, even though we have not checked existing_desc.hasWritable(), because in these cases we already know existingDesc is a complete property descriptor.

--HG--
extra : rebase_source : 3ec090ea79908eb5e7b5ea8ad1d702229f5cc3b1
2015-02-15 06:18:30 -06:00