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

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

Issue 287363004: ServiceWorker: support Response.{status,statusText,headers} [blink] (2/3) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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/bindings/v8/Dictionary.cpp
diff --git a/Source/bindings/v8/Dictionary.cpp b/Source/bindings/v8/Dictionary.cpp
index 72f43e951c1a906288290e861765b5cf6c680495..216caeac382cab0bfe32e580e57f3cfc5840a1fd 100644
--- a/Source/bindings/v8/Dictionary.cpp
+++ b/Source/bindings/v8/Dictionary.cpp
@@ -29,6 +29,7 @@
#include "V8DOMError.h"
#include "V8EventTarget.h"
#include "V8Gamepad.h"
+#include "V8HeaderMap.h"
#include "V8IDBKeyRange.h"
#include "V8MIDIPort.h"
#include "V8MediaKeyError.h"
@@ -570,6 +571,16 @@ bool Dictionary::get(const String& key, Dictionary& value) const
return true;
}
+bool Dictionary::get(const String& key, RefPtr<HeaderMap>& value) const
+{
+ v8::Local<v8::Value> v8Value;
+ if (!getKey(key, v8Value))
+ return false;
+
+ value = V8HeaderMap::toNativeWithTypeCheck(m_isolate, v8Value);
+ return true;
+}
+
bool Dictionary::convert(ConversionContext& context, const String& key, Dictionary& value) const
{
ConversionContextScope scope(context);

Powered by Google App Engine
This is Rietveld 408576698