Commit Graph

4500 Commits

Author SHA1 Message Date
Boris Zbarsky
54c64f20a9 Bug 1117172 part 3. Change the wrappercached WrapObject methods to allow passing in aGivenProto. r=peterv
The only manual changes here are to BindingUtils.h, BindingUtils.cpp,
Codegen.py, Element.cpp, IDBFileRequest.cpp, IDBObjectStore.cpp,
dom/workers/Navigator.cpp, WorkerPrivate.cpp, DeviceStorageRequestChild.cpp,
Notification.cpp, nsGlobalWindow.cpp, MessagePort.cpp, nsJSEnvironment.cpp,
Sandbox.cpp, XPCConvert.cpp, ExportHelpers.cpp, and DataStoreService.cpp.  The
rest of this diff was generated by running the following commands:

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObjectInternal\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapNode\((?:aCx|cx|aContext|aCtx|js))\)/\1, aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(WrapObject\(JSContext *\* *(?:aCx|cx|aContext|aCtx|js))\)/\1, JS::Handle<JSObject*> aGivenProto)/g'

  find . -name "*.h" -o -name "*.cpp" | xargs perl -pi -e 'BEGIN { $/ = undef } s/(Binding(?:_workers)?::Wrap\((?:aCx|cx|aContext|aCtx|js), [^,)]+)\)/\1, aGivenProto)/g'
2015-03-19 10:13:33 -04:00
Andrew McCreight
4e3fcea818 Bug 1143760 - Do a tiny amount of code duplication to avoid a goto in XPCVariant::VariantDataToJS(). r=bholley 2015-03-18 11:36:04 -07:00
Andrew McCreight
f0b7c05cd7 Bug 1142717, part 5 - Eliminate XPC_WRAPPED_NATIVE_TEAROFFS_PER_CHUNK. r=bholley
This has been 1 since the what looks like the initial landing in 2001, so clearly we don't need this generality.
2015-03-18 11:36:04 -07:00
Andrew McCreight
57d42f4866 Bug 1142717, part 4 - Add MOZ_COUNT_CTOR/DTOR for XPCWrappedNativeTearOff. r=bholley 2015-03-18 11:36:03 -07:00
Andrew McCreight
f66e0a7b52 Bug 1142717, part 3 - Make XPCWrappedNativeTearOff::mNative a smart pointer. r=bholley 2015-03-18 11:36:03 -07:00
Andrew McCreight
f471f5ff55 Bug 1142717, part 2b - Rename obj to qiResult in InitTearOff. r=bholley 2015-03-18 11:36:03 -07:00
Andrew McCreight
c797fd39b0 Bug 1142717, part 2 - Use nsRefPtr for obj in XPCWrappedNative::InitTearOff. r=bholley 2015-03-18 11:36:03 -07:00
Andrew McCreight
2461682a28 Bug 1142717, part 1 - Remove unused forward declaration of xpc_GetJSPrivate. r=bholley 2015-03-18 11:36:03 -07:00
Andrew McCreight
c34850707a Bug 1137536, part 3 - Move the top level DeferredFinalize functions into their own file. r=smaug 2015-03-18 11:36:03 -07:00
Andrew McCreight
fa747a90b0 Bug 1137536, part 2 - Make sure every file that uses an nsCycleCollector_ function includes nsCycleCollector.h. r=smaug
This will let us remove it from headers after we split out DeferredFinalize into its own header.
2015-03-18 11:36:03 -07:00
Andrew McCreight
0f7082e12b Bug 1137536, part 1 - Move DeferredFinalize out of the cyclecollector namespace. r=smaug 2015-03-18 11:36:03 -07:00
Andrew McCreight
46d0306d6d Bug 1143938 - Add listener argument to Components.utils.forceCC. r=smaug 2015-03-18 11:36:03 -07:00
Tooru Fujisawa
08010485eb Bug 1079919 - Part 4: Add Xray test for RegExp.prototype.toString. r=bholley 2015-03-18 18:22:05 +09:00
Tooru Fujisawa
2cd1c1bfda Bug 1079919 - Part 1: Support RegExp in Xray. r=bholley 2015-03-18 18:22:05 +09:00
Boris Zbarsky
f8e0ebdf55 Bug 1097987 part 7. Require callers of JS::Evaluate to either use the global as the scope or pass in an explicit scopechain. r=waldo 2015-03-14 01:36:16 -04:00
Boris Zbarsky
9bdcb642ba Bug 1097987 part 6. Require callers of JS_ExecuteScript to either use the global as the scope or pass in an explicit scopechain. r=waldo 2015-03-14 01:36:16 -04:00
Boris Zbarsky
5988272640 Bug 1097987 part 5. Change XPCShellImpl to use the scopechain version of JS_ExecuteScript as needed. r=bholley 2015-03-14 01:36:16 -04:00
Boris Zbarsky
24cd3ff0d2 Bug 1097987 part 4. Change mozJSSubScriptLoader to use the scopechain version of JS_ExecuteScript as needed. r=bholley 2015-03-14 01:36:16 -04:00
Jason Orendorff
3c188fc686 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.
2015-02-15 06:18:30 -06:00
Jonathan Griffin
84011a87cc Bug 1116187 - Disable failing mochitest-chrome tests for B2G, r=gbrown 2015-02-06 16:30:37 -08:00
Jason Orendorff
69a35609b0 Bug 1133294 - Object.getOwnPropertyDescriptor(obj, key) must always return either undefined or a complete property descriptor, even if obj is a proxy. r=efaust. 2015-02-15 02:49:42 -06:00
Hiroyuki Ikezoe
dc9e8a7592 Bug 751387 - Fix crash caused by out-of-bounds accesses in command line options handling. r=bholley 2015-03-12 01:37:00 -04:00
Yoshi Huang
44ca356ca2 Bug 1138886 - Structured Clone for MozNDEFRecord. r=smaug
From 9b1bdef0b25b41d0448662ec689a961ae4e8fcd2 Mon Sep 17 00:00:00 2001
---
 dom/base/StructuredCloneTags.h     |   2 +
 dom/base/nsJSEnvironment.cpp       |  29 +++++++++
 dom/nfc/MozNDEFRecord.cpp          | 122 ++++++++++++++++++++++++++++++++++---
 dom/nfc/MozNDEFRecord.h            |  20 ++++--
 js/xpconnect/src/ExportHelpers.cpp |  36 ++++++++++-
 5 files changed, 193 insertions(+), 16 deletions(-)
2015-01-30 15:36:42 +08:00
Boris Zbarsky
845c6d397f Bug 1140573 part 4. Drop the parent argument from js::NewFunctionByIdWithReserved. r=waldo 2015-03-09 12:50:08 -04:00
Boris Zbarsky
add82dfc14 Bug 1140573 part 2. Drop the parent argument from JS_NewFunctionById. r=waldo 2015-03-09 12:50:05 -04:00
Boris Zbarsky
7f7b76aa0c Bug 1140573 part 1. Drop the parent argument from JS_NewFunction. r=waldo 2015-03-09 12:50:03 -04:00
Boris Zbarsky
8ece71391b Bug 1140582. Remove the parent argument from JS_NewObjectWithUniqueType. r=waldo 2015-03-09 12:49:50 -04:00
Phil Ringnalda
12408373d5 Merge f-t to m-c, a=merge 2015-03-07 19:38:53 -08:00
Paolo Amadini
70e5ec26ad Bug 1140435 - Part 2 - Allow JS code to provide an async stack when calling a function. r=bz 2015-03-07 13:30:34 +00:00
Boris Zbarsky
a94ca36434 Bug 1131802 part 2. Allocate functions with reserved slots for DOM Xrays so we can store the Xray wrapper reference in those slots instead of as the function parent. r=peterv 2015-03-06 16:33:31 -05:00
Jon Coppeard
dc04a20f73 Bug 1138874 - Generalise assertion that source object has a preserved wrapper r=bholley 2015-03-06 10:19:07 +00:00
Boris Zbarsky
458e969f4e Bug 1139964 part 1. Factor out the guts of BackstagePass::Resolve and BackstagePass::Enumerate to allow reuse for other globals that want to opt in to Exposed=System WebIDL annotations. r=smaug 2015-03-06 01:08:06 -05:00
Jason Orendorff
e218a3988f Bug 1113369, part 7 - [[SetPrototypeOf]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect. 2015-02-05 16:36:50 -06:00
Jason Orendorff
3322381e4f Bug 1113369, part 6 - [[PreventExtensions]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect. 2015-02-04 12:01:01 -06:00
Jason Orendorff
d1204e0adb Bug 1113369, part 5 - [[Delete]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect. 2015-02-04 10:20:04 -06:00
Jason Orendorff
e065e5cceb Bug 1113369, part 4 - [[Set]] ObjectOpResult support. r=Waldo, r=bz in dom, r=dvander in js/ipc, r=bholley in js/xpconnect. 2015-02-03 19:51:40 -06:00
Jason Orendorff
f43c96af4d 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.
2015-01-30 11:37:07 -06:00
Jason Orendorff
1c7d0cb2b3 Bug 1138059 - Tweak XPCOMUtils.defineLazyGetter behavior to avoid weird behavior in weird cases. r=mak. 2015-02-28 09:17:43 -06:00
Jason Orendorff
155abd81e7 Bug 1130576 - Rename JSPropertyOp -> JSGetterOp and JSStrictPropertyOp -> JSSetterOp. r=efaust. 2015-01-30 13:56:15 -06:00
L. David Baron
6d3ce826c6 Back out bug 1131802 (changesets 80e90f586329 and 35c268f162db) and patch 2 from bug 1131805 (changeset 4139522bf814) on a CLOSED TREE for assertion failures.
Assertion failure: (ptrBits & 1) == 0, at ../../dist/include/js/Value.h
:871
called from XrayCreateFunction
2015-03-06 15:14:52 -08:00
Boris Zbarsky
57f6535651 Bug 1131805 part 1. Remove remaining JS_GetParent and js::GetObjectParent uses in Gecko. r=bholley 2015-03-06 16:33:31 -05:00
Boris Zbarsky
76179d5e5e Bug 1131802 part 2. Allocate functions with reserved slots for DOM Xrays so we can store the Xray wrapper reference in those slots instead of as the function parent. r=peterv 2015-03-06 16:33:31 -05:00
Jon Coppeard
186d726ceb Bug 1138874 - Change ReparentWrapper() to avoid multiple JS objects pointing to the same native r=bholley 2015-03-05 13:39:53 +00:00
Andrew McCreight
ae356a9c5e Bug 1139216 - Add BUG_COMPONENT information for js/xpconnect/. r=bholley 2015-03-04 14:07:59 -08:00
Ehsan Akhgari
58dc1b564f Bug 1050456 - Part 2: Add a nsGlobalWindow::GetIsPrerendered helper 2015-03-04 01:31:08 -05:00
Ehsan Akhgari
a0e86805c1 Bug 1050456 - Part 1: Prevent prerendered pages from showing the slow script dialog; r=bzbarsky 2015-03-04 01:30:47 -05:00
Boris Zbarsky
0b079cb32c Bug 1137591 part 2. Throw if someone does Cu.importGlobalProperties in a Window scope. r=bholley 2015-03-03 21:01:58 -05:00
Boris Zbarsky
05f25e0b8b Bug 1137591 part 1. Get rid of SandboxCreateXMLHttpRequest and just use the normal XHR constructor in sandboxes if someone asks for XHR there. r=bholley 2015-03-03 21:01:58 -05:00
Boris Zbarsky
7b450a386a Bug 1137578. Remove JS_GetParent usage from mozJSSubscriptLoader. r=bholley 2015-03-03 07:12:01 -05:00
Boris Zbarsky
25c8e5021e Bug 1131797 part 3. Store the object we originally come from in a reserved slot on XPConnect functions instead of using the parent pointer. r=bholley 2015-03-03 07:12:01 -05:00
Boris Zbarsky
0d878647ad Bug 1131797 part 2. Stop storing the XPCNativeInterface* in XPConnect function objects and just get it from the XPCNativeMember* we're still storing. r=bholley 2015-03-03 07:12:01 -05:00
Boris Zbarsky
03e0b2a331 Bug 1131797 part 1. Store an index into its XPCNativeInterface mMembers array in each XPCNativeMember. r=bholley 2015-03-03 07:12:00 -05:00
Nicolas B. Pierron
4f0d0e4324 Bug 1010556 - Bump ASAN kTrustedScriptBuffer constant, to account for the new frame size. r=bholley 2015-03-02 14:33:14 -08:00
Jon Coppeard
b77a47d749 Bug 963921 - Clients of the JS API should use JS_DefineElement where appropriate r=smaug 2015-03-02 13:31:15 +00:00
Boris Zbarsky
819055016c Bug 1136980 part 1. Get rid of JS_SetParent uses in DOM/XPConnect. r=bholley 2015-02-27 11:46:58 -05:00
Boris Zbarsky
aefea0ed8c Bug 1137325. Remove the parent() function from xpcshell. r=mrbkap 2015-02-27 11:46:58 -05:00
Jan de Mooij
c588ad661c Bug 1137523 - Unprefix most js_* functions. r=bhackett CLOSED TREE 2015-02-27 16:08:15 +01:00
Boris Zbarsky
2b29777f16 Bug 1131803 - Comment fix followup. 2015-02-26 16:33:02 -05:00
Boris Zbarsky
8fc3649b64 Bug 1137334. Remove nsIDOMWindowUtils.getParent. r=bholley. We still have a CLOSED TREE, sadly. 2015-02-26 15:58:59 -05:00
Boris Zbarsky
29c02a7c07 Bug 1136925 part 3. Stop passing parents to js::NewProxyObject. r=waldo 2015-02-26 15:58:59 -05:00
Boris Zbarsky
f8bbb7c7e5 Bug 1136925 part 2. Stop passing a parent to Wrapper::New. r=waldo,bholley 2015-02-26 15:58:59 -05:00
Boris Zbarsky
91dab40486 Bug 1131803. Remove the use of parents from SandboxCallableProxyHandler and SandboxProxyHandler. r=bholley 2015-02-26 15:58:59 -05:00
Wes Kocher
0ed4ba78c4 Backed out changeset 4ef990c3d69d (bug 1131803) for potentially busting mochitest-e10s-dt on a CLOSED TREE 2015-02-26 23:20:33 -08:00
Wes Kocher
523e3b460c Backed out changeset b590778549ab (bug 1131803) 2015-02-26 23:19:57 -08:00
Wes Kocher
bc62dd3b33 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
34716e99af Backed out changeset 01abd154ac05 (bug 1137334) for potentially busting m-e10s-dt on a CLOSED TREE 2015-02-26 23:17:00 -08:00
Wes Kocher
0bcfdb9d36 Backed out changeset d7d9bbfa72c5 (bug 674779) for m-bc orange on a CLOSED TREE 2015-02-26 17:55:37 -08:00
Boris Zbarsky
d9410df3df Bug 1131803 comment fix followup. DONTBUILD 2015-02-26 16:33:02 -05:00
David Rajchenbach-Teller
6180d4f4c6 Bug 674779 - Add per-compartment CPU accounting. r=jandem, r=blassey, r=bz 2015-02-26 11:53:41 +01:00
Boris Zbarsky
6371501610 Bug 1137334. Remove nsIDOMWindowUtils.getParent. r=bholley 2015-02-26 15:58:59 -05:00
Boris Zbarsky
e8c2fb81d9 Bug 1136925 part 3. Stop passing parents to js::NewProxyObject. r=waldo 2015-02-26 15:58:59 -05:00
Boris Zbarsky
c210c7621b Bug 1136925 part 2. Stop passing a parent to Wrapper::New. r=waldo,bholley 2015-02-26 15:58:59 -05:00
Boris Zbarsky
8a4e0b62a3 Bug 1131803. Remove the use of parents from SandboxCallableProxyHandler and SandboxProxyHandler. r=bholley 2015-02-26 15:58:59 -05:00
Joel Maher
28be507ca3 Bug 1131110 - Intermittent OSX 10.6 run-by-dir test_bug484459.xul. r=bholley 2015-02-26 15:32:21 -05:00
Boris Zbarsky
2967b8ac9a Bug 1136906 part 2. Stop passing a parent to JS_NewObject in xpconnect code. r=bholley 2015-02-26 09:40:08 -05:00
Boris Zbarsky
a00f32b28f Bug 1136520. Stop parenting Xray expando objects to a non-global. r=bholley 2015-02-26 09:40:08 -05:00
Boris Zbarsky
554e87c495 Bug 1136516. Stop using JS_DeprecatedNewObjectWithGivenProtoAndParent in XPCWrappedNative. r=bholley 2015-02-26 09:40:08 -05:00
Boris Zbarsky
58d73aae7a Bug 1136345. Drop the parent arg from JS_NewObjectWithGivenProto and introduce a JS_DeprecatedNewObjectWithGivenProtoAndParent for the few cases that still pass in a custom parent. r=waldo 2015-02-26 09:40:08 -05:00
Boris Zbarsky
bc8973aead Bug 1136292 part 5. Stop passing a global as the parent arg to JS_NewObjectWithGivenProto in XPConnect. r=peterv 2015-02-26 09:40:07 -05:00
Andrew McCreight
4a5f95de8c Bug 1135772 - Return null on failure in nsXPCWrappedJS's QueryInterface. r=smaug 2015-02-25 09:44:10 -08:00
Martin Thomson
81c2443c36 Bug 975144 - Tests for rtcIdentityProvider property, r=gabor 2015-02-22 10:57:20 +13:00
Martin Thomson
cdacc8b87d Bug 975144 - Adding rtcIdentityProvider to sandbox global scope, r=gabor 2015-02-22 10:57:20 +13:00
Boris Zbarsky
3943fd8cac Bug 742194 part 1. Add support for throwing uncatchable exceptions to Web IDL bindings. People keep asking for this. r=khuey 2015-02-20 23:58:36 -05:00
Jon Coppeard
0db456cafc Bug 1134255 - Add breakdown of allocated and unused GC things by kind in memory reports r=njn
--HG--
extra : rebase_source : aaec1857d252090c2aea9fc8e45a2a82ac492b6c
2015-02-19 11:56:00 +00:00
Eric Skoglund
8e302f883d Bug 1121936 - Implement %TypedArray%.prototyp.{map,filter}. r=evilpie 2015-02-19 15:39:07 +01:00
Dirkjan Ochtman
e092006e2e Bug 1121935 - Implement %TypedArray%.prototype.slice. r=evilpie 2015-02-19 15:39:07 +01:00
Jon Coppeard
8f4f28952b Backed out changeset d60d2602deab (bug 1134255) for making test_memoryReporters.xul fail 2015-02-19 13:22:37 +00:00
Jon Coppeard
44aa408ed4 Bug 1134255 - Add breakdown of allocated and unused GC things by kind in memory reports r=njn 2015-02-19 11:56:00 +00:00
Bill McCloskey
507a7e47b7 Bug 1131317 - Always unwrap objects before wrapping them in XPCWrappedJS (r=mrbkap) 2015-02-18 10:42:28 -08:00
Christoph Kerschbaumer
ebba2d4533 Bug 1099296 - Attach LoadInfo to remaining callers of ioService and ProtocolHandlers - in js/ (r=bholly) 2015-02-17 10:09:23 -08:00
Tom Schuster
04bc4787d3 Bug 1073816 - Implement ES6 Function.prototype.bind length handling. r=Till,bholley 2015-02-09 19:42:20 +01:00
Boris Zbarsky
c0538ae297 Bug 1132187 part 3. Remove the WANT_CONVERT bit. r=peterv 2015-02-13 14:34:54 -05:00
Boris Zbarsky
d4075579f3 Bug 1132187 part 2. Remove the WANT_DELPROPERTY bit. r=peterv 2015-02-13 14:34:54 -05:00
Boris Zbarsky
bd96a08ff8 Bug 1132187 part 1. Remove the totally unused WANT_CREATE bit. r=peterv 2015-02-13 14:34:54 -05:00
Boris Zbarsky
fafd4a0afc Bug 1132184. Remove the nsIXPCScriptable postCreate and postTransplant hooks. r=peterv 2015-02-13 14:34:54 -05:00
Boris Zbarsky
04f392613f Bug 1131801 part 3. Get rid of the now-unused ReparentWrapperIfFound. r=peterv 2015-02-13 14:34:54 -05:00
Boris Zbarsky
8e9341bc1f Bug 1131801 part 2. Get rid of the now-useless RescueOrphansInScope. r=peterv 2015-02-13 14:34:53 -05:00
Boris Zbarsky
4bd0bc2293 Bug 1131801 part 1. Get rid of the now-unnecessary RescueOrphans function. r=peterv 2015-02-13 14:34:53 -05:00
Boris Zbarsky
5cdfac2ecb Bug 1131799. Stop parenting XPConnect tearoffs to the XPCWrappedNative. r=peterv 2015-02-13 14:34:53 -05:00
Boris Zbarsky
cbd6ec4a41 Bug 1131887 part 2. Remove the now-unused nsIXPConnect.reparentWrappedNativeIfFound. r=peterv 2015-02-13 14:34:53 -05:00