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

189 Коммитов

Автор SHA1 Сообщение Дата
Nicholas Nethercote 8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Thomas Wisniewski 9c0a07404c Bug 1388428 - Extend browsingData to restrict removing localStorage to a given list of hostnames; r=asuth,bsilverberg
MozReview-Commit-ID: ELgjLHsVLkv

--HG--
extra : rebase_source : 8df793d8484762670e42fff4c3708df2b3ea1ebe
2017-09-25 16:47:38 -04:00
Chris Peterson a6a56ed916 Bug 870698 - Part 6: Replace Append(NS_LITERAL_CSTRING("")) with AppendLiteral(""). r=erahm
The NS_LITERAL_CSTRING macro creates a temporary nsLiteralCString to encapsulate the string literal and its length, but AssignLiteral() can determine the string literal's length at compile-time without nsLiteralCString.

MozReview-Commit-ID: F750v6NN81s

--HG--
extra : rebase_source : 714dd78df0f4c33e23e5b117615bd8fd561674c5
extra : source : 742bda9e6b1ddaf34d09894204ad18ce798b79b7
2017-09-07 18:25:25 -07:00
Nicholas Nethercote e3c9cbb969 Bug 1401813 - Rename Null[C]String() as Void[C]String(). r=erahm.
XPCOM's string API doesn't have the notion of a "null string". But it does have
the notion of a "void string" (or "voided string"), and that's what these
functions are returning. So the names should reflect that.

--HG--
extra : rebase_source : 4e3f982e0873877174a08a25413595ff66f7d20e
2017-09-22 14:35:46 +10:00
Andrea Marchesini 84764f515b Bug 1397702 - StorageObserver should use nsTObserverArray for the sink in order to support removal when iterating. r=mccr8 2017-09-10 13:32:13 -04:00
Andrew Sutherland 9d993b8aa0 Bug 1395598 - Correct LocalStorage mozStorage misuse. r=janv 2017-09-01 10:32:59 -04:00
Masatoshi Kimura 50a9a5c541 Bug 1389529 - Remove @deprecated nsIDOMStorageManager.getLocalStorageForPrincipal. r=mayhemer
MozReview-Commit-ID: 7xmsk1b2MQE

--HG--
extra : rebase_source : c4ba78fc2d1a916f5e8f9c98368daf689d703440
2017-08-12 00:36:01 +09:00
Jan Varga bd9fcfbc01 Bug 1350637 - Part 11: Fix a race between parent/child process; r=asuth
When a storage child actor gets the xpcom-shutdown notification, it releases
the actor singleton which asynchronously sends __delete__ to the parent and
destroys the child actor immediatelly. However, at the same time parent can be
sending a message to the child which results in a routing error since the child
actor doesn't exist anymore. The routing error causes a crash.
This patch prevents the race by doing the teardown in two steps. We send a
message to the parent DeleteMe and parent then sends __delete__ to the child.
2017-08-08 23:02:57 +02:00
Jan Varga ac9ac9e347 Bug 1350637 - Part 9: Move Local Storage event broadcasting from PContent to PBackground; r=asuth 2017-08-08 23:02:28 +02:00
Jan Varga b53d9b8691 Bug 1350637 - Part 7: Convert asynchronous StorageDBParent initialization to be synchronous and fix low disk space checking; r=asuth 2017-08-08 23:01:56 +02:00
Jan Varga 9d50c72e29 Bug 1350637 - Part 6: Fix a deadlock when main process storage child actor triggers storage thread initialization; r=asuth 2017-08-08 23:01:52 +02:00
Jan Varga 3acd1f5628 Bug 1350637 - Part 5: Factor out the parent actor observer sink to work on the PBackground thread, fix the rest of observer handling to use IPC; r=asuth 2017-08-08 23:01:33 +02:00
Jan Varga c186d54bb2 Bug 1350637 - Part 2: Core changes for LocalStorage on PBackground; r=asuth
- stop inheriting StorageDBBridge in StorageDBThread and StorageDBChild
- move StorageDBThread and StorageDBChild initialization out of LocalStorageCache
- use IPC even for the intra-process communication in main process
- rationalize a bit storage observer code
- make StorageDBParent to always be created and destroyed on the background thread
2017-07-26 12:19:13 +02:00
Jan Varga ceff0f7d8f Bug 1350637 - Part 1: Move PStorage stubs from PContent to PBackground; r=asuth r=billm
--HG--
rename : dom/storage/PStorage.ipdl => dom/storage/PBackgroundStorage.ipdl
2017-08-08 22:56:49 +02:00
Thomas Wisniewski e530ba4d43 Bug 1355576 - Add ability to clear all localStorage with the browsingData API; r=bsilverberg,janv
MozReview-Commit-ID: 4UUqg62yIo9

--HG--
extra : rebase_source : 9c6154bbe878fc3921d22027fdc90dbdaed05be9
2017-07-04 20:59:26 -04:00
Phil Ringnalda e760ae7c08 Backed out changeset 5020a2dcb8a7 (bug 1355576) for failures in test_ext_browsingData.js
MozReview-Commit-ID: BVSLvIkK5Wd
2017-08-06 15:29:38 -07:00
Thomas Wisniewski 5eeefa573d Bug 1355576 - Add ability to clear all localStorage with the browsingData API; r=bsilverberg,janv
MozReview-Commit-ID: 4UUqg62yIo9

--HG--
extra : rebase_source : d38ee312dbfb3b7f46893d7af200b564876c82d1
2017-07-04 20:59:26 -04:00
Bill McCloskey c6c1f4bbc9 Bug 1385413 - Remove thread parameter from onDispatchedEvent (r=erahm)
This parameter isn't used by any implementation of onDispatchedEvent,
and keeping the parameter makes later refactorings in this bug more difficult.

MozReview-Commit-ID: 90VY2vYtwCW
2017-07-28 13:09:06 -07:00
Andrea Marchesini d2b7ec5d78 Bug 1384650 - Remove extra warnings in SessionStorageManage, r=erahm 2017-07-26 21:47:43 +02:00
Bevis Tseng a7505864a8 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm
--HG--
extra : rebase_source : 11319e568a51d16754a6a9990f76c35c86c2bda7
2017-07-26 16:13:35 +08:00
Andrea Marchesini 3061742432 Bug 1379568 - Filtering for StorageEvent broadcasting, r=asuth 2017-07-26 15:55:51 +02:00
Sebastian Hengst 88f58a1134 Backed out changeset 960a0dc9092f (bug 1379568) for frequently timing out web-platform-test /webstorage/storage_setitem.html. r=backout 2017-07-12 19:04:44 +02:00
Andrea Marchesini 7ab90de6be Bug 1379568 - Filtering for StorageEvent broadcasting, r=asuth 2017-07-12 14:49:05 +02:00
Wes Kocher 19d135c982 Merge m-c to autoland, a=merge
MozReview-Commit-ID: 4R4GFHPiij
2017-07-06 16:19:38 -07:00
Andrea Marchesini 68ee090884 Bug 1333981 - Introduce StorageNotifierService for the dispatching of StorageEvent using the correct mainthread event target, r=billm 2017-07-06 19:35:33 +02:00
Sebastian Hengst f48d2ca17a Backed out changeset 326615f76fd9 (bug 1333981) for asserting in test_storageNotifications.html. r=backout 2017-07-06 15:16:36 +02:00
Sylvestre Ledru 4e9cf83ee8 Bug 1378712 - Remove all trailing whitespaces r=Ehsan
MozReview-Commit-ID: Kdz2xtTF9EG

--HG--
extra : rebase_source : 7235b3802f25bab29a8c6ba40a181a722f3df0ce
2017-07-06 14:00:35 +02:00
Andrea Marchesini 137ff0d2b0 Bug 1333981 - Introduce StorageNotifierService for the dispatching of StorageEvent using the correct mainthread event target, r=billm 2017-07-06 12:55:35 +02:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Nicholas Nethercote 58786e1ea7 Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Nicholas Nethercote 033f83145c Bug 1375387 - Reorder and section-ify GeckoProfiler.h. r=mstange.
This patch gives some structure and order to the profiler's API.

It also renames AutoProfilerRegister as AutoProfilerRegisterThread, to match
profiler_register_thread().
2017-06-22 14:28:47 +10:00
Nicholas Nethercote f1364a75ea Bug 1374580 (part 3) - Remove ns{,C}Substring typedefs. r=froydnj.
All the instances are converted as follows.

- nsSubstring  --> nsAString
- nsCSubstring --> nsACString

--HG--
extra : rebase_source : cfd2238c52e3cb4d13e3bd5ddb80ba6584ab6d91
2017-06-20 19:19:52 +10:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00
Bill McCloskey 4592152411 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Andrea Marchesini 8d3ee27842 Bug 1370087 - GenerateOriginKey cannot assert the existence of nsIPrincipal, r=smaug 2017-06-12 12:26:08 +02:00
Andrea Marchesini 7cf1d1c9b0 Bug 1366101 - Remove extra warnings in SessionStorageManage, r=smaug 2017-05-19 17:26:42 +02:00
Andrea Marchesini c220978a34 Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 11 - SessionStorageCache must have 2 DataSet: default and sessionOnly, r=asuth 2017-05-17 07:01:15 +02:00
Andrea Marchesini ea8fdbd1e1 Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 10 - Move IsSessionOnly() in Storage class, r=asuth 2017-05-17 07:01:15 +02:00
Andrea Marchesini 44f653e013 Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 9 - Move SessionStorageCache in separate files, r=asuth
--HG--
rename : dom/storage/SessionStorage.cpp => dom/storage/SessionStorageCache.cpp
rename : dom/storage/SessionStorage.h => dom/storage/SessionStorageCache.h
2017-05-17 07:01:14 +02:00
Andrea Marchesini 4d15e9cb30 Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 8 - Rename StorageCache to LocalStorageCache, r=asuth
--HG--
rename : dom/storage/StorageCache.cpp => dom/storage/LocalStorageCache.cpp
rename : dom/storage/StorageCache.h => dom/storage/LocalStorageCache.h
2017-05-17 07:01:14 +02:00
Andrea Marchesini 64c5efb312 Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 7 - SessionStorageManager must be a StorageObserverSink, r=asuth 2017-05-17 07:01:14 +02:00
Andrea Marchesini d1223c0fbd Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 6 - Implementation of IsForkOf(), r=asuth 2017-05-17 07:01:14 +02:00
Andrea Marchesini 24bdb3ece3 Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 5 - Shared broadcasting of changes, r=asuth 2017-05-17 07:01:14 +02:00
Andrea Marchesini 9ace5e5eb5 Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 4 - Rename StorageManagerBase to LocalStorageManager, r=asuth
--HG--
rename : dom/storage/StorageManager.cpp => dom/storage/LocalStorageManager.cpp
rename : dom/storage/StorageManager.h => dom/storage/LocalStorageManager.h
2017-05-17 07:01:14 +02:00
Andrea Marchesini 92cdd8d98b Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 3 - SessionStorageManager, r=asuth 2017-05-17 07:01:14 +02:00
Andrea Marchesini 6bb2aff78b Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 2 - Rename Storage.{cpp,h} to LocalStorage.{cpp,h}, r=asuth
--HG--
rename : dom/storage/Storage.cpp => dom/storage/LocalStorage.cpp
rename : dom/storage/Storage.h => dom/storage/LocalStorage.h
2017-05-17 07:01:13 +02:00
Andrea Marchesini 53a425959b Bug 1322316 - Split SessionStorage and LocalStorage implementation - part 1 - SessionStorage, r=asuth 2017-05-17 07:01:12 +02:00
Tim Taubert 1eae0fcd88 Bug 1361974 - Add nsIDOMWindowUtils API to check usage of a given storage r=mayhemer 2017-05-04 14:29:36 +02:00