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

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

Issue 2768393004: [Bindings] Rename CachedAccessorCallback method in generated code (Closed)
Patch Set: . Created 3 years, 9 months 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/V8DOMConfiguration.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) 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 DoNotCheckAccess, 65 DoNotCheckAccess,
66 }; 66 };
67 67
68 // Bit field to select which worlds the member will be defined in. 68 // Bit field to select which worlds the member will be defined in.
69 enum WorldConfiguration : unsigned { 69 enum WorldConfiguration : unsigned {
70 MainWorld = 1 << 0, 70 MainWorld = 1 << 0,
71 NonMainWorlds = 1 << 1, 71 NonMainWorlds = 1 << 1,
72 AllWorlds = MainWorld | NonMainWorlds, 72 AllWorlds = MainWorld | NonMainWorlds,
73 }; 73 };
74 74
75 typedef v8::Local<v8::Private> (*CachedAccessorCallback)(v8::Isolate*); 75 typedef v8::Local<v8::Private> (*CachedPropertyKey)(v8::Isolate*);
76 76
77 // AttributeConfiguration translates into calls to SetNativeDataProperty() on 77 // AttributeConfiguration translates into calls to SetNativeDataProperty() on
78 // either the instance or the prototype ObjectTemplate, based on 78 // either the instance or the prototype ObjectTemplate, based on
79 // |propertyLocationConfiguration|. 79 // |propertyLocationConfiguration|.
80 struct AttributeConfiguration { 80 struct AttributeConfiguration {
81 AttributeConfiguration& operator=(const AttributeConfiguration&) = delete; 81 AttributeConfiguration& operator=(const AttributeConfiguration&) = delete;
82 DISALLOW_NEW(); 82 DISALLOW_NEW();
83 const char* const name; 83 const char* const name;
84 v8::AccessorNameGetterCallback getter; 84 v8::AccessorNameGetterCallback getter;
85 v8::AccessorNameSetterCallback setter; 85 v8::AccessorNameSetterCallback setter;
86 // TODO(vogelheim): This has to be removed too since it's only used in 86 // TODO(vogelheim): This has to be removed too since it's only used in
87 // accessors. 87 // accessors.
88 // The accessor's 'result' is stored in a private property. 88 // The accessor's 'result' is stored in a private property.
89 CachedAccessorCallback cachedAccessorCallback; 89 CachedPropertyKey cachedPropertyKey;
90 const WrapperTypeInfo* data; 90 const WrapperTypeInfo* data;
91 // v8::PropertyAttribute 91 // v8::PropertyAttribute
92 unsigned attribute : 8; 92 unsigned attribute : 8;
93 // PropertyLocationConfiguration 93 // PropertyLocationConfiguration
94 unsigned propertyLocationConfiguration : 3; 94 unsigned propertyLocationConfiguration : 3;
95 // HolderCheckConfiguration 95 // HolderCheckConfiguration
96 unsigned holderCheckConfiguration : 1; 96 unsigned holderCheckConfiguration : 1;
97 // WorldConfiguration 97 // WorldConfiguration
98 unsigned worldConfiguration : 2; 98 unsigned worldConfiguration : 2;
99 }; 99 };
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 133
134 // AccessorConfiguration translates into calls to SetAccessorProperty() 134 // AccessorConfiguration translates into calls to SetAccessorProperty()
135 // on prototype ObjectTemplate. 135 // on prototype ObjectTemplate.
136 struct AccessorConfiguration { 136 struct AccessorConfiguration {
137 AccessorConfiguration& operator=(const AccessorConfiguration&) = delete; 137 AccessorConfiguration& operator=(const AccessorConfiguration&) = delete;
138 DISALLOW_NEW(); 138 DISALLOW_NEW();
139 const char* const name; 139 const char* const name;
140 v8::FunctionCallback getter; 140 v8::FunctionCallback getter;
141 v8::FunctionCallback setter; 141 v8::FunctionCallback setter;
142 // The accessor's 'result' is stored in a private property. 142 // The accessor's 'result' is stored in a private property.
143 CachedAccessorCallback cachedAccessorCallback; 143 CachedPropertyKey cachedPropertyKey;
144 const WrapperTypeInfo* data; 144 const WrapperTypeInfo* data;
145 // v8::PropertyAttribute 145 // v8::PropertyAttribute
146 unsigned attribute : 8; 146 unsigned attribute : 8;
147 // PropertyLocationConfiguration 147 // PropertyLocationConfiguration
148 unsigned propertyLocationConfiguration : 3; 148 unsigned propertyLocationConfiguration : 3;
149 // HolderCheckConfiguration 149 // HolderCheckConfiguration
150 unsigned holderCheckConfiguration : 1; 150 unsigned holderCheckConfiguration : 1;
151 // WorldConfiguration 151 // WorldConfiguration
152 unsigned worldConfiguration : 2; 152 unsigned worldConfiguration : 2;
153 }; 153 };
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 // Sets the class string of platform objects, interface prototype objects, 325 // Sets the class string of platform objects, interface prototype objects,
326 // etc. See also http://heycam.github.io/webidl/#dfn-class-string 326 // etc. See also http://heycam.github.io/webidl/#dfn-class-string
327 static void setClassString(v8::Isolate*, 327 static void setClassString(v8::Isolate*,
328 v8::Local<v8::ObjectTemplate>, 328 v8::Local<v8::ObjectTemplate>,
329 const char* classString); 329 const char* classString);
330 }; 330 };
331 331
332 } // namespace blink 332 } // namespace blink
333 333
334 #endif // V8DOMConfiguration_h 334 #endif // V8DOMConfiguration_h
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/V8DOMConfiguration.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698