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 28 matching lines...) Expand all Loading... |
39 #include "wtf/HashSet.h" | 39 #include "wtf/HashSet.h" |
40 #include "wtf/Vector.h" | 40 #include "wtf/Vector.h" |
41 #include "wtf/text/AtomicString.h" | 41 #include "wtf/text/AtomicString.h" |
42 #include "wtf/text/WTFString.h" | 42 #include "wtf/text/WTFString.h" |
43 | 43 |
44 namespace WebCore { | 44 namespace WebCore { |
45 | 45 |
46 class ArrayValue; | 46 class ArrayValue; |
47 class DOMError; | 47 class DOMError; |
48 class DOMWindow; | 48 class DOMWindow; |
| 49 class Element; |
49 class Gamepad; | 50 class Gamepad; |
50 class MediaStream; | 51 class MediaStream; |
51 class HeaderMap; | 52 class HeaderMap; |
52 class IDBKeyRange; | 53 class IDBKeyRange; |
53 class MIDIPort; | 54 class MIDIPort; |
54 class MediaKeyError; | 55 class MediaKeyError; |
55 class Notification; | 56 class Notification; |
56 class SpeechRecognitionResult; | 57 class SpeechRecognitionResult; |
57 class SpeechRecognitionResultList; | 58 class SpeechRecognitionResultList; |
58 class Storage; | 59 class Storage; |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 template<template <typename> class PointerType, typename T> | 170 template<template <typename> class PointerType, typename T> |
170 bool convert(ConversionContext&, const String&, PointerType<T>&) const; | 171 bool convert(ConversionContext&, const String&, PointerType<T>&) const; |
171 | 172 |
172 template<typename StringType> | 173 template<typename StringType> |
173 bool getStringType(const String&, StringType&) const; | 174 bool getStringType(const String&, StringType&) const; |
174 | 175 |
175 bool getOwnPropertiesAsStringHashMap(HashMap<String, String>&) const; | 176 bool getOwnPropertiesAsStringHashMap(HashMap<String, String>&) const; |
176 bool getOwnPropertyNames(Vector<String>&) const; | 177 bool getOwnPropertyNames(Vector<String>&) const; |
177 | 178 |
178 bool getWithUndefinedOrNullCheck(const String&, String&) const; | 179 bool getWithUndefinedOrNullCheck(const String&, String&) const; |
| 180 bool getWithUndefinedOrNullCheck(const String&, RefPtrWillBeMember<Element>&
) const; |
179 | 181 |
180 bool hasProperty(const String&) const; | 182 bool hasProperty(const String&) const; |
181 | 183 |
182 private: | 184 private: |
183 bool getKey(const String& key, v8::Local<v8::Value>&) const; | 185 bool getKey(const String& key, v8::Local<v8::Value>&) const; |
184 | 186 |
185 v8::Handle<v8::Value> m_options; | 187 v8::Handle<v8::Value> m_options; |
186 v8::Isolate* m_isolate; | 188 v8::Isolate* m_isolate; |
187 }; | 189 }; |
188 | 190 |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 if (context.isNullable() && WebCore::isUndefinedOrNull(v8Value)) | 342 if (context.isNullable() && WebCore::isUndefinedOrNull(v8Value)) |
341 return true; | 343 return true; |
342 | 344 |
343 context.throwTypeError(ExceptionMessages::incorrectPropertyType(key, "does n
ot have a " + context.typeName() + " type.")); | 345 context.throwTypeError(ExceptionMessages::incorrectPropertyType(key, "does n
ot have a " + context.typeName() + " type.")); |
344 return false; | 346 return false; |
345 } | 347 } |
346 | 348 |
347 } | 349 } |
348 | 350 |
349 #endif // Dictionary_h | 351 #endif // Dictionary_h |
OLD | NEW |