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

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: 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') | src/profiler/heap-snapshot-generator.h » ('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 // 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);
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 3682 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') | src/profiler/heap-snapshot-generator.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698