OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 } | 215 } |
216 | 216 |
217 const char* const name; | 217 const char* const name; |
218 v8::FunctionCallback callback; | 218 v8::FunctionCallback callback; |
219 v8::FunctionCallback callbackForMainWorld; | 219 v8::FunctionCallback callbackForMainWorld; |
220 int length; | 220 int length; |
221 unsigned attribute : 8; // v8::PropertyAttribute | 221 unsigned attribute : 8; // v8::PropertyAttribute |
222 unsigned exposeConfiguration : 1; // ExposeConfiguration | 222 unsigned exposeConfiguration : 1; // ExposeConfiguration |
223 unsigned | 223 unsigned |
224 propertyLocationConfiguration : 3; // PropertyLocationConfiguration | 224 propertyLocationConfiguration : 3; // PropertyLocationConfiguration |
| 225 unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration |
225 }; | 226 }; |
226 | 227 |
227 struct SymbolKeyedMethodConfiguration { | 228 struct SymbolKeyedMethodConfiguration { |
228 SymbolKeyedMethodConfiguration& operator=( | 229 SymbolKeyedMethodConfiguration& operator=( |
229 const SymbolKeyedMethodConfiguration&) = delete; | 230 const SymbolKeyedMethodConfiguration&) = delete; |
230 DISALLOW_NEW(); | 231 DISALLOW_NEW(); |
231 v8::Local<v8::Name> methodName(v8::Isolate* isolate) const { | 232 v8::Local<v8::Name> methodName(v8::Isolate* isolate) const { |
232 return getSymbol(isolate); | 233 return getSymbol(isolate); |
233 } | 234 } |
234 v8::FunctionCallback callbackForWorld(const DOMWrapperWorld&) const { | 235 v8::FunctionCallback callbackForWorld(const DOMWrapperWorld&) const { |
235 return callback; | 236 return callback; |
236 } | 237 } |
237 | 238 |
238 v8::Local<v8::Symbol> (*getSymbol)(v8::Isolate*); | 239 v8::Local<v8::Symbol> (*getSymbol)(v8::Isolate*); |
239 v8::FunctionCallback callback; | 240 v8::FunctionCallback callback; |
240 // SymbolKeyedMethodConfiguration doesn't support per-world bindings. | 241 // SymbolKeyedMethodConfiguration doesn't support per-world bindings. |
241 int length; | 242 int length; |
242 unsigned attribute : 8; // v8::PropertyAttribute | 243 unsigned attribute : 8; // v8::PropertyAttribute |
243 unsigned exposeConfiguration : 1; // ExposeConfiguration | 244 unsigned exposeConfiguration : 1; // ExposeConfiguration |
244 unsigned | 245 unsigned |
245 propertyLocationConfiguration : 3; // PropertyLocationConfiguration | 246 propertyLocationConfiguration : 3; // PropertyLocationConfiguration |
| 247 unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration |
246 }; | 248 }; |
247 | 249 |
248 static void installMethods(v8::Isolate*, | 250 static void installMethods(v8::Isolate*, |
249 const DOMWrapperWorld&, | 251 const DOMWrapperWorld&, |
250 v8::Local<v8::ObjectTemplate> instanceTemplate, | 252 v8::Local<v8::ObjectTemplate> instanceTemplate, |
251 v8::Local<v8::ObjectTemplate> prototypeTemplate, | 253 v8::Local<v8::ObjectTemplate> prototypeTemplate, |
252 v8::Local<v8::FunctionTemplate> interfaceTemplate, | 254 v8::Local<v8::FunctionTemplate> interfaceTemplate, |
253 v8::Local<v8::Signature>, | 255 v8::Local<v8::Signature>, |
254 const MethodConfiguration*, | 256 const MethodConfiguration*, |
255 size_t methodCount); | 257 size_t methodCount); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 // Sets the class string of platform objects, interface prototype objects, | 294 // Sets the class string of platform objects, interface prototype objects, |
293 // etc. See also http://heycam.github.io/webidl/#dfn-class-string | 295 // etc. See also http://heycam.github.io/webidl/#dfn-class-string |
294 static void setClassString(v8::Isolate*, | 296 static void setClassString(v8::Isolate*, |
295 v8::Local<v8::ObjectTemplate>, | 297 v8::Local<v8::ObjectTemplate>, |
296 const char* classString); | 298 const char* classString); |
297 }; | 299 }; |
298 | 300 |
299 } // namespace blink | 301 } // namespace blink |
300 | 302 |
301 #endif // V8DOMConfiguration_h | 303 #endif // V8DOMConfiguration_h |
OLD | NEW |