Chromium Code Reviews| Index: Source/bindings/core/v8/V8DOMConfiguration.cpp |
| diff --git a/Source/bindings/core/v8/V8DOMConfiguration.cpp b/Source/bindings/core/v8/V8DOMConfiguration.cpp |
| index b15b9869d3633a94af91e4294075c2b384efa07d..6b2164af6e4f362dd45e2c6b5c20c4a9ec8709b3 100644 |
| --- a/Source/bindings/core/v8/V8DOMConfiguration.cpp |
| +++ b/Source/bindings/core/v8/V8DOMConfiguration.cpp |
| @@ -101,6 +101,13 @@ void V8DOMConfiguration::installConstants(v8::Handle<v8::FunctionTemplate> funct |
| } |
| } |
| +void V8DOMConfiguration::installConstant(v8::Handle<v8::FunctionTemplate> functionDescriptor, v8::Handle<v8::ObjectTemplate> prototype, const char* name, v8::AccessorGetterCallback getter, v8::Isolate* isolate) |
|
haraken
2014/09/23 07:52:28
Would you add a comment about why installConstant
Jens Widell
2014/09/23 09:07:32
Comment added.
|
| +{ |
| + v8::Handle<v8::String> constantName = v8AtomicString(isolate, name); |
| + functionDescriptor->SetNativeDataProperty(constantName, getter, 0, v8::Handle<v8::Value>(), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete)); |
| + prototype->SetNativeDataProperty(constantName, getter, 0, v8::Handle<v8::Value>(), static_cast<v8::PropertyAttribute>(v8::ReadOnly | v8::DontDelete)); |
| +} |
| + |
| void V8DOMConfiguration::installMethods(v8::Handle<v8::ObjectTemplate> prototype, v8::Handle<v8::Signature> signature, v8::PropertyAttribute attributes, const MethodConfiguration* callbacks, size_t callbackCount, v8::Isolate* isolate) |
| { |
| for (size_t i = 0; i < callbackCount; ++i) |