namespace blink {
+// FIXME: Use IDL dictionary instead of this class.
class ResponseInit {
STACK_ALLOCATED();
public:
, statusText("OK")
{
}
- explicit ResponseInit(const Dictionary& options)
+ explicit ResponseInit(const Dictionary& options, ExceptionState& exceptionState)
: status(200)
, statusText("OK")
{
DictionaryHelper::get(options, "statusText", statusText);
DictionaryHelper::get(options, "headers", headers);
if (!headers) {
- DictionaryHelper::get(options, "headers", headersDictionary);
+ Vector<Vector<String> > headersVector;
+ if (DictionaryHelper::get(options, "headers", headersVector, exceptionState))
+ headers = Headers::create(headersVector, exceptionState);
+ else
+ DictionaryHelper::get(options, "headers", headersDictionary);
}
}