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

Unified Diff: Source/bindings/v8/Dictionary.cpp

Issue 358573002: [ServiceWorker] Implement Headers class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 6 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
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/modules/modules.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/Dictionary.cpp
diff --git a/Source/bindings/v8/Dictionary.cpp b/Source/bindings/v8/Dictionary.cpp
index d0c62f88cb6716c0f83287d2c7a5711ce64bc3f3..c39a8d627bb5fc24606e99272341294db6d0363a 100644
--- a/Source/bindings/v8/Dictionary.cpp
+++ b/Source/bindings/v8/Dictionary.cpp
@@ -39,6 +39,7 @@
#include "bindings/core/v8/custom/V8Uint8ArrayCustom.h"
#include "bindings/modules/v8/V8Gamepad.h"
#include "bindings/modules/v8/V8HeaderMap.h"
+#include "bindings/modules/v8/V8Headers.h"
#include "bindings/modules/v8/V8IDBKeyRange.h"
#include "bindings/modules/v8/V8MIDIPort.h"
#include "bindings/modules/v8/V8MediaStream.h"
@@ -578,6 +579,16 @@ bool Dictionary::get(const String& key, RefPtr<HeaderMap>& value) const
return true;
}
+bool Dictionary::get(const String& key, RefPtr<Headers>& value) const
+{
+ v8::Local<v8::Value> v8Value;
+ if (!getKey(key, v8Value))
+ return false;
+
+ value = V8Headers::toNativeWithTypeCheck(m_isolate, v8Value);
+ return true;
+}
+
bool Dictionary::convert(ConversionContext& context, const String& key, Dictionary& value) const
{
ConversionContextScope scope(context);
« no previous file with comments | « Source/bindings/v8/Dictionary.h ('k') | Source/modules/modules.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698