Commit Graph

347 Commits

Author SHA1 Message Date
Jan de Mooij
11274288e1 Bug 1144366 followup - Stop declaring multiple pointers on a single line. r=jorendorff 2015-04-02 11:22:21 +02:00
David Rajchenbach-Teller
4179564dbf Bug 674779 - Per-component CPU monitoring, low-level. r=blassey, r=jandem
--HG--
extra : rebase_source : 7d604155e0ab0b19befa5a70eda5f4876b239935
2015-03-31 12:40:52 +02:00
Bill McCloskey
11851d2c88 Bug 1148962 - Use TakeOwnershipOfErrorReporting in CPOW code (r=bholley) 2015-03-30 20:13:06 -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
Blake Kaplan
a9a16182e7 Bug 1145854 - Don't leak WrapperOwner::className's string. r=billm 2015-03-27 13:12:37 -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
Blake Kaplan
3ae54c5cdb Bug 1134006 - Avoid IPC for domElement.QueryInterface(nsISupports) and nsIClassInfo. r=billm
--HG--
extra : rebase_source : cd3ce71089e89c512c0cc04fb49c666e5fab5117
2015-03-10 14:36:01 -07:00
Carsten "Tomcat" Book
bd447688dc Backed out changeset 6c7ebb2f5a92 (bug 1134006) for bustage 2015-03-10 12:37:24 +01:00
Blake Kaplan
318dc8ec77 Bug 1134006 - Avoid IPC for domElement.QueryInterface(nsISupports) and nsIClassInfo. r=billm 2015-03-09 15:01:00 +01:00
Boris Zbarsky
dcb007a0d8 Bug 1140573 part 1. Drop the parent argument from JS_NewFunction. r=waldo 2015-03-09 12:50:03 -04:00
Jason Orendorff
f9c659ca6c Bug 1113369, part 7 - [[SetPrototypeOf]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect.
--HG--
extra : rebase_source : e712f5faf1463a447e52153c556605bb9552e990
2015-02-05 16:36:50 -06:00
Jason Orendorff
29bfe274bb Bug 1113369, part 6 - [[PreventExtensions]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect.
--HG--
extra : rebase_source : 08631a46c776f6d9e60794ad61308240dde3d94d
2015-02-04 12:01:01 -06:00
Jason Orendorff
cc85989b86 Bug 1113369, part 5 - [[Delete]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect.
--HG--
extra : rebase_source : 64b0e44bbb7673d139fab920243566db4844b517
2015-02-04 10:20:04 -06:00
Jason Orendorff
9a17368e8e Bug 1113369, part 4 - [[Set]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect.
--HG--
extra : rebase_source : ee44b9a7c933addd7f26643443900843b984587b
2015-02-03 19:51:40 -06:00
Jason Orendorff
de9e3b99dc Bug 1113369, part 3 - [[DefineOwnProperty]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect.
Add an ObjectOpResult out-param for DefineProperty functions everywhere. We leave a few js::DefineProperty() convenience functions with no *result out-param. These have strict behavior: that is, they automatically check the result and throw if it is false. In bug 1125624 these strict signatures may end up being called DefinePropertyOrThrow, as that is what the spec calls it.

--HG--
extra : rebase_source : 36439a8fa433c453f63b02c93fceaf0d8b9e9626
2015-01-30 11:37:07 -06:00
Jason Orendorff
85abad51f2 Bug 1130576 - Rename JSPropertyOp -> JSGetterOp and JSStrictPropertyOp -> JSSetterOp. r=efaust.
--HG--
extra : rebase_source : 44edb174028da6dbd637975e6358112060de535b
extra : amend_source : dd79490550af1370dac037057bdc2c06cb4c71f5
2015-01-30 13:56:15 -06:00
Jan de Mooij
61b1b5c6bb Bug 1137523 part 2 - Unprefix a few js_* functions I forgot in part 1. r=bhackett 2015-03-03 09:33:22 +01:00
Jan de Mooij
db18ff3df9 Bug 1137523 - Unprefix most js_* functions. r=bhackett CLOSED TREE 2015-02-27 16:08:15 +01:00
Boris Zbarsky
f027a773ea Bug 1136925 part 3. Stop passing parents to js::NewProxyObject. r=waldo 2015-02-26 15:58:59 -05:00
Wes Kocher
f657cd0135 Backed out 4 changesets (bug 1136925) for potentially busting m-e10s-dt on a CLOSED TREE
Backed out changeset 331761aaae22 (bug 1136925)
Backed out changeset 2faa0e91fe23 (bug 1136925)
Backed out changeset a00f2530c911 (bug 1136925)
Backed out changeset d5e658bc0792 (bug 1136925)
2015-02-26 23:17:34 -08:00
Wes Kocher
390b01dc2e Backed out changeset d7d9bbfa72c5 (bug 674779) for m-bc orange on a CLOSED TREE 2015-02-26 17:55:37 -08:00
David Rajchenbach-Teller
8d0fc0855c Bug 674779 - Add per-compartment CPU accounting. r=jandem, r=blassey, r=bz 2015-02-26 11:53:41 +01:00
Boris Zbarsky
8552abcc45 Bug 1136925 part 3. Stop passing parents to js::NewProxyObject. r=waldo 2015-02-26 15:58:59 -05:00
Tom Schuster
045b47ab00 Bug 1127475 - Remove unnecessary parent arguments. r=bz 2015-02-13 12:20:02 +01:00
Tom Schuster
728f780bfe Bug 1125437 - Remove CheckDefineProperty and use StandardDefineProperty instead. r=efaust 2015-02-11 23:40:47 +01:00
Tom Schuster
fcb11bbe71 Bug 1131003 - Move jsproxy.h to js/Proxy.h. r=efaust
--HG--
rename : js/src/jsproxy.h => js/public/Proxy.h
2015-02-10 19:58:18 +01:00
Gabor Krizsanits
ceab21eca3 Bug 1090592 - GetPrototypeOf hook for CPOWProxyHandler. r=billm 2015-02-10 16:29:41 +01:00
Bill McCloskey
66061807e0 Bug 1123461 - Rename CpowIdHolder to CrossProcessCpowHolder (r=dvander) 2015-01-26 13:32:31 -08:00
Bill McCloskey
2f3d90830b Bug 1123461 - Make a real interface for js/ipc (r=dvander) 2015-01-26 13:32:18 -08:00
Tom Schuster
66ad9a2e49 Bug 1125356 - Use JS_NewPlainObject in the browser. r=bz 2015-01-24 16:38:08 +01:00
Wes Kocher
c1bec44889 Backed out 3 changesets (bug 1123461, bug 1123090) for windows build bustage
Backed out changeset 2c442905d0af (bug 1123461)
Backed out changeset d7aa4c72ebab (bug 1123461)
Backed out changeset 8bb689ec8086 (bug 1123090)
2015-01-22 21:04:33 -08:00
Bill McCloskey
b8d4206b47 Bug 1123461 - Rename CpowIdHolder to CrossProcessCpowHolder (r=dvander) 2015-01-22 20:00:19 -08:00
Bill McCloskey
e535bf8aa7 Bug 1123461 - Make a real interface for js/ipc (r=dvander) 2015-01-22 20:00:19 -08:00
Kyle Huey
7c82e6dd0a Bug 1121673: Use move references in IPDL. r=bent 2015-01-16 11:58:52 -08:00
Bill McCloskey
5c867be0e8 Bug 1119753 - Fix CPOW GC crash (r=jonco) 2015-01-16 09:56:30 -08:00
Peter Van der Beken
9d5d3dc23d Bug 1096328 - Remove nativeOwnership from Bindings.conf, templatize deferred finalization. r=bz.
--HG--
extra : rebase_source : 2486e80073d49ffc5ed93676382846fe7c87bd64
2014-11-01 14:48:19 +01:00
Ehsan Akhgari
c50516747c Bug 1119265 - Mark virtual overridden functions as MOZ_OVERRIDE in JS IPC; r=billm 2015-01-08 23:10:41 -05:00
Chris Peterson
793edf7daf Bug 1115477 - Fix -Wunused and -Wtype-limits warnings in js/src. r=jandem 2014-12-24 21:06:21 -08:00
Bill McCloskey
a58a3e4621 Bug 1102640 - [e10s] Shouldn't be able to create CPOWs to the inner window (r=mrbkap) 2014-12-18 17:34:24 -08:00
Bill McCloskey
478530b3a3 Bug 1102637 - [e10s] Control CPOW logging with env var (r=mrbkap) 2014-12-18 17:34:24 -08:00
Bill McCloskey
35ea98153d Bug 1102637 - [e10s] Log the address of objects sent using CPOWs (r=mrbkap) 2014-12-18 17:34:24 -08:00
Tom Schuster
8960d9ef9f Bug 1094176 - Remove lookup API from browser. r=bholley 2014-12-17 00:28:39 +01:00
Tom Schuster
7ed0e36ad2 Bug 783829 - Remove getEnumerablePropertyKeys. r=efaust,bholley 2014-12-17 00:28:38 +01:00