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

Side by Side Diff: include/v8.h

Issue 22903012: js accessor creation on Template (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2959 matching lines...) Expand 10 before | Expand all | Expand 10 after
2970 2970
2971 /** 2971 /**
2972 * The superclass of object and function templates. 2972 * The superclass of object and function templates.
2973 */ 2973 */
2974 class V8_EXPORT Template : public Data { 2974 class V8_EXPORT Template : public Data {
2975 public: 2975 public:
2976 /** Adds a property to each instance created by this template.*/ 2976 /** Adds a property to each instance created by this template.*/
2977 void Set(Handle<String> name, Handle<Data> value, 2977 void Set(Handle<String> name, Handle<Data> value,
2978 PropertyAttribute attributes = None); 2978 PropertyAttribute attributes = None);
2979 V8_INLINE(void Set(const char* name, Handle<Data> value)); 2979 V8_INLINE(void Set(const char* name, Handle<Data> value));
2980
2981 void SetJsAccessor(
2982 Isolate* isolate,
2983 Local<String> name,
2984 Local<FunctionTemplate> getter = Local<FunctionTemplate>(),
2985 Local<FunctionTemplate> setter = Local<FunctionTemplate>(),
2986 AccessControl settings = DEFAULT,
2987 PropertyAttribute attribute = None);
2988
2980 private: 2989 private:
2981 Template(); 2990 Template();
2982 2991
2983 friend class ObjectTemplate; 2992 friend class ObjectTemplate;
2984 friend class FunctionTemplate; 2993 friend class FunctionTemplate;
2985 }; 2994 };
2986 2995
2987 2996
2988 template<typename T> 2997 template<typename T>
2989 class ReturnValue { 2998 class ReturnValue {
(...skipping 3596 matching lines...) Expand 10 before | Expand all | Expand 10 after
6586 */ 6595 */
6587 6596
6588 6597
6589 } // namespace v8 6598 } // namespace v8
6590 6599
6591 6600
6592 #undef TYPE_CHECK 6601 #undef TYPE_CHECK
6593 6602
6594 6603
6595 #endif // V8_H_ 6604 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698