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

Unified Diff: Source/core/html/DOMFormData.cpp

Issue 227483008: Support FormData on WorkerGlobalScope. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 8 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/core/html/DOMFormData.cpp
diff --git a/Source/core/html/DOMFormData.cpp b/Source/core/html/DOMFormData.cpp
index 942f51f824f4c741091b1acb25ac6ce225113326..a9e629cab2c2fd9f360fd24ee5e540436775c6b0 100644
--- a/Source/core/html/DOMFormData.cpp
+++ b/Source/core/html/DOMFormData.cpp
@@ -38,6 +38,14 @@
namespace WebCore {
+PassRefPtrWillBeRawPtr<DOMFormData> DOMFormData::create(ExecutionContext* context, HTMLFormElement* form)
+{
+ if (context->isWorkerGlobalScope())
+ form = 0;
+
+ return adoptRefWillBeNoop(new DOMFormData(form));
+}
+
DOMFormData::DOMFormData(const WTF::TextEncoding& encoding)
: FormDataList(encoding)
{

Powered by Google App Engine
This is Rietveld 408576698