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

233 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Griffin d1c61bc9b6 Bug 1116187 - Disable failing mochitest-chrome tests for B2G, r=gbrown 2015-02-06 16:30:37 -08:00
Wes Kocher 8e389f1730 Merge inbound to m-c a=merge CLOSED TREE 2015-03-09 18:27:28 -07:00
Boris Zbarsky cc3b42e52a Bug 1140573 part 3. Drop the parent argument from js::NewFunctionWithReserved. r=waldo 2015-03-09 12:50:07 -04:00
Paolo Amadini e5306bdeb5 Bug 1140472 - Set an async stack when invoking promise handlers. r=bz 2015-03-09 12:36:29 +00:00
Boris Zbarsky e0532c037e Bug 1122238 part 3. Drop all the DOMException-cloning and sanitization gunk we added in bug 1107592 and bug 1107953 and bug 1117242 . r=bholley 2015-03-06 01:08:06 -05:00
Olli Pettay ed036ca142 Bug 1136357 - Make Promise skippable, r=mccr8
--HG--
extra : rebase_source : e9679e163117aeabb69e3d919a1eaaba5b02b28c
2015-02-25 00:24:45 +02:00
Boris Zbarsky 6a93d5c443 Bug 1107953 part 5. Add tests for promise rejections with content-side DOMExceptions, and fix the promise code so those tests actually pass. r=bholley 2015-01-15 17:39:02 -05:00
Boris Zbarsky 24431c3a52 Bug 1107953 part 3. Make Promise pass in their object compartment when calling their various callbacks. r=bholley
--HG--
rename : dom/bindings/test/test_exception_options_from_jsimplemented.html => dom/bindings/test/test_promise_rejections_from_jsimplemented.html
2015-01-15 17:39:02 -05:00
Ms2ger b83d21c58c Bug 914067 - Remove JSVAL_VOID from dom/; r=jst 2015-01-14 08:59:06 +01:00
Boris Zbarsky 9e129add69 Bug 1120235. Various promise resolve/reject functions should actually return undefined instead of ending up accidentally returning their callee. r=nsm 2015-01-12 22:35:33 -05:00
Edgar Chen 10ca187446 Bug 1112471 - Part 2: DOM Changes for getting icc service state API. r=smaug 2014-12-26 10:11:20 +08:00
Ehsan Akhgari 3ca715b071 Bug 1118612 - Mark virtual overridden functions as MOZ_OVERRIDE in dom/promise; r=baku 2015-01-07 11:51:28 -05:00
Andrea Marchesini 8e36934a09 Bug 1057994 - DataStore should not dispatch runnables in a worker when it is shutting down, r=bent
--HG--
rename : dom/datastore/tests/file_basic_worker.html => dom/datastore/tests/file_worker_close.html
rename : dom/datastore/tests/test_basic_worker.html => dom/datastore/tests/test_worker_close.html
2014-12-17 14:49:36 +00:00
Dan Gohman 8bacfeb968 Bug 1054671 - Constify static callback arrays r=ehsan 2014-12-16 16:30:39 -08:00
Nigel Babu b91168c141 Backed out changeset 6a3a0e3bfaf6 (bug 1054671) for B2G emulator build bustage on CLOSED TREE 2014-12-16 11:24:15 +05:30
Dan Gohman d791adb2b0 Bug 1054671 - Constify static callback arrays r=ehsan 2014-12-15 20:53:58 -08:00
Ehsan Akhgari 09a262787c Bug 649012 - Fail mochitest-plains which use flaky timeouts (setTimeout(x) for x > 0); r=ted
We are white-listing the existing set of tests that use setTimeout
like this.  Hopefully these tests will be investigated and fixed
in the future, so that we can narrow down the white-list.

This check is only turned on for mochitest-plain for now.
2014-12-11 13:34:40 -05:00
Boris Zbarsky 8ec9d58716 Bug 1087851 part 1. Rename WrapNewBindingObject to GetOrCreateDOMReflector to make it clearer what it does. r=peterv for the idea; patch itself is just search-and-replace 2014-11-26 14:25:20 -05:00
Carsten "Tomcat" Book b742ef4f34 Backed out changeset 73c4111cab17 (bug 1083361) for bustage 2014-11-20 09:51:03 +01:00
David Rajchenbach-Teller b71d04be6e Bug 1083361 - Exposing a PromiseDebugging API to monitor uncaught DOM Promise. r=bz 2014-11-19 14:31:06 +01:00
Nick Fitzgerald cde18cdd55 Bug 1084065 - Part 2: Make DOM Promise call the JS::dbg::onPromiseSettled hook; r=bz 2014-11-17 10:44:00 +01:00
Nick Fitzgerald 8100009108 Bug 1083210 - Part 2: Make DOM Promise call the JS::dbg::onNewPromise hook. r=bz 2014-11-17 10:42:00 +01:00
Paolo Amadini 6ff08403e2 Bug 1095443 - Ensure processNextEvent never blocks after processing a Promise microtask. r=bz 2014-11-11 13:47:28 +00:00
Ben Kelly 600ab9bfb9 Bug 1091091: Support ErrorResult in Promise::MaybeReject(). r=bz 2014-10-30 11:12:09 -04:00
Jan-Ivar Bruaroey 9a214e3d2f Bug 1033885 - add mediaDevices.getUserMedia with promises. r=bz, r=jesup 2014-09-20 02:20:41 -04:00
Paolo Amadini e1e4b620e8 Bug 1013625 - Process Promise resolution runnables outside of main event queue. r=bz,khuey 2014-10-28 12:08:19 +00:00
Paolo Amadini 63d57bf61d Bug 1083783 - Move Promise.cpp to a model where settlement immediately queues the invocation of "then" callbacks. r=bz 2014-10-28 12:08:19 +00:00
Nikhil Marathe 36db9eff13 Bug 1039846 - Patch 4: FetchDriver with about:, blob: and data: fetching. r=baku
--HG--
extra : transplant_source : o%29%0E%5D%90%11%FA%1ExO%26%7E%9D_%F2%E7%0B%FE%21%B2
2014-10-06 11:01:20 -07:00
Boris Zbarsky ec85f9090b Bug 1084030. Store the promise creation and settlement timestamps and expose that information via PromiseDebugging. r=nsm 2014-10-20 13:02:21 -04:00
Boris Zbarsky fdaecfb699 Bug 1083950. Add a way to get the promises that depend on a given promise via PromiseDebugging. r=nsm 2014-10-19 22:27:36 -04:00
Boris Zbarsky ea1a6ff5e4 Bug 1083851 part 4. Expose promise stacks on PromiseDebugging. 2014-10-19 22:27:12 -04:00
Boris Zbarsky 37b389182b Bug 1083851 part 3. Capture stacks at promise fulfillment time. r=nsm 2014-10-19 22:27:12 -04:00
Boris Zbarsky 3f89b93b91 Bug 1083851 part 2. Capture stacks at promise rejection time. r=nsm 2014-10-19 22:27:12 -04:00
Boris Zbarsky f7f99c8c9b Bug 1083851 part 1. Capture allocation stacks at promise creation time. r=nsm 2014-10-19 22:27:12 -04:00
Tom Schuster bf9324688d Bug 1069694 - Remove OldDebugAPI from the browser. r=shu 2014-10-12 19:37:41 +02:00
Peter Van der Beken dcda2ba9bb Bug 1078744 - Replace SetIsDOMBinding with SetIsNonDOMBinding, remove nsWrapperCache::SetIsDOMBinding. r=bz.
--HG--
extra : rebase_source : 89c476cd9436530b2df5acc903909e34188417a0
2014-10-07 11:44:49 +02:00
Bobby Holley 94bd419133 Bug 1070842 - Remove ambiguous globals from xpc::ErrorReporter and make meanings explicit. r=bz 2014-09-29 15:34:20 +02:00
Nikhil Marathe 8864b64406 Bug 1062323 - Chained promises should resolve asynchronously. r=bz
--HG--
extra : transplant_source : %0C%E0%D2%0FEI/%D8s%E2%D07%8B%DE%25g%96%85%22r
2014-09-23 22:00:58 -07:00
Bobby Holley db168e5cde Bug 1065811 - Expose isCallable()/isConstructor() in JS_PUBLIC_API. r=billm 2014-09-25 13:13:28 +02:00
Ryan VanderMeulen 16e1505ea9 Backed out changeset ebd8df8e8631 (bug 1062323) for Gaia unit test failures. 2014-09-24 17:08:28 -04:00
Nikhil Marathe 95c8c96ad5 Bug 1062323 - Chained promises should resolve asynchronously. r=bz 2014-09-22 16:37:40 -07:00
Bobby Holley e3eca2660e Bug 1070696 - Rename xpc::GetNativeForGlobal to xpc::NativeGlobal and make it accept non-global JSObjects. r=smaug
The method is infallible, and making the callers invoke
js::GetGlobalForObjectCrossCompartment manually is dumb.
2014-09-21 21:31:53 +02:00
Ehsan Akhgari 8908aea348 Bug 1068020 - Fix more bad implicit constructors in DOM; r=baku 2014-09-17 17:53:42 -04:00
Yuan Xulei fcfee0071f Bug 1035060 - Implement AbortablePromise. r=bz 2014-09-12 10:18:49 +08:00
Bobby Holley e85bd78d5d Bug 1062077 - Introduce xpc::ErrorReport. r=bz
I've got it! Let's just wrap the JS thing in an XPCOM thing that duplicates
its fields with a different ownership model! We totally need another one of
those, right? And we could even stick it in XPConnect! </sarcasm>

In seriousness - the code to own, format, and display error reports is
currently spread between the JS engine, JSErrorReporters, an async Runnable
abstraction, and elsewhere. We need to condense it somewhere to start chipping
away at this mess.
2014-09-08 16:30:10 -07:00
Ehsan Akhgari 1b1d6ffebf Bug 1061023 - Fix more bad implicit constructors in DOM; r=baku
--HG--
extra : rebase_source : c80c5f9d7ae28286513cdb52ad76b46c240bdd5d
2014-09-01 18:26:43 -04:00
Ehsan Akhgari 0653303071 Bug 1060987 - Fix more bad implicit constructors in DOM; r=baku
--HG--
extra : rebase_source : 01709017e97fdc96d1d53eb881efc1792118edc4
2014-09-01 20:49:25 -04:00
Phil Ringnalda 117bb1a341 Backed out 6 changesets (bug 1060982, bug 1061058, bug 1060987, bug 1061060, bug 1060930) for build bustage
CLOSED TREE

Backed out changeset c23b8418e6be (bug 1060987)
Backed out changeset a8cddc6bdffc (bug 1061060)
Backed out changeset b5af5cbdac3f (bug 1060982)
Backed out changeset 4912d451011a (bug 1060930)
Backed out changeset bdacbf453238 (bug 1061058)
Backed out changeset da6c71a8f5ae (bug 1060987)
2014-09-01 16:48:51 -07:00
Ehsan Akhgari 6c932dea6c Bug 1060987 - Fix more bad implicit constructors in DOM; r=baku 2014-09-01 18:00:53 -04:00
Yuan Xulei 6fda146273 Bug 1055925 - Refactor promise to merge main thread and worker thread tasks into a single task. r=nsm 2014-08-19 18:39:56 +08:00
Andrea Marchesini 60e99f3cd4 Bug 1047398 - ServiceWorker should use WeakRef instead nsTWeakRef, r=smaug 2014-08-01 17:42:19 +01:00
Ehsan Akhgari 3fa82c9346 Bug 1045436 - Fix more bad implicit constructors in XPCOM; r=froydnj 2014-07-29 20:43:56 -04:00
Ms2ger d8c0b17d7d Bug 1043963 - Collapse test-only moz.build files under dom/ into ancestor moz.build files; r=ted
There is very little benefit to having another layer of moz.build files, and
removing them will speed up the build a minimal amount. It also paves the way
for removing TEST_DIRS, which could simplify the build system somewhat.
2014-07-26 08:17:24 +02:00
Mike Hommey bc5d6801bb Bug 1041860 - Avoid setting FINAL_LIBRARY to libraries that further use a FINAL_LIBRARY. r=mshal 2014-07-23 08:37:51 +09:00
Nikhil Marathe 161ca62afd Bug 1023547 - Fix intermittent dom/workers/test/test_promise.html failure. r=bz
--HG--
extra : transplant_source : %F5%A9%DER%BA%11%E3%2C%E3R%C8%40%F3%5E%D5%C3%A6%FE%9D%90
2014-07-18 18:13:47 -07:00
Ryan VanderMeulen 712ba6cabb Backed out changeset 38bfa2af2bd8 (bug 1023547) for making test_promise.html perma-fail. 2014-07-20 15:39:04 -04:00
Nikhil Marathe c152f140c3 Bug 1023547 - Fix intermittent dom/workers/test/test_promise.html failure. r=bz 2014-07-18 18:13:47 -07:00
Boris Zbarsky 0106bd027b Bug 966452 part 2. Report all unhandled Promise rejections. r=nsm,bholley 2014-07-04 01:24:59 -04:00
Boris Zbarsky 92fb7dde3a Bug 1040263. Eagerly create and preserve Promise reflectors so we always have them available during unlink. r=nsm,bholley. 2014-07-18 21:31:11 -04:00
Benoit Girard 1465e09a99 Bug 1037691 - Fix instances where refcounted classes expose a public destructor. r=ehsan,bent,mayhemer,jrmuizel 2014-07-15 11:37:45 -04:00
Benoit Jacob 18c3e0073a Bug 1035394 - Fix dangerous public destructors in dom - r=ehsan 2014-07-08 17:23:17 -04:00
Carsten "Tomcat" Book 673c436cdb Backed out changeset 42f348168125 (bug 966452) 2014-07-04 08:23:38 +02:00
Boris Zbarsky 2a36000fa7 Bug 966452 part 2. Report all unhandled Promise rejections. r=nsm 2014-07-04 01:24:59 -04:00
Nikhil Marathe a58ac47144 Bug 984048 - Patch 4 - Handle parse and uncaught errors. r=khuey
--HG--
extra : rebase_source : 463146233c874c2f2c63c018f2a43a66ca9ea49a
2014-07-02 17:48:35 -07:00
Boris Zbarsky e6f74ae48b Bug 966471. Add some facilities for examining the state of a promise via a PromiseDebugging utility namespace. r=nsm,peterv 2014-07-02 00:19:48 -04:00
Wes Kocher 40b922a6e4 Backed out 3 changesets (bug 984048) for breaking hazard builds.
Backed out changeset 2d0c34b7045f (bug 984048)
Backed out changeset c18211a2afa1 (bug 984048)
Backed out changeset 30fa36882d57 (bug 984048)
2014-07-01 20:29:08 -07:00
Nikhil Marathe 01ba86a01d Bug 965644 - Fix intermittent oranges on promise tests. r=bz 2014-07-01 17:33:00 -07:00
Nikhil Marathe 9fdd7f0e9a Bug 984048 - Promise::MaybeReject ErrorEvent overload no longer needed. Fix compile error. r=bustage
--HG--
extra : amend_source : 5fcbc1c3912503e98f36fce514ddc2433da31a3e
2014-07-01 17:07:47 -07:00
Nikhil Marathe 80b377d13a Bug 984048 - Patch 4 - Handle parse and uncaught errors. r=khuey 2014-07-01 16:43:13 -07:00
Ryan VanderMeulen a510b05849 Backed out changesets bacfdc83424a and 7d12b5d7446f (bug 984048) for crashes. 2014-06-30 17:22:47 -04:00
Nikhil Marathe f66104b587 Bug 984048 - Patch 4 - Handle parse and uncaught errors. r=khuey
--HG--
extra : rebase_source : 9cc36dea950be96fba079877c2d67b76f8383635
2014-06-30 13:31:02 -07:00
Benoit Jacob ec742680c8 Bug 1028588 - Fix dangerous public destructors in the rest of dom/ - r=ehsan 2014-06-23 15:56:07 -04:00
Kyle Huey 2d027024a6 Bug 1023033: Remove unnecessary MOZ_COUNT_CTOR/DTOR from promise code. r=mccr8 2014-06-17 09:39:16 -07:00
Ben Kelly 85647df24b Bug 1025973 - Part 2: Do not pass JSContext to static webidl methods in non-worker case. r=bz 2014-06-16 12:52:00 -04:00
Ben Kelly 8bf2933ed2 Bug 1025973 - Part 1: Rename GlobalObject::GetContext() to Context(). r=bz 2014-06-16 14:08:00 -04:00
Boris Zbarsky bc1e511e33 Bug 1009675 part 2. Return WebIDL 'any' values as handles. r=peterv 2014-06-11 16:26:52 -04:00
Nikhil Marathe ef0746d5f8 Bug 1020226 - Fix unhandled Promise rejection handling in workers. r=khuey
* * *
Bug 1020226 - Test case to crash browser when using Promises on workers. r=khuey
2014-06-05 12:21:56 -07:00
Boris Zbarsky a0760577c7 Bug 1016560. Remove the footgun of rejecting promises with arbitrary objects. r=khuey 2014-06-03 11:38:38 -04:00
Ryan VanderMeulen 24cbfd735d Backed out changesets 6d1c36585219 and bd403a727849 (bug 1016560) for mochitest-other failures.
CLOSED TREE
2014-06-03 13:48:49 -04:00
Boris Zbarsky 0a69a27027 Bug 1016560. Remove the footgun of rejecting promises with arbitrary objects. r=khuey 2014-06-03 11:38:38 -04:00
Nikhil Marathe b1296fcdbf Bug 1008467 - Callbacks to then() resolve Promise asynchronously. r=bz 2014-05-20 14:55:36 -07:00
Nikhil Marathe 9f97d383b6 Bug 1009569 - Promise then() must be called on a clean stack. r=bz 2014-05-20 14:21:13 -07:00
Nick Lebedev c49e263d0f Bug 998002 - Rename nsContentUtils::Get{Subject,Object}Principal to nsContentUtils::{Subject,Object}Principal. r=bholley 2014-05-13 11:58:00 +02:00
Gene Lian da0155c439 Bug 949325 - C++ wrapper to support DataStore API on the worker (part 2-1, provide a proxy to resolve/reject Promise on workers). r=baku,nsm,khuey 2014-02-24 21:56:54 +08:00
Jon Coppeard 1216544376 Bug 959787 - Handlify remaining JS APIs r=terrence r=bz r=bholley 2014-04-30 10:10:33 +01:00
Andrea Marchesini fc5fc8f292 Bug 995163 - wrap the Promise value in NativePromiseCallback, r=bz 2014-04-29 22:12:14 +01:00
Birunthan Mohanathas 7ac92ae5ea Bug 900903 - Part 2: Change uses of numbered macros in nsCycleCollectionParticipant.h to the variadic variants. r=smaug 2014-04-25 12:49:00 -04:00
Boris Zbarsky d05a92fd80 Bug 996831. Add a ToJSValue overload for nsresult, to allow rejecting promises from C++ more easily. r=bholley 2014-04-16 15:13:41 -04:00
Ryan VanderMeulen 565416fed7 Backed out 3 changesets (bug 996474, bug 996831) for B2G bustage on a CLOSED TREE.
Backed out changeset 8f98a4c2257f (bug 996831)
Backed out changeset 7acce569bd84 (bug 996831)
Backed out changeset 1845b09c7578 (bug 996474)
2014-04-16 19:31:41 -04:00
Boris Zbarsky 9523850626 Bug 996831. Add a ToJSValue overload for nsresult, to allow rejecting promises from C++ more easily. r=bholley 2014-04-16 15:13:41 -04:00
Jon Coppeard 173bd25321 Bug 993413 - Remove use of JS_Add/Remove*Root in favour of JS::PersistentRooted where possible r=terrence r=bz r=bholley 2014-04-16 09:47:53 +01:00
Boris Zbarsky 4ad64a690c Bug 994453 part 1. Factor out the to-JS conversions from Promise.h into mozilla::dom::ToJSValue methods. r=bholley
Apart from moving the methods, I made the following changes:

1)  Renamed them to ToJSValue.
2)  Inlined the boolean overload.
3)  Added overloads that take integer types.
4)  Changed the order of the aCx and aArgument arguments so aCx comes first.
5)  Renamed "abv" to "obj" in the typed array overload.
2014-04-10 14:57:07 -04:00
Boris Zbarsky 7eca30f98c Bug 991080. Add an overload of Promise::ArgumentToJSValue that lets callers pass in an nsTArray to MaybeResolve() a promise with a JS array. r=khuey 2014-04-10 00:58:43 -04:00
Boris Zbarsky a0bb95a823 Bug 993889 part 1. Remove "scope" argument from nsContentUtils::WrapNative. r=bholley 2014-04-10 00:58:41 -04:00
Andrea Marchesini 2029b0f60f Bug 974893 - Remove EnterCompartment and keep the global with the value in Promise, r=bz 2014-04-09 09:30:24 +01:00
Ed Morley 937b351273 Backed out changeset 7fa9564a2486 (bug 974893) for build failures 2014-04-09 09:08:39 +01:00
Andrea Marchesini 726b941dd1 Bug 974893 - Remove EnterCompartment and keep the global with the value in Promise, r=bz 2014-04-09 08:32:46 +01:00
Boris Zbarsky 33e4783558 Bug 991742 part 10. Remove the "aScope" argument from the Promise ArgumentToJSValue() methods. r=bholley 2014-04-08 18:27:19 -04:00
Boris Zbarsky feebd363fb Bug 991742 part 9. Remove the "scope" argument of WrapNewBindingObject. r=bholley 2014-04-08 18:27:19 -04:00
Boris Zbarsky 79dab91ff6 Bug 991742 part 8. Remove the "aScope" argument of WebIDL/nsWrapperCache WrapObject() methods. r=bholley
This patch was mostly generated with the following command:

find . -name "*.h" -o -name "*.cpp" | xargs sed -e '/WrapObject(JSContext/ {; N; s/\(WrapObject(JSContext *\* *a\{0,1\}[Cc]x\),\n\{0,1\} *JS::Handle<JSObject\*> a\{0,1\}[sS]cope/\1/ ; }' -i ""

and then reverting the changes that made to
dom/bindings/BindingUtils.h, since those WrapObject methods are not
the ones we're trying to change here, plus a bunch of manual fixups
for cases that this command did not catch (including all the callsites
of WrapObject()).
2014-04-08 18:27:18 -04:00