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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
171 bool Dictionary::get(const String& key, ScriptValue& value) const | 171 bool Dictionary::get(const String& key, ScriptValue& value) const |
172 { | 172 { |
173 v8::Local<v8::Value> v8Value; | 173 v8::Local<v8::Value> v8Value; |
174 if (!getKey(key, v8Value)) | 174 if (!getKey(key, v8Value)) |
175 return false; | 175 return false; |
176 | 176 |
177 value = ScriptValue(v8Value); | 177 value = ScriptValue(v8Value); |
178 return true; | 178 return true; |
179 } | 179 } |
180 | 180 |
181 bool Dictionary::get(const String& key, RefPtr<SerializedScriptValue>& value) co nst | |
182 { | |
183 v8::Local<v8::Value> v8Value; | |
184 if (!getKey(key, v8Value)) | |
185 return false; | |
186 | |
187 value = SerializedScriptValue::createSwallowExceptions(v8Value, m_isolate); | |
haraken
2013/07/18 00:00:29
Would you elaborate on why you want to ignore exce
adamk
2013/07/18 01:09:14
Note that this file is now gone.
But in all the o
| |
188 return true; | |
189 } | |
190 | |
181 bool Dictionary::get(const String& key, unsigned short& value) const | 191 bool Dictionary::get(const String& key, unsigned short& value) const |
182 { | 192 { |
183 v8::Local<v8::Value> v8Value; | 193 v8::Local<v8::Value> v8Value; |
184 if (!getKey(key, v8Value)) | 194 if (!getKey(key, v8Value)) |
185 return false; | 195 return false; |
186 | 196 |
187 v8::Local<v8::Int32> v8Int32 = v8Value->ToInt32(); | 197 v8::Local<v8::Int32> v8Int32 = v8Value->ToInt32(); |
188 if (v8Int32.IsEmpty()) | 198 if (v8Int32.IsEmpty()) |
189 return false; | 199 return false; |
190 value = static_cast<unsigned short>(v8Int32->Value()); | 200 value = static_cast<unsigned short>(v8Int32->Value()); |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
599 v8::Local<v8::String> key = properties->Get(i)->ToString(); | 609 v8::Local<v8::String> key = properties->Get(i)->ToString(); |
600 if (!options->Has(key)) | 610 if (!options->Has(key)) |
601 continue; | 611 continue; |
602 names.append(toWebCoreString(key)); | 612 names.append(toWebCoreString(key)); |
603 } | 613 } |
604 | 614 |
605 return true; | 615 return true; |
606 } | 616 } |
607 | 617 |
608 } // namespace WebCore | 618 } // namespace WebCore |
OLD | NEW |