Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(323)

Side by Side Diff: third_party/WebKit/Source/bindings/core/v8/Dictionary.h

Issue 2520273002: binding: Makes Dictionary::hasProperty rethrow an exception. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/Dictionary.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 } 74 }
75 75
76 bool get(const StringView& key, v8::Local<v8::Value>& value) const { 76 bool get(const StringView& key, v8::Local<v8::Value>& value) const {
77 return m_isolate && getInternal(v8String(m_isolate, key), value); 77 return m_isolate && getInternal(v8String(m_isolate, key), value);
78 } 78 }
79 bool get(const StringView& key, Dictionary&) const; 79 bool get(const StringView& key, Dictionary&) const;
80 80
81 bool getOwnPropertiesAsStringHashMap(HashMap<String, String>&) const; 81 bool getOwnPropertiesAsStringHashMap(HashMap<String, String>&) const;
82 bool getPropertyNames(Vector<String>&) const; 82 bool getPropertyNames(Vector<String>&) const;
83 83
84 bool hasProperty(const StringView&) const; 84 bool hasProperty(const StringView& key, ExceptionState&) const;
85 85
86 v8::Isolate* isolate() const { return m_isolate; } 86 v8::Isolate* isolate() const { return m_isolate; }
87 v8::Local<v8::Context> v8Context() const { 87 v8::Local<v8::Context> v8Context() const {
88 ASSERT(m_isolate); 88 ASSERT(m_isolate);
89 return m_isolate->GetCurrentContext(); 89 return m_isolate->GetCurrentContext();
90 } 90 }
91 91
92 DictionaryIterator getIterator(ExecutionContext*) const; 92 DictionaryIterator getIterator(ExecutionContext*) const;
93 93
94 private: 94 private:
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 static bool get(const Dictionary&, 143 static bool get(const Dictionary&,
144 const StringView& key, 144 const StringView& key,
145 PointerType<T>& value); 145 PointerType<T>& value);
146 template <typename T> 146 template <typename T>
147 static bool get(const Dictionary&, const StringView& key, Nullable<T>& value); 147 static bool get(const Dictionary&, const StringView& key, Nullable<T>& value);
148 }; 148 };
149 149
150 } // namespace blink 150 } // namespace blink
151 151
152 #endif // Dictionary_h 152 #endif // Dictionary_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/Dictionary.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698