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

29 Коммитов

Автор SHA1 Сообщение Дата
Andrea Marchesini 163825f4a6 Bug 1281793 - Remove some non-used telemetry IDs - part 4 - random things (2), r=chutten 2016-06-28 19:30:37 +02:00
Carsten "Tomcat" Book 0f88d840e4 Backed out changeset 27b1dd843116 (bug 1281793) 2016-06-28 17:04:49 +02:00
Andrea Marchesini 430a14cd11 Bug 1281793 - Remove some non-used telemetry IDs - part 4 - random things (2), r=chutten 2016-06-28 16:44:42 +02:00
Kyle Huey 941ab1f522 Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-05-05 01:45:00 -07:00
Carsten "Tomcat" Book ba3fe0975c Backed out changeset 85ce8cb0639a (bug 1268313)
--HG--
extra : rebase_source : 56d1cf41a2dc4959b67f834e07192a5c772176a8
2016-04-29 14:21:16 +02:00
Kyle Huey 48a594a09e Bug 1268313: Part 7 - Move NS_NewRunnableMethod and friends to mozilla::NewRunnableMethod. r=froydnj 2016-04-28 14:08:25 -07:00
J. Ryan Stinnett 2a55d065b7 Bug 1238160 - Rename OriginAttributes.mInBrowser and associated methods. r=bz,mayhemer
This change renames OriginAttributes.mInBrowser to mInIsolatedMozBrowser and
nsIPrincipal::GetIsInBrowserElement to GetIsInIsolatedMozBrowserElement.  Other
methods that pass these values around also have name changes.

Tokens such as "inBrowser" have previously been serialized into cache keys, used
as DB column names, stored in app registries, etc.  No changes are made to any
serialization formats.  Only runtime method and variable names are updated.

No behavior changes are made in this patch, so some renamed methods may have
nonsensical implementations.  These are corrected in subsequent patches
focused on behavior.

MozReview-Commit-ID: 66HfMlsXFLs
2016-03-02 10:35:56 -06:00
Nicholas Nethercote 6c7df1f040 Bug 1187151 (part 12) - Replace nsBaseHashtable::Enumerate() calls in dom/ with iterators. r=khuey.
--HG--
extra : rebase_source : d3b87524cd3f2eff118727cadac6d31713cead89
2016-01-27 16:05:00 -08:00
Honza Bambas 6e8ac19b98 Bug 1240238 - Full DOMStorage schema 1 scope update uniqueness, r=smaug 2016-01-27 09:33:00 +01:00
David Rajchenbach-Teller 583ca7286d Bug 1224374 - Profiler labels for the top 26-100 chrome hangs;r=BenWa
--HG--
extra : rebase_source : 39e94507c0288863e495322a6899ff009840870d
2016-01-15 11:38:03 +01:00
Chris Peterson c824bef9fe Bug 1240265 - Annotate intentional switch fallthroughs in dom/. r=mrbkap
dom/base/Element.cpp:2920:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/Element.cpp:2935:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/nsDocument.cpp:6595:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/nsDocument.cpp:7631:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/nsDocument.cpp:7922:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/nsGlobalWindow.cpp:7573:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/base/nsXMLContentSerializer.cpp:1393:7 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/cache/AutoUtils.cpp:487:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/html/HTMLInputElement.cpp:3808:15 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/html/HTMLInputElement.cpp:3836:15 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/storage/DOMStorageDBThread.cpp:224:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/workers/ScriptLoader.cpp:1994:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels

--HG--
extra : rebase_source : ba9bd93b2c65e2db05b26e7b4c203dd7710516f3
2015-11-25 23:26:32 -08:00
Sebastian Hengst d8d4a2d1a5 Backed out 2 changesets (bug 1224374) for Windows bustage. r=bustage on a CLOSED TREE
Backed out changeset 5f458e6e4997 (bug 1224374)
Backed out changeset 0dc02cb0b604 (bug 1224374)
2016-01-19 21:30:41 +01:00
David Rajchenbach-Teller 2d53758d08 Bug 1224374 - Profiler labels for the top 26-100 chrome hangs;r=BenWa
--HG--
extra : rebase_source : 51d39d6f88bf58ccb29f5897c3dbbe71007ee842
2016-01-15 11:38:03 +01:00
Honza Bambas a0a6f7e23c Bug 1165214 - Use OriginAttributes in DOM Storage. r=smaug, r=bholley
--HG--
extra : rebase_source : b63ddb5a24a335f771a856cd20c69cdeb0c92ca0
2016-01-05 07:25:00 -05:00
Nicholas Nethercote aa9f82bd36 Bug 1186811 (part 1) - Replace nsBaseHashtable::EnumerateRead() calls in dom/storage/ with iterators. r=baku.
--HG--
extra : rebase_source : 4b15ff97859da5e4421929c2c259f440d7224db3
2015-11-01 19:23:05 -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
Andrew McCreight 0ff7248107 Bug 1210517 - Create nsVariant directly rather than via do_CreateInstance(). r=froydnj
The goal here is to leave creation stuff mostly for JS, so we can
convert it entirely over to a non-threadsafe cycle-collected version
without breaking any existing C++ users.

I didn't do this for a remaining use in nsGlobalWindow.h to avoid
including nsVariant.h all over the place.
2015-10-07 08:17:42 -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
Honza Bambas 2f0e0c40f6 Bug 1189426 - Don't assert false in DOMStorageDBThread::InsertDBOp when we failed to open the database. r=smaug
--HG--
extra : rebase_source : 4638dee9e96bdabf47b35b513857cbefdc2606b0
2015-08-06 11:08:00 -04:00
Nicholas Nethercote 35a54c92f0 Bug 1182977 (part 2) - Use PLDHashTable::Iterator in dom/storage/. r=khuey.
--HG--
extra : rebase_source : 7aeac7d3d093bb3360de179b8259bc98449b308e
2015-07-22 00:02:15 -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
Michael Layzell dbe075d5b8 Bug 1180993 - Part 3: Correct use sites of functions which return already_AddRefed. r=ehsan 2015-07-10 08:36:00 -04:00
Andrew McCreight 9e8f4b219e Bug 1152551, part 2 - Fix mode lines in dom/. r=jst 2015-05-03 15:32:37 -04: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
Marco Bonardo 1e36234414 Bug 1010717 - add nsIRunnable support to the DOM Storage thread. r=mayhemer 2015-01-28 00:00:18 +01: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
Birunthan Mohanathas defd5128d0 Bug 1058101 - Move dom/src/storage/ into dom/. r=mccr8
--HG--
rename : dom/src/storage/DOMStorage.cpp => dom/storage/DOMStorage.cpp
rename : dom/src/storage/DOMStorage.h => dom/storage/DOMStorage.h
rename : dom/src/storage/DOMStorageCache.cpp => dom/storage/DOMStorageCache.cpp
rename : dom/src/storage/DOMStorageCache.h => dom/storage/DOMStorageCache.h
rename : dom/src/storage/DOMStorageDBThread.cpp => dom/storage/DOMStorageDBThread.cpp
rename : dom/src/storage/DOMStorageDBThread.h => dom/storage/DOMStorageDBThread.h
rename : dom/src/storage/DOMStorageIPC.cpp => dom/storage/DOMStorageIPC.cpp
rename : dom/src/storage/DOMStorageIPC.h => dom/storage/DOMStorageIPC.h
rename : dom/src/storage/DOMStorageManager.cpp => dom/storage/DOMStorageManager.cpp
rename : dom/src/storage/DOMStorageManager.h => dom/storage/DOMStorageManager.h
rename : dom/src/storage/DOMStorageObserver.cpp => dom/storage/DOMStorageObserver.cpp
rename : dom/src/storage/DOMStorageObserver.h => dom/storage/DOMStorageObserver.h
rename : dom/src/storage/PStorage.ipdl => dom/storage/PStorage.ipdl
rename : dom/src/storage/moz.build => dom/storage/moz.build
2014-08-30 21:43:46 -07:00