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

Side by Side Diff: include/v8.h

Issue 669373002: pass isolate to Value::To* functions (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebase Created 6 years, 1 month 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') | 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 1685 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 * This is an experimental feature. 1696 * This is an experimental feature.
1697 */ 1697 */
1698 bool IsFloat64Array() const; 1698 bool IsFloat64Array() const;
1699 1699
1700 /** 1700 /**
1701 * Returns true if this value is a DataView. 1701 * Returns true if this value is a DataView.
1702 * This is an experimental feature. 1702 * This is an experimental feature.
1703 */ 1703 */
1704 bool IsDataView() const; 1704 bool IsDataView() const;
1705 1705
1706 Local<Boolean> ToBoolean() const; 1706 Local<Boolean> ToBoolean(Isolate* isolate) const;
1707 Local<Number> ToNumber() const; 1707 Local<Number> ToNumber(Isolate* isolate) const;
1708 Local<String> ToString() const; 1708 Local<String> ToString(Isolate* isolate) const;
1709 Local<String> ToDetailString() const; 1709 Local<String> ToDetailString(Isolate* isolate) const;
1710 Local<Object> ToObject() const; 1710 Local<Object> ToObject(Isolate* isolate) const;
1711 Local<Integer> ToInteger() const; 1711 Local<Integer> ToInteger(Isolate* isolate) const;
1712 Local<Uint32> ToUint32() const; 1712 Local<Uint32> ToUint32(Isolate* isolate) const;
1713 Local<Int32> ToInt32() const; 1713 Local<Int32> ToInt32(Isolate* isolate) const;
1714
1715 // TODO(dcarney): deprecate all these.
1716 inline Local<Boolean> ToBoolean() const;
1717 inline Local<Number> ToNumber() const;
1718 inline Local<String> ToString() const;
1719 inline Local<String> ToDetailString() const;
1720 inline Local<Object> ToObject() const;
1721 inline Local<Integer> ToInteger() const;
1722 inline Local<Uint32> ToUint32() const;
1723 inline Local<Int32> ToInt32() const;
1714 1724
1715 /** 1725 /**
1716 * Attempts to convert a string to an array index. 1726 * Attempts to convert a string to an array index.
1717 * Returns an empty handle if the conversion fails. 1727 * Returns an empty handle if the conversion fails.
1718 */ 1728 */
1719 Local<Uint32> ToArrayIndex() const; 1729 Local<Uint32> ToArrayIndex() const;
1720 1730
1721 bool BooleanValue() const; 1731 bool BooleanValue() const;
1722 double NumberValue() const; 1732 double NumberValue() const;
1723 int64_t IntegerValue() const; 1733 int64_t IntegerValue() const;
(...skipping 4907 matching lines...) Expand 10 before | Expand all | Expand 10 after
6631 if (!I::HasHeapObjectTag(obj)) return false; 6641 if (!I::HasHeapObjectTag(obj)) return false;
6632 return (I::GetInstanceType(obj) < I::kFirstNonstringType); 6642 return (I::GetInstanceType(obj) < I::kFirstNonstringType);
6633 } 6643 }
6634 6644
6635 6645
6636 template <class T> Value* Value::Cast(T* value) { 6646 template <class T> Value* Value::Cast(T* value) {
6637 return static_cast<Value*>(value); 6647 return static_cast<Value*>(value);
6638 } 6648 }
6639 6649
6640 6650
6651 Local<Boolean> Value::ToBoolean() const {
6652 return ToBoolean(Isolate::GetCurrent());
6653 }
6654
6655
6656 Local<Number> Value::ToNumber() const {
6657 return ToNumber(Isolate::GetCurrent());
6658 }
6659
6660
6661 Local<String> Value::ToString() const {
6662 return ToString(Isolate::GetCurrent());
6663 }
6664
6665
6666 Local<String> Value::ToDetailString() const {
6667 return ToDetailString(Isolate::GetCurrent());
6668 }
6669
6670
6671 Local<Object> Value::ToObject() const {
6672 return ToObject(Isolate::GetCurrent());
6673 }
6674
6675
6676 Local<Integer> Value::ToInteger() const {
6677 return ToInteger(Isolate::GetCurrent());
6678 }
6679
6680
6681 Local<Uint32> Value::ToUint32() const {
6682 return ToUint32(Isolate::GetCurrent());
6683 }
6684
6685
6686 Local<Int32> Value::ToInt32() const { return ToInt32(Isolate::GetCurrent()); }
6687
6688
6641 Name* Name::Cast(v8::Value* value) { 6689 Name* Name::Cast(v8::Value* value) {
6642 #ifdef V8_ENABLE_CHECKS 6690 #ifdef V8_ENABLE_CHECKS
6643 CheckCast(value); 6691 CheckCast(value);
6644 #endif 6692 #endif
6645 return static_cast<Name*>(value); 6693 return static_cast<Name*>(value);
6646 } 6694 }
6647 6695
6648 6696
6649 Symbol* Symbol::Cast(v8::Value* value) { 6697 Symbol* Symbol::Cast(v8::Value* value) {
6650 #ifdef V8_ENABLE_CHECKS 6698 #ifdef V8_ENABLE_CHECKS
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
7040 */ 7088 */
7041 7089
7042 7090
7043 } // namespace v8 7091 } // namespace v8
7044 7092
7045 7093
7046 #undef TYPE_CHECK 7094 #undef TYPE_CHECK
7047 7095
7048 7096
7049 #endif // V8_H_ 7097 #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