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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 } | 237 } |
238 | 238 |
239 const char* const name; | 239 const char* const name; |
240 v8::FunctionCallback callback; | 240 v8::FunctionCallback callback; |
241 v8::FunctionCallback callbackForMainWorld; | 241 v8::FunctionCallback callbackForMainWorld; |
242 int length; | 242 int length; |
243 unsigned attribute : 8; // v8::PropertyAttribute | 243 unsigned attribute : 8; // v8::PropertyAttribute |
244 unsigned exposeConfiguration : 1; // ExposeConfiguration | 244 unsigned exposeConfiguration : 1; // ExposeConfiguration |
245 unsigned | 245 unsigned |
246 propertyLocationConfiguration : 3; // PropertyLocationConfiguration | 246 propertyLocationConfiguration : 3; // PropertyLocationConfiguration |
| 247 unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration |
247 }; | 248 }; |
248 | 249 |
249 struct SymbolKeyedMethodConfiguration { | 250 struct SymbolKeyedMethodConfiguration { |
250 SymbolKeyedMethodConfiguration& operator=( | 251 SymbolKeyedMethodConfiguration& operator=( |
251 const SymbolKeyedMethodConfiguration&) = delete; | 252 const SymbolKeyedMethodConfiguration&) = delete; |
252 DISALLOW_NEW(); | 253 DISALLOW_NEW(); |
253 v8::Local<v8::Name> methodName(v8::Isolate* isolate) const { | 254 v8::Local<v8::Name> methodName(v8::Isolate* isolate) const { |
254 return getSymbol(isolate); | 255 return getSymbol(isolate); |
255 } | 256 } |
256 v8::FunctionCallback callbackForWorld(const DOMWrapperWorld&) const { | 257 v8::FunctionCallback callbackForWorld(const DOMWrapperWorld&) const { |
257 return callback; | 258 return callback; |
258 } | 259 } |
259 | 260 |
260 v8::Local<v8::Symbol> (*getSymbol)(v8::Isolate*); | 261 v8::Local<v8::Symbol> (*getSymbol)(v8::Isolate*); |
261 v8::FunctionCallback callback; | 262 v8::FunctionCallback callback; |
262 // SymbolKeyedMethodConfiguration doesn't support per-world bindings. | 263 // SymbolKeyedMethodConfiguration doesn't support per-world bindings. |
263 int length; | 264 int length; |
264 unsigned attribute : 8; // v8::PropertyAttribute | 265 unsigned attribute : 8; // v8::PropertyAttribute |
265 unsigned exposeConfiguration : 1; // ExposeConfiguration | 266 unsigned exposeConfiguration : 1; // ExposeConfiguration |
266 unsigned | 267 unsigned |
267 propertyLocationConfiguration : 3; // PropertyLocationConfiguration | 268 propertyLocationConfiguration : 3; // PropertyLocationConfiguration |
| 269 unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration |
268 }; | 270 }; |
269 | 271 |
270 static void installMethods(v8::Isolate*, | 272 static void installMethods(v8::Isolate*, |
271 const DOMWrapperWorld&, | 273 const DOMWrapperWorld&, |
272 v8::Local<v8::ObjectTemplate> instanceTemplate, | 274 v8::Local<v8::ObjectTemplate> instanceTemplate, |
273 v8::Local<v8::ObjectTemplate> prototypeTemplate, | 275 v8::Local<v8::ObjectTemplate> prototypeTemplate, |
274 v8::Local<v8::FunctionTemplate> interfaceTemplate, | 276 v8::Local<v8::FunctionTemplate> interfaceTemplate, |
275 v8::Local<v8::Signature>, | 277 v8::Local<v8::Signature>, |
276 const MethodConfiguration*, | 278 const MethodConfiguration*, |
277 size_t methodCount); | 279 size_t methodCount); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 // Sets the class string of platform objects, interface prototype objects, | 316 // Sets the class string of platform objects, interface prototype objects, |
315 // etc. See also http://heycam.github.io/webidl/#dfn-class-string | 317 // etc. See also http://heycam.github.io/webidl/#dfn-class-string |
316 static void setClassString(v8::Isolate*, | 318 static void setClassString(v8::Isolate*, |
317 v8::Local<v8::ObjectTemplate>, | 319 v8::Local<v8::ObjectTemplate>, |
318 const char* classString); | 320 const char* classString); |
319 }; | 321 }; |
320 | 322 |
321 } // namespace blink | 323 } // namespace blink |
322 | 324 |
323 #endif // V8DOMConfiguration_h | 325 #endif // V8DOMConfiguration_h |
OLD | NEW |