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

Unified Diff: Source/modules/serviceworkers/Body.h

Issue 562413003: Request construction spec changes to use the 'used' flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed method name & step number fixes Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: Source/modules/serviceworkers/Body.h
diff --git a/Source/modules/serviceworkers/Body.h b/Source/modules/serviceworkers/Body.h
index 99072c95adf9ae6f24953bfd9bc6b91dfb492bb4..06e14eac636d2d9cfe5d6333c46b4f038d6bc550 100644
--- a/Source/modules/serviceworkers/Body.h
+++ b/Source/modules/serviceworkers/Body.h
@@ -50,6 +50,11 @@ public:
virtual void trace(Visitor*) { }
+protected:
+ // Sets the bodyUsed flag to true. This signifies that the contents of the
+ // body have been consumed and cannot be accessed again.
+ void setBodyUsed();
+
private:
ScriptPromise readAsync(ScriptState*, ResponseType);
void resolveJSON();
« no previous file with comments | « LayoutTests/http/tests/serviceworker/resources/request-worker.js ('k') | Source/modules/serviceworkers/Body.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698