Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(469)

Side by Side Diff: third_party/WebKit/Source/modules/fetch/Body.h

Issue 1805843002: [v8 gc] Introduce a base class for all objects that can have pending activity (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef Body_h 5 #ifndef Body_h
6 #define Body_h 6 #define Body_h
7 7
8 #include "bindings/core/v8/ScriptPromise.h" 8 #include "bindings/core/v8/ScriptPromise.h"
9 #include "bindings/core/v8/ScriptWrappable.h" 9 #include "bindings/core/v8/ScriptWrappable.h"
10 #include "bindings/core/v8/V8GCRoot.h"
10 #include "core/dom/ActiveDOMObject.h" 11 #include "core/dom/ActiveDOMObject.h"
11 #include "modules/ModulesExport.h" 12 #include "modules/ModulesExport.h"
12 #include "platform/heap/Handle.h" 13 #include "platform/heap/Handle.h"
13 #include "wtf/text/WTFString.h" 14 #include "wtf/text/WTFString.h"
14 15
15 namespace blink { 16 namespace blink {
16 17
17 class BodyStreamBuffer; 18 class BodyStreamBuffer;
18 class ExecutionContext; 19 class ExecutionContext;
19 class ReadableByteStream; 20 class ReadableByteStream;
20 class ScriptState; 21 class ScriptState;
21 22
22 // This class represents Body mix-in defined in the fetch spec 23 // This class represents Body mix-in defined in the fetch spec
23 // https://fetch.spec.whatwg.org/#body-mixin. 24 // https://fetch.spec.whatwg.org/#body-mixin.
24 // 25 //
25 // Note: This class has body stream and its predicate whereas in the current 26 // Note: This class has body stream and its predicate whereas in the current
26 // spec only Response has it and Request has a byte stream defined in the 27 // spec only Response has it and Request has a byte stream defined in the
27 // Encoding spec. The spec should be fixed shortly to be aligned with this 28 // Encoding spec. The spec should be fixed shortly to be aligned with this
28 // implementation. 29 // implementation.
29 class MODULES_EXPORT Body 30 class MODULES_EXPORT Body
30 : public GarbageCollectedFinalized<Body> 31 : public GarbageCollectedFinalized<Body>
31 , public ScriptWrappable 32 , public ScriptWrappable
32 , public ActiveDOMObject { 33 , public ActiveDOMObject
34 , public V8GCRoot {
33 WTF_MAKE_NONCOPYABLE(Body); 35 WTF_MAKE_NONCOPYABLE(Body);
34 DEFINE_WRAPPERTYPEINFO(); 36 DEFINE_WRAPPERTYPEINFO();
35 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Body); 37 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Body);
36 public: 38 public:
37 explicit Body(ExecutionContext*); 39 explicit Body(ExecutionContext*);
38 ~Body() override { } 40 ~Body() override { }
39 41
40 ScriptPromise arrayBuffer(ScriptState*); 42 ScriptPromise arrayBuffer(ScriptState*);
41 ScriptPromise blob(ScriptState*); 43 ScriptPromise blob(ScriptState*);
42 ScriptPromise formData(ScriptState*); 44 ScriptPromise formData(ScriptState*);
(...skipping 27 matching lines...) Expand all
70 // an empty ScriptPromise if the consumption may proceed, and a 72 // an empty ScriptPromise if the consumption may proceed, and a
71 // ScriptPromise rejected with a TypeError if it ought to be blocked. 73 // ScriptPromise rejected with a TypeError if it ought to be blocked.
72 ScriptPromise rejectInvalidConsumption(ScriptState*); 74 ScriptPromise rejectInvalidConsumption(ScriptState*);
73 75
74 bool m_opaque; 76 bool m_opaque;
75 }; 77 };
76 78
77 } // namespace blink 79 } // namespace blink
78 80
79 #endif // Body_h 81 #endif // Body_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698