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

Side by Side Diff: include/v8.h

Issue 1474353002: Remove easy to remove calls to Isolate::Current() from api.cc (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: update Created 5 years 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 | include/v8-testing.h » ('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 3914 matching lines...) Expand 10 before | Expand all | Expand 10 after
3925 private: 3925 private:
3926 static void CheckCast(v8::Value* obj); 3926 static void CheckCast(v8::Value* obj);
3927 }; 3927 };
3928 3928
3929 3929
3930 /** 3930 /**
3931 * A Boolean object (ECMA-262, 4.3.15). 3931 * A Boolean object (ECMA-262, 4.3.15).
3932 */ 3932 */
3933 class V8_EXPORT BooleanObject : public Object { 3933 class V8_EXPORT BooleanObject : public Object {
3934 public: 3934 public:
3935 static Local<Value> New(bool value); 3935 static Local<Value> New(Isolate* isolate, bool value);
3936 V8_DEPRECATE_SOON("Pass an isolate", static Local<Value> New(bool value));
3936 3937
3937 bool ValueOf() const; 3938 bool ValueOf() const;
3938 3939
3939 V8_INLINE static BooleanObject* Cast(v8::Value* obj); 3940 V8_INLINE static BooleanObject* Cast(v8::Value* obj);
3940 3941
3941 private: 3942 private:
3942 static void CheckCast(v8::Value* obj); 3943 static void CheckCast(v8::Value* obj);
3943 }; 3944 };
3944 3945
3945 3946
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
4576 * 4577 *
4577 * Properties added to an ObjectTemplate are added to each object 4578 * Properties added to an ObjectTemplate are added to each object
4578 * created from the ObjectTemplate. 4579 * created from the ObjectTemplate.
4579 */ 4580 */
4580 class V8_EXPORT ObjectTemplate : public Template { 4581 class V8_EXPORT ObjectTemplate : public Template {
4581 public: 4582 public:
4582 /** Creates an ObjectTemplate. */ 4583 /** Creates an ObjectTemplate. */
4583 static Local<ObjectTemplate> New( 4584 static Local<ObjectTemplate> New(
4584 Isolate* isolate, 4585 Isolate* isolate,
4585 Local<FunctionTemplate> constructor = Local<FunctionTemplate>()); 4586 Local<FunctionTemplate> constructor = Local<FunctionTemplate>());
4586 static V8_DEPRECATE_SOON("Use isolate version", Local<ObjectTemplate> New()); 4587 static V8_DEPRECATED("Use isolate version", Local<ObjectTemplate> New());
4587 4588
4588 /** Creates a new instance of this template.*/ 4589 /** Creates a new instance of this template.*/
4589 V8_DEPRECATE_SOON("Use maybe version", Local<Object> NewInstance()); 4590 V8_DEPRECATE_SOON("Use maybe version", Local<Object> NewInstance());
4590 V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(Local<Context> context); 4591 V8_WARN_UNUSED_RESULT MaybeLocal<Object> NewInstance(Local<Context> context);
4591 4592
4592 /** 4593 /**
4593 * Sets an accessor on the object template. 4594 * Sets an accessor on the object template.
4594 * 4595 *
4595 * Whenever the property with the given name is accessed on objects 4596 * Whenever the property with the given name is accessed on objects
4596 * created from this ObjectTemplate the getter and setter callbacks 4597 * created from this ObjectTemplate the getter and setter callbacks
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
4764 public: 4765 public:
4765 static Local<AccessorSignature> New( 4766 static Local<AccessorSignature> New(
4766 Isolate* isolate, 4767 Isolate* isolate,
4767 Local<FunctionTemplate> receiver = Local<FunctionTemplate>()); 4768 Local<FunctionTemplate> receiver = Local<FunctionTemplate>());
4768 4769
4769 private: 4770 private:
4770 AccessorSignature(); 4771 AccessorSignature();
4771 }; 4772 };
4772 4773
4773 4774
4774 /**
4775 * A utility for determining the type of objects based on the template
4776 * they were constructed from.
4777 */
4778 class V8_EXPORT TypeSwitch : public Data {
4779 public:
4780 static Local<TypeSwitch> New(Local<FunctionTemplate> type);
ulan 2016/03/04 16:01:02 This was removed without any deprecation notice. W
jochen (gone - plz use gerrit) 2016/03/04 16:08:41 I did a search and didn't find any users of it. I
4781 static Local<TypeSwitch> New(int argc, Local<FunctionTemplate> types[]);
4782 int match(Local<Value> value);
4783
4784 private:
4785 TypeSwitch();
4786 };
4787
4788
4789 // --- Extensions --- 4775 // --- Extensions ---
4790 4776
4791 class V8_EXPORT ExternalOneByteStringResourceImpl 4777 class V8_EXPORT ExternalOneByteStringResourceImpl
4792 : public String::ExternalOneByteStringResource { 4778 : public String::ExternalOneByteStringResource {
4793 public: 4779 public:
4794 ExternalOneByteStringResourceImpl() : data_(0), length_(0) {} 4780 ExternalOneByteStringResourceImpl() : data_(0), length_(0) {}
4795 ExternalOneByteStringResourceImpl(const char* data, size_t length) 4781 ExternalOneByteStringResourceImpl(const char* data, size_t length)
4796 : data_(data), length_(length) {} 4782 : data_(data), length_(length) {}
4797 const char* data() const { return data_; } 4783 const char* data() const { return data_; }
4798 size_t length() const { return length_; } 4784 size_t length() const { return length_; }
(...skipping 1373 matching lines...) Expand 10 before | Expand all | Expand 10 after
6172 /** 6158 /**
6173 * Enables the host application to receive a notification before a 6159 * Enables the host application to receive a notification before a
6174 * garbage collection. Allocations are not allowed in the 6160 * garbage collection. Allocations are not allowed in the
6175 * callback function, you therefore cannot manipulate objects (set 6161 * callback function, you therefore cannot manipulate objects (set
6176 * or delete properties for example) since it is possible such 6162 * or delete properties for example) since it is possible such
6177 * operations will result in the allocation of objects. It is possible 6163 * operations will result in the allocation of objects. It is possible
6178 * to specify the GCType filter for your callback. But it is not possible to 6164 * to specify the GCType filter for your callback. But it is not possible to
6179 * register the same callback function two times with different 6165 * register the same callback function two times with different
6180 * GCType filters. 6166 * GCType filters.
6181 */ 6167 */
6182 static V8_DEPRECATE_SOON( 6168 static V8_DEPRECATED(
6183 "Use isolate version", 6169 "Use isolate version",
6184 void AddGCPrologueCallback(GCCallback callback, 6170 void AddGCPrologueCallback(GCCallback callback,
6185 GCType gc_type_filter = kGCTypeAll)); 6171 GCType gc_type_filter = kGCTypeAll));
6186 6172
6187 /** 6173 /**
6188 * This function removes callback which was installed by 6174 * This function removes callback which was installed by
6189 * AddGCPrologueCallback function. 6175 * AddGCPrologueCallback function.
6190 */ 6176 */
6191 V8_INLINE static V8_DEPRECATE_SOON( 6177 V8_INLINE static V8_DEPRECATED(
6192 "Use isolate version", 6178 "Use isolate version",
6193 void RemoveGCPrologueCallback(GCCallback callback)); 6179 void RemoveGCPrologueCallback(GCCallback callback));
6194 6180
6195 /** 6181 /**
6196 * Enables the host application to receive a notification after a 6182 * Enables the host application to receive a notification after a
6197 * garbage collection. Allocations are not allowed in the 6183 * garbage collection. Allocations are not allowed in the
6198 * callback function, you therefore cannot manipulate objects (set 6184 * callback function, you therefore cannot manipulate objects (set
6199 * or delete properties for example) since it is possible such 6185 * or delete properties for example) since it is possible such
6200 * operations will result in the allocation of objects. It is possible 6186 * operations will result in the allocation of objects. It is possible
6201 * to specify the GCType filter for your callback. But it is not possible to 6187 * to specify the GCType filter for your callback. But it is not possible to
6202 * register the same callback function two times with different 6188 * register the same callback function two times with different
6203 * GCType filters. 6189 * GCType filters.
6204 */ 6190 */
6205 static V8_DEPRECATE_SOON( 6191 static V8_DEPRECATED(
6206 "Use isolate version", 6192 "Use isolate version",
6207 void AddGCEpilogueCallback(GCCallback callback, 6193 void AddGCEpilogueCallback(GCCallback callback,
6208 GCType gc_type_filter = kGCTypeAll)); 6194 GCType gc_type_filter = kGCTypeAll));
6209 6195
6210 /** 6196 /**
6211 * This function removes callback which was installed by 6197 * This function removes callback which was installed by
6212 * AddGCEpilogueCallback function. 6198 * AddGCEpilogueCallback function.
6213 */ 6199 */
6214 V8_INLINE static V8_DEPRECATE_SOON( 6200 V8_INLINE static V8_DEPRECATED(
6215 "Use isolate version", 6201 "Use isolate version",
6216 void RemoveGCEpilogueCallback(GCCallback callback)); 6202 void RemoveGCEpilogueCallback(GCCallback callback));
6217 6203
6218 /** 6204 /**
6219 * Enables the host application to provide a mechanism to be notified 6205 * Enables the host application to provide a mechanism to be notified
6220 * and perform custom logging when V8 Allocates Executable Memory. 6206 * and perform custom logging when V8 Allocates Executable Memory.
6221 */ 6207 */
6222 V8_INLINE static V8_DEPRECATE_SOON( 6208 V8_INLINE static V8_DEPRECATE_SOON(
6223 "Use isolate version", 6209 "Use isolate version",
6224 void AddMemoryAllocationCallback(MemoryAllocationCallback callback, 6210 void AddMemoryAllocationCallback(MemoryAllocationCallback callback,
(...skipping 2256 matching lines...) Expand 10 before | Expand all | Expand 10 after
8481 */ 8467 */
8482 8468
8483 8469
8484 } // namespace v8 8470 } // namespace v8
8485 8471
8486 8472
8487 #undef TYPE_CHECK 8473 #undef TYPE_CHECK
8488 8474
8489 8475
8490 #endif // V8_H_ 8476 #endif // V8_H_
OLDNEW
« no previous file with comments | « no previous file | include/v8-testing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698