Chromium Code Reviews| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 56 OnInstance = 1 << 0, | 56 OnInstance = 1 << 0, |
| 57 OnPrototype = 1 << 1, | 57 OnPrototype = 1 << 1, |
| 58 OnInterface = 1 << 2, | 58 OnInterface = 1 << 2, |
| 59 }; | 59 }; |
| 60 | 60 |
| 61 enum HolderCheckConfiguration { | 61 enum HolderCheckConfiguration { |
| 62 CheckHolder, | 62 CheckHolder, |
| 63 DoNotCheckHolder, | 63 DoNotCheckHolder, |
| 64 }; | 64 }; |
| 65 | 65 |
| 66 typedef v8::experimental::FastAccessorBuilder* (*FastAccessorBuilderCallback)( | |
|
haraken
2016/10/20 08:22:23
Is this typedef needed?
vogelheim
2016/10/20 13:27:59
Removed.
(That was a leftover from dis-entagling
| |
| 67 v8::Isolate*, | |
| 68 v8::FunctionCallback); // Default (slow) callback. | |
| 69 | |
| 70 typedef v8::Local<v8::Private> (*CachedAccessorCallback)(v8::Isolate*); | |
| 71 | |
| 66 // AttributeConfiguration translates into calls to SetNativeDataProperty() on | 72 // AttributeConfiguration translates into calls to SetNativeDataProperty() on |
| 67 // either the instance or the prototype ObjectTemplate, based on | 73 // either the instance or the prototype ObjectTemplate, based on |
| 68 // |instanceOrPrototypeConfiguration|. | 74 // |instanceOrPrototypeConfiguration|. |
| 69 struct AttributeConfiguration { | 75 struct AttributeConfiguration { |
| 70 AttributeConfiguration& operator=(const AttributeConfiguration&) = delete; | 76 AttributeConfiguration& operator=(const AttributeConfiguration&) = delete; |
| 71 DISALLOW_NEW(); | 77 DISALLOW_NEW(); |
| 72 const char* const name; | 78 const char* const name; |
| 73 v8::AccessorNameGetterCallback getter; | 79 v8::AccessorNameGetterCallback getter; |
| 74 v8::AccessorNameSetterCallback setter; | 80 v8::AccessorNameSetterCallback setter; |
| 75 v8::AccessorNameGetterCallback getterForMainWorld; | 81 v8::AccessorNameGetterCallback getterForMainWorld; |
| 76 v8::AccessorNameSetterCallback setterForMainWorld; | 82 v8::AccessorNameSetterCallback setterForMainWorld; |
| 83 // TODO(peterssen|vogelheim): This has to be removed too since it's only | |
|
haraken
2016/10/20 08:22:23
Remove peterssen (unless he has a plan to work on
vogelheim
2016/10/20 13:27:59
Done.
| |
| 84 // used in accessors. | |
| 85 CachedAccessorCallback cachedAccessorCallback; // The accessor's 'result' | |
|
haraken
2016/10/20 08:22:23
Move up the comment.
vogelheim
2016/10/20 13:27:59
Done.
| |
| 86 // is stored in a private | |
| 87 // property. | |
| 77 const WrapperTypeInfo* data; | 88 const WrapperTypeInfo* data; |
| 78 unsigned settings : 8; // v8::AccessControl | 89 unsigned settings : 8; // v8::AccessControl |
| 79 unsigned attribute : 8; // v8::PropertyAttribute | 90 unsigned attribute : 8; // v8::PropertyAttribute |
| 80 unsigned exposeConfiguration : 1; // ExposeConfiguration | 91 unsigned exposeConfiguration : 1; // ExposeConfiguration |
| 81 unsigned | 92 unsigned |
| 82 propertyLocationConfiguration : 3; // PropertyLocationConfiguration | 93 propertyLocationConfiguration : 3; // PropertyLocationConfiguration |
| 83 unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration | 94 unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration |
| 84 }; | 95 }; |
| 85 | 96 |
| 86 static void installAttributes(v8::Isolate*, | 97 static void installAttributes(v8::Isolate*, |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 105 // AccessorConfiguration translates into calls to SetAccessorProperty() | 116 // AccessorConfiguration translates into calls to SetAccessorProperty() |
| 106 // on prototype ObjectTemplate. | 117 // on prototype ObjectTemplate. |
| 107 struct AccessorConfiguration { | 118 struct AccessorConfiguration { |
| 108 AccessorConfiguration& operator=(const AccessorConfiguration&) = delete; | 119 AccessorConfiguration& operator=(const AccessorConfiguration&) = delete; |
| 109 DISALLOW_NEW(); | 120 DISALLOW_NEW(); |
| 110 const char* const name; | 121 const char* const name; |
| 111 v8::FunctionCallback getter; | 122 v8::FunctionCallback getter; |
| 112 v8::FunctionCallback setter; | 123 v8::FunctionCallback setter; |
| 113 v8::FunctionCallback getterForMainWorld; | 124 v8::FunctionCallback getterForMainWorld; |
| 114 v8::FunctionCallback setterForMainWorld; | 125 v8::FunctionCallback setterForMainWorld; |
| 126 CachedAccessorCallback cachedAccessorCallback; // The accessor's 'result' | |
|
haraken
2016/10/20 08:22:23
Ditto.
vogelheim
2016/10/20 13:27:59
Done.
| |
| 127 // is stored in a private | |
| 128 // property. | |
| 115 const WrapperTypeInfo* data; | 129 const WrapperTypeInfo* data; |
| 116 unsigned settings : 8; // v8::AccessControl | 130 unsigned settings : 8; // v8::AccessControl |
| 117 unsigned attribute : 8; // v8::PropertyAttribute | 131 unsigned attribute : 8; // v8::PropertyAttribute |
| 118 unsigned exposeConfiguration : 1; // ExposeConfiguration | 132 unsigned exposeConfiguration : 1; // ExposeConfiguration |
| 119 unsigned | 133 unsigned |
| 120 propertyLocationConfiguration : 3; // PropertyLocationConfiguration | 134 propertyLocationConfiguration : 3; // PropertyLocationConfiguration |
| 121 unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration | 135 unsigned holderCheckConfiguration : 1; // HolderCheckConfiguration |
| 122 }; | 136 }; |
| 123 | 137 |
| 124 static void installAccessors( | 138 static void installAccessors( |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 292 // Sets the class string of platform objects, interface prototype objects, | 306 // Sets the class string of platform objects, interface prototype objects, |
| 293 // etc. See also http://heycam.github.io/webidl/#dfn-class-string | 307 // etc. See also http://heycam.github.io/webidl/#dfn-class-string |
| 294 static void setClassString(v8::Isolate*, | 308 static void setClassString(v8::Isolate*, |
| 295 v8::Local<v8::ObjectTemplate>, | 309 v8::Local<v8::ObjectTemplate>, |
| 296 const char* classString); | 310 const char* classString); |
| 297 }; | 311 }; |
| 298 | 312 |
| 299 } // namespace blink | 313 } // namespace blink |
| 300 | 314 |
| 301 #endif // V8DOMConfiguration_h | 315 #endif // V8DOMConfiguration_h |
| OLD | NEW |