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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 { | 490 { |
491 v8::Local<v8::Value> v8Value; | 491 v8::Local<v8::Value> v8Value; |
492 if (!getKey(key, v8Value)) | 492 if (!getKey(key, v8Value)) |
493 return false; | 493 return false; |
494 | 494 |
495 if (!v8Value->IsArray()) | 495 if (!v8Value->IsArray()) |
496 return false; | 496 return false; |
497 | 497 |
498 v8::Local<v8::Array> v8Array = v8::Local<v8::Array>::Cast(v8Value); | 498 v8::Local<v8::Array> v8Array = v8::Local<v8::Array>::Cast(v8Value); |
499 for (size_t i = 0; i < v8Array->Length(); ++i) { | 499 for (size_t i = 0; i < v8Array->Length(); ++i) { |
500 v8::Local<v8::Value> indexedValue = v8Array->Get(v8::Uint32::New(i)); | 500 v8::Local<v8::Value> indexedValue = v8Array->Get(v8::Uint32::New(i, m_is
olate)); |
501 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringValue,
indexedValue, false); | 501 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringValue,
indexedValue, false); |
502 value.append(stringValue); | 502 value.append(stringValue); |
503 } | 503 } |
504 | 504 |
505 return true; | 505 return true; |
506 } | 506 } |
507 | 507 |
508 bool Dictionary::get(const String& key, ArrayValue& value) const | 508 bool Dictionary::get(const String& key, ArrayValue& value) const |
509 { | 509 { |
510 v8::Local<v8::Value> v8Value; | 510 v8::Local<v8::Value> v8Value; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 if (!options->Has(key)) | 611 if (!options->Has(key)) |
612 continue; | 612 continue; |
613 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringKey, ke
y, false); | 613 V8TRYCATCH_FOR_V8STRINGRESOURCE_RETURN(V8StringResource<>, stringKey, ke
y, false); |
614 names.append(stringKey); | 614 names.append(stringKey); |
615 } | 615 } |
616 | 616 |
617 return true; | 617 return true; |
618 } | 618 } |
619 | 619 |
620 } // namespace WebCore | 620 } // namespace WebCore |
OLD | NEW |