| 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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 | 302 |
| 303 if (!v8Value->IsArray()) | 303 if (!v8Value->IsArray()) |
| 304 return false; | 304 return false; |
| 305 | 305 |
| 306 ASSERT(dictionary.isolate()); | 306 ASSERT(dictionary.isolate()); |
| 307 ASSERT(dictionary.isolate() == v8::Isolate::GetCurrent()); | 307 ASSERT(dictionary.isolate() == v8::Isolate::GetCurrent()); |
| 308 value = ArrayValue(v8::Local<v8::Array>::Cast(v8Value), dictionary.isolate()
); | 308 value = ArrayValue(v8::Local<v8::Array>::Cast(v8Value), dictionary.isolate()
); |
| 309 return true; | 309 return true; |
| 310 } | 310 } |
| 311 | 311 |
| 312 template CORE_EXPORT bool DictionaryHelper::get(const Dictionary&, const String&
key, RefPtr<DOMUint8Array>& value); | 312 template<> |
| 313 CORE_EXPORT bool DictionaryHelper::get(const Dictionary& dictionary, const Strin
g& key, DOMUint8Array*& value) |
| 314 { |
| 315 v8::Local<v8::Value> v8Value; |
| 316 if (!dictionary.get(key, v8Value)) |
| 317 return false; |
| 318 |
| 319 value = V8Uint8Array::toImplWithTypeCheck(dictionary.isolate(), v8Value); |
| 320 return true; |
| 321 } |
| 313 | 322 |
| 314 } // namespace blink | 323 } // namespace blink |
| OLD | NEW |