Commit Graph

72 Commits

Author SHA1 Message Date
Eric Rahm
1fca90d61d Bug 1626441 - Remove nsAutoPtr usage from dom/fetch. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D69112

--HG--
extra : moz-landing-system : lando
2020-04-03 21:05:07 +00:00
Gabriele Svelto
ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca
a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto
bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55442

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Andrea Marchesini
55dd423fa3 Bug 1567419 - Ensure the BodyStreamHolder has a valid stream always, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D38814

--HG--
extra : moz-landing-system : lando
2019-07-23 23:23:41 +00:00
Andrea Marchesini
a6803fce1e Bug 1563032 - BodyStream must check the return value of BodyStreamHolder::GetReadableStreamBody(), r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D36717

--HG--
extra : moz-landing-system : lando
2019-07-03 16:08:30 +00:00
Andrea Marchesini
30d3748577 Bug 1557121 - Implement Blob.text()/Blob.arrayBuffer()/Blob.stream() - part 3 - Rename FetchBodyConsumer to BodyConsumer, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33828

--HG--
rename : dom/fetch/FetchConsumer.cpp => dom/base/BodyConsumer.cpp
rename : dom/fetch/FetchConsumer.h => dom/base/BodyConsumer.h
extra : moz-landing-system : lando
2019-06-07 14:16:59 +00:00
Andrea Marchesini
a96bc57140 Bug 1557121 - Implement Blob.text()/Blob.arrayBuffer()/Blob.stream() - part 2 - FetchBodyConsumer doesn't need to be a template class, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33827

--HG--
extra : moz-landing-system : lando
2019-06-07 13:09:32 +00:00
Andrea Marchesini
16d8326f76 Bug 1557121 - Implement Blob.text()/Blob.arrayBuffer()/Blob.stream() - part 1 - Rename FetchStream to BodyStream, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D33826

--HG--
rename : dom/fetch/FetchStream.cpp => dom/base/BodyStream.cpp
rename : dom/fetch/FetchStream.h => dom/base/BodyStream.h
extra : moz-landing-system : lando
2019-06-07 13:09:12 +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
Andrea Marchesini
ebf242be0d Bug 1500879 - Fetch should not consume Request/Response with null-body, r=asuth
The fetch spec treats null bodies specially.  Their Body cannot become
disturbed or locked and a fresh empty ReadableStream is returned whenever an
attempt is made to consume the body.  We currently fail a number of WPT tests
in this area because we do mark the body consumed as exposed via bodyUsed.
2018-11-06 14:48:07 +01:00
Till Schneidereit ext:(%2C%20Jason%20Orendorff%20%3Cjorendorff%40mozilla.com%3E)
2cfba34b8d Bug 1385890 - Fix Streams implementation in multiple-global uses. r=baku,tcampbell,jorendorff
Streams have multiple parts that can be JS objects from different compartments.
For example, the [[reader]] internal slot of a stream can point to a reader
object in another compartment.

This patch makes the ReadableStream implementation robust against mixing and
matching stream-related objects and methods from different globals.

This also removes ReadableStreamBYOBReader and ReadableStreamBYOBRequest for
now, with a view toward enabling basic ReadableStream features by default in
bug 1389628.

Differential Revision: https://phabricator.services.mozilla.com/D8450

--HG--
extra : rebase_source : 71d73bed5bc82557efcb6b1ecb231275fd3e1189
extra : amend_source : de29f663b9929eb2858b23cc6f4e7ba97b23a28c
extra : source : f91eb962df6a06d5f51ad13caa2a4a9c2947f293
2018-10-11 14:18:43 -05:00
Thomas Wisniewski
d23454328e Bug 1491504 - shortcut blob responses from XHR and fetch when the URL is a blob URL; r=baku
shortcut blob responses from XHR and fetch when the URL is a blob URL

Differential Revision: https://phabricator.services.mozilla.com/D7253

--HG--
extra : moz-landing-system : lando
2018-10-06 17:34:24 +00:00
Ciure Andrei
47efccbbca Backed out changeset c5ac0cb25238 (bug 1491504) for FetchConsumer.cpp build bustages CLOSED TREE 2018-10-06 02:58:44 +03:00
Thomas Wisniewski
2294c78986 Bug 1491504 - shortcut blob responses from XHR and fetch when the URL is a blob URL; r=baku
shortcut blob responses from XHR and fetch when the URL is a blob URL

Differential Revision: https://phabricator.services.mozilla.com/D7253

--HG--
extra : moz-landing-system : lando
2018-10-05 20:23:55 +00:00
Thomas Wisniewski
400093bdb6 Bug 1482752 - Have Fetch bodies use File blobs for local files instead of regular blobs. r=baku
Have Fetch bodies use File blobs for local files instead of regular blobs.

Differential Revision: https://phabricator.services.mozilla.com/D3183

--HG--
extra : moz-landing-system : lando
2018-09-11 19:13:15 +00:00
Cosmin Sabou
dc72962df3 Backed out changeset 68805212630a (bug 1482752) for causing build bustages on dom/fetch. CLOSED TREE 2018-09-08 20:46:04 +03:00
Thomas Wisniewski
4d92a94c0d Bug 1482752 - Have Fetch bodies use File blobs for local files instead of regular blobs. r=baku
Have Fetch bodies use File blobs for local files instead of regular blobs.

Differential Revision: https://phabricator.services.mozilla.com/D3183

--HG--
extra : moz-landing-system : lando
2018-09-08 14:34:37 +00:00
Andrea Marchesini
e1a0b51543 Bug 1478101 - Split AbortSignal in 2 classes: AbortSignal and AbortSignalImpl, r=bz 2018-08-26 14:16:21 +02:00
Andrea Marchesini
f46c7858b5 Bug 1446204 - Response body should be marked as used if used as stream, r=till 2018-03-16 16:52:28 +01:00
Andrea Marchesini
2c7c69af24 Bug 1432963 - Fixing workers headers - part 14 - WorkerPrivate without workers namespace, r=smaug 2018-01-31 08:24:08 +01:00
Andrea Marchesini
76ea37870c Bug 1390717 - FetchStream should not have an extra JS::Heap<ReadableStream>, r=jonco 2017-08-31 16:29:02 +02:00
Andrea Marchesini
3e5de60a22 Bug 1378342 - AbortSignal/AbortController - part 9 - Request.signal should not be a reference of RequestInit.signal, r=bkelly 2017-08-29 11:31:07 +02:00
Andrea Marchesini
a441d6f43c Bug 1378342 - AbortSignal/AbortController - part 8 - Aborting ReadableStream when AbortSignal is aborted, r=bkelly 2017-08-29 11:31:06 +02:00
Andrea Marchesini
f533937740 Bug 1378342 - AbortSignal/AbortController - part 6 - Implement Request.signal, r=bkelly 2017-08-29 11:31:06 +02:00
Sebastian Hengst
80e618e605 Backed out changeset 2c6f49d73935 (bug 1378342) 2017-08-29 09:16:59 +02:00
Sebastian Hengst
03d1665672 Backed out changeset 64d0dbf9706b (bug 1378342) 2017-08-29 09:16:48 +02:00
Sebastian Hengst
db728bce54 Backed out changeset 4c41e61d6763 (bug 1378342) 2017-08-29 09:16:43 +02:00
Andrea Marchesini
b89d4f379a Bug 1378342 - AbortSignal/AbortController - part 9 - Request.signal should not be a reference of RequestInit.signal, r=bkelly 2017-08-29 07:30:21 +02:00
Andrea Marchesini
268b173378 Bug 1378342 - AbortSignal/AbortController - part 8 - Aborting ReadableStream when AbortSignal is aborted, r=bkelly 2017-08-29 07:30:21 +02:00
Andrea Marchesini
afa1c0c6c4 Bug 1378342 - AbortSignal/AbortController - part 6 - Implement Request.signal, r=bkelly 2017-08-29 07:30:21 +02:00
Andrea Marchesini
6e330b0360 Bug 1128959 - Implement the WHATWG Streams spec - part 16 - report stream errors during consumption r=bkelly 2017-08-10 18:04:56 -07:00
Andrea Marchesini
cb3c4dda07 Bug 1128959 - Implement the WHATWG Streams spec - part 12 - starting body consuming and passing the JSContext down from the binding entrypoints to where the ReadableStream could be read, r=bz
This patch does 2 things:

. when SetBodyUsed() is called, the pump for the stream reading is activated.

. Just because of the reading of the stream could end up executing JS code, we
  need to pass the JSContext in the correct state down to SetBodyUsed.
2017-08-10 18:04:55 -07:00
Andrea Marchesini
e44cd2d765 Bug 1128959 - Implement the WHATWG Streams spec - part 9 - FetchStreamReader, r=bkelly 2017-08-10 18:04:55 -07:00
Andrea Marchesini
3a14f6c21f Bug 1128959 - Implement the WHATWG Streams spec - part 7 - Response.body, r=bkelly 2017-08-10 18:04:55 -07:00
Andrea Marchesini
3b86092f16 Bug 1128959 - Implement the WHATWG Streams spec - part 4 - Fetch implementation, r=bkelly 2017-08-10 18:04:54 -07:00
Andrea Marchesini
99819a81c8 Bug 1128959 - Implement the WHATWG Streams spec - part 2 - Use of ReadableStream in WebIDL files, r=bkelly 2017-08-10 18:04:54 -07:00
Andrea Marchesini
4b75cfc9bc Bug 1373555 - Move the Fetch consume body login in a separate class - part 3 - Move the consuming body logic from FetchBody to FetchBodyConsumer, r=bkelly 2017-06-20 17:53:21 +02:00
Andrea Marchesini
50e54e6b44 Bug 1373555 - Move the Fetch consume body login in a separate class - part 2 - Rename FetchBodyWrapper to FetchBodyConsumer, r=bkelly 2017-06-20 17:53:21 +02:00
Andrea Marchesini
e768233bc4 Bug 1371889 - Fetch body must be kept alive using refcounting, r=bkelly 2017-06-20 17:53:20 +02:00
Bevis Tseng
024ff96b5b Bug 1363318 - Part 2: Label FetchBody. r=baku 2017-05-16 18:12:24 +08:00
Andrea Marchesini
4434f5a668 Bug 1337722 - Use BufferSource in webIDL, r=qdot 2017-02-09 10:37:54 +01:00
Boris Zbarsky
1f816c60cf Bug 1335368 part 12. Remove the use of IsCallerChrome in FetchRequest. r=bkelly 2017-02-01 15:43:37 -05:00
Andrea Marchesini
50b8aabe39 Bug 1312410 - Fetch API should use MutableBlobStorage to store big Blobs on disk, r=qdot 2016-10-26 09:07:25 +02: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
Jonas Sicking
32162d33c2 Bug 1273279 - Changes in preparation for FlyWeb landing. Change InternalResponse handling to track body size. r=baku f=bkelly
--HG--
extra : amend_source : 257331b8f4b86d6e1c7608ca6866526ce6aa645a
2016-06-01 17:02:29 -04:00
Jonathan Watt
a73bd8c354 Bug 1253094, part 1 - Stop using DebugOnly for class/struct members in dom/. r=baku
MozReview-Commit-ID: ErWZs9oV4WS
2016-02-26 15:52:06 +00:00