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

62 Коммитов

Автор SHA1 Сообщение Дата
Andrea Marchesini 2e8a673008 Bug 1308160 - Correct ::deserialize for nsHostObjectURI, r=smaug 2016-10-06 16:36:07 +02:00
Andreas Farre 436c00e869 Bug 1307473 - Fix missing namespace errors. r=smaug
MozReview-Commit-ID: LkT0SV8DcU0
2016-10-04 08:20:00 -04:00
Andrea Marchesini 84a2b86752 Bug 1288997 - AutoIPCStream DTOR must run after the use of the inputStream for PBlob, r=jld 2016-10-04 09:19:04 +02:00
Andrea Marchesini c85da869c4 Bug 1288997 - We should not broadcast Blob URLs if we have only 1 content process, r=jdm 2016-10-03 16:07:52 +02:00
Nicholas Nethercote e4eb76b618 Bug 1297300 - Add missing checks to GetSpec() calls in dom/base/. r=bz.
--HG--
extra : rebase_source : 55e83aad222825b2dd1399fa42eee6b6c894d0ee
2016-09-08 14:17:58 +10:00
Nicholas Nethercote 34dcc7b852 Bug 1299384 - Use MOZ_MUST_USE with NS_warn_if_impl(). r=erahm.
This change avoids lots of false positives for Coverity's CHECKED_RETURN
warning, caused by NS_WARN_IF's current use in both statement-style and
expression-style.

In the case where the code within the NS_WARN_IF has side-effects, I made the
following change.

> NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));
> -->
> Unused << NS_WARN_IF(NS_FAILED(FunctionWithSideEffects()));

In the case where the code within the NS_WARN_IF lacks side-effects, I made the
following change.

> NS_WARN_IF(!condWithoutSideEffects);
> -->
> NS_WARNING_ASSERTION(condWithoutSideEffects, "msg");

This has two improvements.
- The condition is not evaluated in non-debug builds.
- The sense of the condition is inverted to the familiar "this condition should
  be true" sense used in assertions.

A common variation on the side-effect-free case is the following.

> nsresult rv = Fn();
> NS_WARN_IF_(NS_FAILED(rv));
> -->
> DebugOnly<nsresult rv> = Fn();
> NS_WARNING_ASSERTION(NS_SUCCEEDED(rv), "Fn failed");

--HG--
extra : rebase_source : 58788245021096efa8372a9dc1d597a611d45611
2016-09-02 17:12:24 +10:00
Michael Layzell b258dfaa89 Bug 1297802 - Remove unused RefPtr<> and COMPtr<> types in dom/, r=baku
MozReview-Commit-ID: CLUJZdbN7sW
2016-08-29 11:40:02 -04:00
Nicholas Nethercote c2306345d5 Bug 1297658 - Avoid unnecessary checking in memory reporters. r=erahm.
This patch removes checking of all the callback calls in memory reporter
CollectReport() functions, because it's not useful.

The patch also does some associated clean-up.

- Replaces some uses of nsIMemoryReporterCallback with the preferred
  nsIHandleReportCallback typedef.

- Replaces aCallback/aCb/aClosure with aHandleRepor/aData for CollectReports()
  parameter names, for consistency.

- Adds MOZ_MUST_USE/[must_use] in a few places in nsIMemoryReporter.idl.

- Uses the MOZ_COLLECT_REPORT macro in all suitable places.

Overall the patch reduces code size by ~300 lines and reduces the size of
libxul by about 37 KiB on my Linux64 builds.

--HG--
extra : rebase_source : e94323614bd10463a0c5134a7276238a7ca1cf23
2016-08-24 15:23:45 +10:00
Geoff Lankow d14b295017 Bug 1287657 - Context menu items should not be disabled for media with a blob URL; r=kinetik, r=baku 2016-07-25 22:41:52 +12:00
Andrea Marchesini 8183e57459 Bug 1279493 - Use blob URLs exclusively rather than having mediastream and mediasource URLs, r=smaug 2016-07-21 14:31:43 +02:00
Andrea Marchesini a3d12cc23a Bug 1279186 - Blob URLs in multi-e10s - part 3 - Remove all the blobURLs when the child goes away, r=me 2016-07-18 11:13:31 +02:00
Andrea Marchesini 0c1a08fce6 Bug 1279186 - Blob URLs in multi-e10s - part 1 - BlobURLs broadcasted, r=gabor 2016-07-17 16:50:50 +02:00
Iris Hsiao 296ca81daa Backed out changeset effbc83efa08 (bug 1279186) 2016-07-18 12:11:07 +08:00
Andrea Marchesini 109557fed5 Bug 1279186 - Blob URLs in multi-e10s - part 1 - BlobURLs broadcasted, r=gabor 2016-07-17 16:50:50 +02:00
Andrea Marchesini c2e7f126f5 Bug 1282407 - Implement nsIURIWithBlobImpl to support blobURL after revoking them, r=smaug 2016-07-17 16:32:02 +02:00
Andrea Marchesini 85f84860d8 Bug 1286830 - Remove duplicate GetType() call in nsHostObjectProtocolHandler::NewChannel2, r=smaug 2016-07-14 16:58:11 +02:00
Andrea Marchesini 86086055d5 Bug 1285955 - URL.revokeObjectURL should not remove '?' or '#' from the input, r=smaug 2016-07-12 07:36:48 +02:00
Andrea Marchesini 5e957116da Bug 1285508 - Fixing memory report for BlobURLs, r=smaug 2016-07-09 13:19:46 +02:00
Patrick McManus 2cd574f25f Bug 1274376 - more mozilla::net namespaces r=dragana
--HG--
extra : rebase_source : 914d48f23a4a5db052a789b9e21c1ff922533d35
2016-05-18 22:02:57 -04:00
Mats Palmgren 7137368692 Bug 1273729 - Add some missing #includes and 'using' declarations to fix unified build errors. r=bbirtles 2016-05-18 13:49:32 +02:00
Wes Kocher 96732fa5cd Backed out changeset cf899587f05e (bug 1271249) for browser_privatebrowsing_blobUrl.js failures 2016-05-17 13:07:44 -07:00
Andrea Marchesini 9d6c9f459a Bug 1271249 - Blob URL should not be shared across non-private and private windows, r=ehsan 2016-05-17 20:34:39 +02:00
Boris Zbarsky bc347a401b Bug 1257919 part 10. Make the caller and formattedStack getters on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:35 -04:00
Boris Zbarsky 42b3bbe27a Bug 1257919 part 8. Make the line/column number getters on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:31 -04:00
Boris Zbarsky efa07c06d1 Bug 1257919 part 6. Make the filename getter on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:31 -04:00
Boris Zbarsky 655d4654c8 Bug 1257919 part 4. Stop returning StackFrame instances from exceptions::CreateStack. C++ callers of GetCurrentJSStack or exceptions::CreateStack always check for null anyway, and none of them seem to want this non-JS thing. r=khuey 2016-03-22 13:50:31 -04:00
Sebastian Hengst 60e4be8fc0 Backed out changeset 1b5db6edd791 (bug 1257919) 2016-03-22 21:10:45 +01:00
Sebastian Hengst 0e9bf1445a Backed out changeset 6e95ee3cd4c6 (bug 1257919) 2016-03-22 21:10:21 +01:00
Sebastian Hengst 336c2cc4ae Backed out changeset 08f1c7239cdf (bug 1257919) 2016-03-22 21:10:01 +01:00
Sebastian Hengst 8b2bf79a7a Backed out changeset ff81c52375ba (bug 1257919) 2016-03-22 21:09:32 +01:00
Boris Zbarsky 8062407932 Bug 1257919 part 10. Make the caller and formattedStack getters on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:35 -04:00
Boris Zbarsky 5df498fbd2 Bug 1257919 part 8. Make the line/column number getters on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:31 -04:00
Boris Zbarsky 38af226a36 Bug 1257919 part 6. Make the filename getter on JSStackFrame take an explicit JSContext. r=khuey 2016-03-22 13:50:31 -04:00
Boris Zbarsky 8ba7a0b580 Bug 1257919 part 4. Stop returning StackFrame instances from exceptions::CreateStack. C++ callers of GetCurrentJSStack or exceptions::CreateStack always check for null anyway, and none of them seem to want this non-JS thing. r=khuey 2016-03-22 13:50:31 -04:00
Gabor Krizsanits 02d06252fa Bug 1248806 - Splitting out protocol handlers from nsLayoutModule. r=bholley 2016-03-03 12:05:52 +01:00
Nicholas Nethercote 2e6272c4e5 Bug 1187782 (part 1) - Replace nsBaseHashtable::EnumerateRead() calls in dom/base/ with iterators. r=khuey.
--HG--
extra : rebase_source : d051f883dc42d5f31806fb1aef46e97b147bf78e
2015-10-26 22:19:59 -07:00
Jonas Sicking be2deca017 Bug 1195167 part 1: Let necko handle all protocols. r=bkelly 2015-10-19 18:24:36 -07: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
Andrea Marchesini c6d2d4f8dd Bug 944616 - "Blob URLs don't allow query or fragment parts". r=bz 2015-10-14 13:48:00 +02:00
Hiroyuki Ikezoe a670cdc9df Bug 1191178 - Part 0: Fix unified build in dom/base. Add missing headers and sorting them. r=smaug 2015-08-20 14:18:57 -07:00
Wes Kocher 18ba799896 Backed out 4 changesets (bug 1191178) to see if it will fix the build bustage on a CLOSED TREE
Backed out changeset 32adb36cf863 (bug 1191178)
Backed out changeset 85cb22235eb5 (bug 1191178)
Backed out changeset 744bab15a5ec (bug 1191178)
Backed out changeset b7621c6af97e (bug 1191178)
2015-08-19 16:13:13 -07:00
Hiroyuki Ikezoe 266a061786 Bug 1191178 - Part 0: Fix unified build in dom/base. Add missing headers and sorting them. r=smaug
--HG--
extra : rebase_source : 81666e4afd9347f72aa77d0e1cf637f9b399de7c
2015-08-19 15:10:28 -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
Hiroyuki Ikezoe 77bcec5ebd Bug 1178172 - Fix all compile errors in dom/base on non-unified build. r=baku 2015-07-01 15:56:00 +02:00
Seth Fowler 8e8f041c52 Bug 1154974 (Part 1) - Give blobs serial numbers. r=bent 2015-05-20 18:49:50 -07:00
Andrea Marchesini 61b9bd0496 Bug 1166231 - Make nsIDOMBlob an empty interface, r=ehsan 2015-05-19 15:36:37 +01:00
Andrea Marchesini f4538bb921 Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan
--HG--
rename : dom/base/MultipartFileImpl.cpp => dom/base/MultipartBlobImpl.cpp
rename : dom/base/MultipartFileImpl.h => dom/base/MultipartBlobImpl.h
2015-05-12 13:11:03 +01:00
Wes Kocher 6b003ab737 Backed out changeset 56e4c68dc3da (bug 1163387) for build bustage CLOSED TREE
--HG--
rename : dom/base/MultipartBlobImpl.cpp => dom/base/MultipartFileImpl.cpp
rename : dom/base/MultipartBlobImpl.h => dom/base/MultipartFileImpl.h
2015-05-11 13:17:58 -07:00
Andrea Marchesini 49a0ee6938 Bug 1163387 - Rename FileImpl to BlobImpl, r=ehsan
--HG--
rename : dom/base/MultipartFileImpl.cpp => dom/base/MultipartBlobImpl.cpp
rename : dom/base/MultipartFileImpl.h => dom/base/MultipartBlobImpl.h
2015-05-11 18:50:54 +01:00
Andrea Marchesini 3da49355e2 Bug 1160892 - Url.createObjectURL(blob) should support punycode origins, r=smaug 2015-05-07 19:20:33 +01:00