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

185 Коммитов

Автор SHA1 Сообщение Дата
Andrea Marchesini da174a4757 Bug 1539407 - Use the correct global for DOMEventTargetHelper in IndexedDB, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D25041

--HG--
extra : moz-landing-system : lando
2019-03-29 18:05:11 +00:00
Daniel Varga 7af208ab28 Backed out changeset 98452610cfcc (bug 1539407) for browser-chrome failure at /builds/worker/workspace/build/src/dom/indexedDB/IDBRequest.cpp:284. On a CLOSED TREE
--HG--
extra : histedit_source : 236c5d6a7a4440a7b545c1ec5a0a72a8c5777b6b
2019-03-29 18:01:58 +02:00
Andrea Marchesini 788d12712b Bug 1539407 - Use the correct global for DOMEventTargetHelper in IndexedDB, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D25041

--HG--
extra : moz-landing-system : lando
2019-03-29 14:12:04 +00:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Andrea Marchesini dbb6b928ed Bug 1455256 - Port more components to WorkerRef - part 4 - IDB Transaction, r=asuth 2018-06-18 16:37:21 -04:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Boris Zbarsky 14f26fccf6 Bug 1449631 part 8. Remove nsIDOMEventTarget::GetEventTargetParent. r=smaug
MozReview-Commit-ID: 5wQ2LYrjUxf
2018-04-05 13:42:41 -04:00
Boris Zbarsky 4292bca4ee Bug 1449631 part 6. Remove nsIDOMEventTarget::DispatchEvent. r=smaug
MozReview-Commit-ID: 8YMgmMwZkAL
2018-04-05 13:42:41 -04:00
Olli Pettay 2439836b37 Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00
Csoregi Natalia 1fd0486e23 Backed out 7 changesets (bug 1193394) for browser-chrome failures on browser_ext_popup_background.js. CLOSED TREE
Backed out changeset 9683f24ff8ec (bug 1193394)
Backed out changeset 0e7140a7c841 (bug 1193394)
Backed out changeset a0e26f6b2784 (bug 1193394)
Backed out changeset 29e1fceaf48d (bug 1193394)
Backed out changeset b8632bbbd273 (bug 1193394)
Backed out changeset a54ef2d8f896 (bug 1193394)
Backed out changeset 55c94c05c57f (bug 1193394)
2018-03-01 16:29:02 +02:00
Olli Pettay b7726493fb Bug 1193394 - Part 1: Microtasks and promises scheduling. r=bevis 2017-11-17 11:01:27 +08:00
Andrea Marchesini 8cdf705535 Bug 1435174 - Remove the renaming 'using namespace workers', r=bkelly 2018-02-05 19:55:07 +01:00
Andrea Marchesini 26352bfee1 Bug 1432963 - Fixing workers headers - part 17 - no LIBS=[workers] in moz.build files, r=smaug 2018-01-31 08:25:30 +01:00
Andrea Marchesini 063723a1f0 Bug 1432963 - Fixing workers headers - part 13 - WorkerHolder without workers namespace, r=smaug 2018-01-31 08:23:44 +01:00
Olli Pettay d78d3295c5 Bug 1412775 - Implement Event.composedPath, r=stone
--HG--
extra : rebase_source : a970c4a0daac4a7a02cec34733131734eb93b151
2017-12-18 18:07:36 +02:00
Andrea Marchesini 73712f7d05 Bug 1405290 - Improve logging of workers when shutting down - part 3 - WorkerHolder with names, r=asuth 2017-11-15 07:58:38 +01:00
Jan Varga 8ca83f4a14 Bug 1403023 - Set mSentCommitOrAbort to true when HoldWorker call fails to silence the destructor assertion (this is a followup fix for bug 1399322); r=asuth 2017-09-29 08:48:47 +02:00
Andrea Marchesini baa04d619a Bug 1120178 - Migrate DOMError to DOMExtension in FileReader, IndexedDB, DOMRequest and so on, r=smaug 2017-08-06 20:47:00 +03:00
Jan Varga c0575771d3 Bug 1399322 - Don't assume that HoldWorker() call must always succeed. IDBTransaction::Create() is now fallible again; r=asuth 2017-09-20 10:53:14 +02:00
Andrew McCreight 78807d8776 Bug 1391005 - Eliminate NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION_INHERITED. r=peterv
Replace it with NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION, because it
has been the same for a while.

MozReview-Commit-ID: 5agRGFyUry1

--HG--
extra : rebase_source : 5388c56b2f6905c6ef969150f0c5b77bf247624d
2017-08-29 16:02:48 -07:00
Bevis Tseng a29c316c12 Bug 1352401 - Part 2: Count active IDBOpenRequest, IndexedDB databases/transactions. r=janv
--HG--
extra : rebase_source : 3f59fe1087678af689384b34db440960966e00af
2017-06-16 19:06:36 +08:00
Bevis Tseng dda9bab7b2 Backed out changeset 9c62253ad1a3 (Bug 1374675) 2017-06-21 11:01:52 +08:00
Bevis Tseng d6b1d1a397 Bug 1352401 - Part 2: Count active IDBOpenRequest, IndexedDB databases/transactions. r=janv
--HG--
extra : rebase_source : 87263d63be9021fe2493beb4b874c7e2749fd665
2017-06-16 19:06:36 +08:00
Jan Varga c9e62d9e30 Bug 1370519 - Part 1: Add missing includes to fix non-unified builds; r=btseng 2017-06-07 12:36:20 +02:00
Bevis Tseng 69a59cfe93 Bug 1328517 - Part 2: Add Assertion to Each ActorEventTarget. r=janv
MozReview-Commit-ID: DDQ0ytBiwm3

--HG--
extra : rebase_source : d3a724e9d69e492621948436cc68cf1d59cdb3a6
2017-02-10 15:13:45 +08:00
Stone Shih 1ed10ff082 Bug 1305458 Part1: Rename nsIDOMEventTarget::PreHandleEvent to nsIDOMEventTarget::GetEventTargetParent. r=smaug
MozReview-Commit-ID: FM3vDUyLOCb

--HG--
extra : rebase_source : 5a513af84718a6d591f77437a0704984c8fc2b67
2016-10-21 10:11:07 +08:00
Bevis Tseng d3bd0e0c64 Bug 1300454 - SendAbort() to parent after IDBTransaction is aborted in INITIAL state. r=janv 2016-10-04 15:40:11 +08:00
Bevis Tseng 626dd129aa Bug 1302261 - Refresh Spec For Deleted Indexes. r=janv 2016-09-12 15:38:43 -07:00
Ben Kelly 9d7b33a00b Bug 1293690 P2 Set explicit status levels to fail at when calling WorkerHolder::HoldWorker. r=baku 2016-08-18 07:11:04 -07:00
Phil Ringnalda 4083fafafc Backed out 10 changesets (bug 1290116, bug 1293690) for build bustage
CLOSED TREE

Backed out changeset bbc14d107fca (bug 1290116)
Backed out changeset a81b6ce5c25f (bug 1290116)
Backed out changeset e0b9c25b6125 (bug 1290116)
Backed out changeset 8e9a9ba04ce5 (bug 1290116)
Backed out changeset 2d5ad5e9ed20 (bug 1290116)
Backed out changeset eb7da0dbfc72 (bug 1290116)
Backed out changeset 6a4e8c92faae (bug 1290116)
Backed out changeset 0342d98afa10 (bug 1293690)
Backed out changeset d84b0768f0ce (bug 1293690)
Backed out changeset f9f62ade9508 (bug 1293690)
2016-08-17 21:16:43 -07:00
Ben Kelly fa520e1fdd Bug 1293690 P2 Set explicit status levels to fail at when calling WorkerHolder::HoldWorker. r=baku 2016-08-17 20:01:35 -07:00
Bevis Tseng 44deb08f5c Bug 1151017 - Support the 'close' Event on Databases. r=khuey
Outline of this patch:

1. Define a new ipdl message called |CloseAfterInvalidationComplete| to trigger the close event after all transactions are complete only if the database is invalidated by the user agent.
2. Make sure the following event sequence is consistent during invalidation according to the steps in |5.2. Closing a database| by the following 2 solutions:
     IDBRequest.onerror -> IDBTransaction.onerror -> IDBTransaction.onabort -> IDBDatabase.onclose.
   2.1. In parent process, do not force to abort the transactions after invalidation but wait for all the transactions in its child process are complete.
   2.2. In child process, make sure that each IDBTransaction will notify its completion to the parent after all its pending IDBRequests are finished.
3. Add test_database_onclose.js to test the close event especially when read/write operation is ongoing.
4. Add test_database_close_without_onclose.js as a XPCShell test because setTimeout() is not preferred in Mochitest to ensure that the IDBDatabase.onclose event won't be sent after closed normally.
2016-05-31 18:08:20 +08:00
Andrea Marchesini aac2306f2c Bug 1269154 - Get rid of WorkerFeature: WorkerHolder, r=khuey
--HG--
rename : dom/cache/Feature.cpp => dom/cache/CacheWorkerHolder.cpp
rename : dom/cache/Feature.h => dom/cache/CacheWorkerHolder.h
rename : dom/workers/WorkerFeature.h => dom/workers/WorkerHolder.h
2016-06-23 10:53:14 +02:00
Carsten "Tomcat" Book 47aeb86e2c Backed out changeset 1c5d78c7ba43 (bug 1269154) for bustage on a CLOSED TREE
--HG--
rename : dom/cache/CacheWorkerHolder.cpp => dom/cache/Feature.cpp
rename : dom/cache/CacheWorkerHolder.h => dom/cache/Feature.h
rename : dom/workers/WorkerHolder.h => dom/workers/WorkerFeature.h
extra : rebase_source : 49f9e9ce0500ac441fe97878cf9308804926544f
2016-06-23 10:13:54 +02:00
Andrea Marchesini 45087a7970 Bug 1269154 - Get rid of WorkerFeature: WorkerHolder, r=khuey
--HG--
rename : dom/cache/Feature.cpp => dom/cache/CacheWorkerHolder.cpp
rename : dom/cache/Feature.h => dom/cache/CacheWorkerHolder.h
rename : dom/workers/WorkerFeature.h => dom/workers/WorkerHolder.h
2016-06-22 17:24:35 +02:00
Jonathan Watt b15368cfcb Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Bevis Tseng e0e7ead1f0 Bug 1118028 - Allow objectStores and indexes to be renamed. r=khuey
--HG--
extra : rebase_source : 4f2d1da2ddafbe786c3908eb46723b4d2f0c48cc
2016-03-30 11:04:56 +08:00
Jan Varga 4834a1cc3e Bug 1182987 - Part 5: Change mode of "readwrite" transaction to "cleanup" after QuotaExceeded is fired; r=baku
--HG--
rename : dom/indexedDB/test/unit/test_quotaExceeded_recovery.js => dom/indexedDB/test/unit/test_cleanup_transaction.js
2016-04-21 06:53:30 +02:00
Kyle Huey fe5f7b4105 Bug 1259290: Part 5 - Remove the cx from WorkerFeature::Notify. r=bz 2016-03-28 10:28:14 -07:00
Boris Zbarsky ede5a13ec4 Bug 1257725 part 5. Get rid of ThreadsafeAutoJSContext usage in IDBRequest::CaptureCaller. r=khuey 2016-03-23 11:02:57 -04:00
Jan Varga e578091712 Bug 1182987 - Part 3: Add "cleanup" transaction with disabled quota checks and vacuuming/checkpointing after commit; r=baku 2016-03-15 07:00:37 +01:00
Boris Zbarsky 663b9bd562 Bug 1252091. Add/RemoveFeature don't need a JSContext argument. r=khuey 2016-02-29 14:52:42 -05:00
Kyle Huey 31dabb4558 Bug 1247117: De-namespace much of IndexedDB. r=baku 2016-02-16 13:46:08 -08:00
Kyle Huey 91efc5a86c Bug 1241764: Replace nsPIDOMWindow with nsPIDOMWindowInner/Outer. r=mrbkap,smaug 2016-01-30 09:05:36 -08:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nicholas Nethercote 95676dc27c Bug 1200484 (part 10) - Use JS column numbers in indexedDB. r=khuey.
--HG--
extra : rebase_source : a7549e74d28e92911e014e152a245828f01291ad
2015-09-01 18:01:02 -07:00
Kyle Huey 917ae4a9ce Bug 1196840: Make IDBTransaction::ObjectStoreNames const. r=baku 2015-08-25 13:30:18 -07:00
Kyle Huey 76e3009ab8 Bug 1179909: Refactor stable state handling. r=smaug
This is motivated by three separate but related problems:

1. Our concept of recursion depth is broken for things that run from AfterProcessNextEvent observers (e.g. Promises). We decrement the recursionDepth counter before firing observers, so a Promise callback running at the lowest event loop depth has a recursion depth of 0 (whereas a regular nsIRunnable would be 1). This is a problem because it's impossible to distinguish a Promise running after a sync XHR's onreadystatechange handler from a top-level event (since the former runs with depth 2 - 1 = 1, and the latter runs with just 1).

2. The nsIThreadObserver mechanism that is used by a lot of code to run "after" the current event is a poor fit for anything that runs script. First, the order the observers fire in is the order they were added, not anything fixed by spec. Additionally, running script can cause the event loop to spin, which is a big source of pain here (bholley has some nasty bug caused by this).

3. We run Promises from different points in the code for workers and main thread. The latter runs from XPConnect's nsIThreadObserver callbacks, while the former runs from a hardcoded call to run Promises in the worker event loop. What workers do is particularly problematic because it means we can't get the right recursion depth no matter what we do to nsThread.

The solve this, this patch does the following:

1. Consolidate some handling of microtasks and all handling of stable state from appshell and WorkerPrivate into CycleCollectedJSRuntime.
2. Make the recursionDepth counter only available to CycleCollectedJSRuntime (and its consumers) and remove it from the nsIThreadInternal and nsIThreadObserver APIs.
3. Adjust the recursionDepth counter so that microtasks run with the recursionDepth of the task they are associated with.
4. Introduce the concept of metastable state to replace appshell's RunBeforeNextEvent. Metastable state is reached after every microtask or task is completed. This provides the semantics that bent and I want for IndexedDB, where transactions autocommit at the end of a microtask and do not "spill" from one microtask into a subsequent microtask. This differs from appshell's RunBeforeNextEvent in two ways:
a) It fires between microtasks, which was the motivation for starting this.
b) It no longer ensures that we're at the same event loop depth in the native event queue. bent decided we don't care about this.
5. Reorder stable state to happen after microtasks such as Promises, per HTML. Right now we call the regular thread observers, including appshell, before the main thread observer (XPConnect), so stable state tasks happen before microtasks.
2015-08-11 06:10:46 -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