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

Side by Side Diff: include/v8.h

Issue 1409593002: [api] expose API for adding per-context Intrinsics to Templates (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bot failure Created 5 years, 2 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 | src/api.cc » ('j') | no next file with comments »
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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** \mainpage V8 API Reference Guide 5 /** \mainpage V8 API Reference Guide
6 * 6 *
7 * V8 is Google's open source JavaScript engine. 7 * V8 is Google's open source JavaScript engine.
8 * 8 *
9 * This set of documents provides reference material generated from the 9 * This set of documents provides reference material generated from the
10 * V8 header file, include/v8.h. 10 * V8 header file, include/v8.h.
(...skipping 3990 matching lines...) Expand 10 before | Expand all | Expand 10 after
4001 class V8_EXPORT External : public Value { 4001 class V8_EXPORT External : public Value {
4002 public: 4002 public:
4003 static Local<External> New(Isolate* isolate, void* value); 4003 static Local<External> New(Isolate* isolate, void* value);
4004 V8_INLINE static External* Cast(Value* obj); 4004 V8_INLINE static External* Cast(Value* obj);
4005 void* Value() const; 4005 void* Value() const;
4006 private: 4006 private:
4007 static void CheckCast(v8::Value* obj); 4007 static void CheckCast(v8::Value* obj);
4008 }; 4008 };
4009 4009
4010 4010
4011 #define V8_INTRINSICS_LIST(F) F(ArrayProto_values, array_values_iterator)
4012
4013 enum Intrinsic {
4014 #define V8_DECL_INTRINSIC(name, iname) k##name,
4015 V8_INTRINSICS_LIST(V8_DECL_INTRINSIC)
4016 #undef V8_DECL_INTRINSIC
4017 };
4018
4019
4011 // --- Templates --- 4020 // --- Templates ---
4012 4021
4013 4022
4014 /** 4023 /**
4015 * The superclass of object and function templates. 4024 * The superclass of object and function templates.
4016 */ 4025 */
4017 class V8_EXPORT Template : public Data { 4026 class V8_EXPORT Template : public Data {
4018 public: 4027 public:
4019 /** Adds a property to each instance created by this template.*/ 4028 /** Adds a property to each instance created by this template.*/
4020 void Set(Local<Name> name, Local<Data> value, 4029 void Set(Local<Name> name, Local<Data> value,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
4070 Local<AccessorSignature> signature = Local<AccessorSignature>(), 4079 Local<AccessorSignature> signature = Local<AccessorSignature>(),
4071 AccessControl settings = DEFAULT); 4080 AccessControl settings = DEFAULT);
4072 void SetNativeDataProperty( 4081 void SetNativeDataProperty(
4073 Local<Name> name, AccessorNameGetterCallback getter, 4082 Local<Name> name, AccessorNameGetterCallback getter,
4074 AccessorNameSetterCallback setter = 0, 4083 AccessorNameSetterCallback setter = 0,
4075 // TODO(dcarney): gcc can't handle Local below 4084 // TODO(dcarney): gcc can't handle Local below
4076 Local<Value> data = Local<Value>(), PropertyAttribute attribute = None, 4085 Local<Value> data = Local<Value>(), PropertyAttribute attribute = None,
4077 Local<AccessorSignature> signature = Local<AccessorSignature>(), 4086 Local<AccessorSignature> signature = Local<AccessorSignature>(),
4078 AccessControl settings = DEFAULT); 4087 AccessControl settings = DEFAULT);
4079 4088
4089 /**
4090 * During template instantiation, sets the value with the intrinsic property
4091 * from the correct context.
4092 */
4093 void SetIntrinsicDataProperty(Local<Name> name, Intrinsic intrinsic,
4094 PropertyAttribute attribute = None);
4095
4080 private: 4096 private:
4081 Template(); 4097 Template();
4082 4098
4083 friend class ObjectTemplate; 4099 friend class ObjectTemplate;
4084 friend class FunctionTemplate; 4100 friend class FunctionTemplate;
4085 }; 4101 };
4086 4102
4087 4103
4088 /** 4104 /**
4089 * NamedProperty[Getter|Setter] are used as interceptors on object. 4105 * NamedProperty[Getter|Setter] are used as interceptors on object.
(...skipping 4278 matching lines...) Expand 10 before | Expand all | Expand 10 after
8368 */ 8384 */
8369 8385
8370 8386
8371 } // namespace v8 8387 } // namespace v8
8372 8388
8373 8389
8374 #undef TYPE_CHECK 8390 #undef TYPE_CHECK
8375 8391
8376 8392
8377 #endif // V8_H_ 8393 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698