OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
368 for (size_t i = 0; i < v8Array->Length(); ++i) { | 368 for (size_t i = 0; i < v8Array->Length(); ++i) { |
369 v8::Local<v8::Value> indexedValue = v8Array->Get(v8::Uint32::New(diction
ary.isolate(), i)); | 369 v8::Local<v8::Value> indexedValue = v8Array->Get(v8::Uint32::New(diction
ary.isolate(), i)); |
370 TOSTRING_DEFAULT(V8StringResource<>, stringValue, indexedValue, false); | 370 TOSTRING_DEFAULT(V8StringResource<>, stringValue, indexedValue, false); |
371 value.append(stringValue); | 371 value.append(stringValue); |
372 } | 372 } |
373 | 373 |
374 return true; | 374 return true; |
375 } | 375 } |
376 | 376 |
377 template <> | 377 template <> |
378 bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, Vect
or<Vector<String> >& value, ExceptionState& exceptionState) | 378 bool DictionaryHelper::get(const Dictionary& dictionary, const String& key, Vect
or<Vector<String>>& value, ExceptionState& exceptionState) |
379 { | 379 { |
380 v8::Local<v8::Value> v8Value; | 380 v8::Local<v8::Value> v8Value; |
381 if (!dictionary.get(key, v8Value)) | 381 if (!dictionary.get(key, v8Value)) |
382 return false; | 382 return false; |
383 | 383 |
384 if (!v8Value->IsArray()) | 384 if (!v8Value->IsArray()) |
385 return false; | 385 return false; |
386 | 386 |
387 v8::Local<v8::Array> v8Array = v8::Local<v8::Array>::Cast(v8Value); | 387 v8::Local<v8::Array> v8Array = v8::Local<v8::Array>::Cast(v8Value); |
388 for (size_t i = 0; i < v8Array->Length(); ++i) { | 388 for (size_t i = 0; i < v8Array->Length(); ++i) { |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 | 677 |
678 value = toRefPtrWillBeMemberNativeArray<MessagePort, V8MessagePort>(v8Value,
key, dictionary.isolate(), context.exceptionState()); | 678 value = toRefPtrWillBeMemberNativeArray<MessagePort, V8MessagePort>(v8Value,
key, dictionary.isolate(), context.exceptionState()); |
679 | 679 |
680 if (context.exceptionState().throwIfNeeded()) | 680 if (context.exceptionState().throwIfNeeded()) |
681 return false; | 681 return false; |
682 | 682 |
683 return true; | 683 return true; |
684 } | 684 } |
685 | 685 |
686 } // namespace blink | 686 } // namespace blink |
OLD | NEW |