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

Unified Diff: include/v8.h

Issue 149413010: A64: Synchronize with r16024. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/toolchain.gypi ('k') | src/a64/builtins-a64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index 36077402a287046e84cf5f4dc8c1d6bd120a3ab3..11fccdf023999ff3c3a8acf425c669be29cae54c 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -942,17 +942,21 @@ class ScriptOrigin {
V8_INLINE(ScriptOrigin(
Handle<Value> resource_name,
Handle<Integer> resource_line_offset = Handle<Integer>(),
- Handle<Integer> resource_column_offset = Handle<Integer>()))
+ Handle<Integer> resource_column_offset = Handle<Integer>(),
+ Handle<Boolean> resource_is_shared_cross_origin = Handle<Boolean>()))
: resource_name_(resource_name),
resource_line_offset_(resource_line_offset),
- resource_column_offset_(resource_column_offset) { }
+ resource_column_offset_(resource_column_offset),
+ resource_is_shared_cross_origin_(resource_is_shared_cross_origin) { }
V8_INLINE(Handle<Value> ResourceName() const);
V8_INLINE(Handle<Integer> ResourceLineOffset() const);
V8_INLINE(Handle<Integer> ResourceColumnOffset() const);
+ V8_INLINE(Handle<Boolean> ResourceIsSharedCrossOrigin() const);
private:
Handle<Value> resource_name_;
Handle<Integer> resource_line_offset_;
Handle<Integer> resource_column_offset_;
+ Handle<Boolean> resource_is_shared_cross_origin_;
};
@@ -1130,6 +1134,12 @@ class V8EXPORT Message {
*/
int GetEndColumn() const;
+ /**
+ * Passes on the value set by the embedder when it fed the script from which
+ * this Message was generated to V8.
+ */
+ bool IsSharedCrossOrigin() const;
+
// TODO(1245381): Print to a string instead of on a FILE.
static void PrintCurrentStackTrace(FILE* out);
@@ -2400,8 +2410,20 @@ class V8EXPORT ArrayBuffer : public Object {
/**
* Allocate |length| bytes. Return NULL if allocation is not successful.
+ * Memory should be initialized to zeroes.
*/
virtual void* Allocate(size_t length) = 0;
+
+ /**
+ * Allocate |length| bytes. Return NULL if allocation is not successful.
+ * Memory does not have to be initialized.
+ */
+ virtual void* AllocateUninitialized(size_t length) {
+ // Override with call to |Allocate| for compatibility
+ // with legacy version.
+ return Allocate(length);
+ }
+
/**
* Free the memory pointed to |data|. That memory is guaranteed to be
* previously allocated by |Allocate|.
@@ -2719,11 +2741,15 @@ class V8EXPORT Date : public Object {
public:
static Local<Value> New(double time);
+ // Deprecated, use Date::ValueOf() instead.
+ // TODO(svenpanne) Actually deprecate when Chrome is adapted.
+ double NumberValue() const { return ValueOf(); }
+
/**
* A specialization of Value::NumberValue that is more efficient
* because we know the structure of this object.
*/
- double NumberValue() const;
+ double ValueOf() const;
V8_INLINE(static Date* Cast(v8::Value* obj));
@@ -2753,10 +2779,14 @@ class V8EXPORT NumberObject : public Object {
public:
static Local<Value> New(double value);
+ // Deprecated, use NumberObject::ValueOf() instead.
+ // TODO(svenpanne) Actually deprecate when Chrome is adapted.
+ double NumberValue() const { return ValueOf(); }
+
/**
* Returns the Number held by the object.
*/
- double NumberValue() const;
+ double ValueOf() const;
V8_INLINE(static NumberObject* Cast(v8::Value* obj));
@@ -2772,10 +2802,14 @@ class V8EXPORT BooleanObject : public Object {
public:
static Local<Value> New(bool value);
+ // Deprecated, use BooleanObject::ValueOf() instead.
+ // TODO(svenpanne) Actually deprecate when Chrome is adapted.
+ bool BooleanValue() const { return ValueOf(); }
+
/**
* Returns the Boolean held by the object.
*/
- bool BooleanValue() const;
+ bool ValueOf() const;
V8_INLINE(static BooleanObject* Cast(v8::Value* obj));
@@ -2791,10 +2825,14 @@ class V8EXPORT StringObject : public Object {
public:
static Local<Value> New(Handle<String> value);
+ // Deprecated, use StringObject::ValueOf() instead.
+ // TODO(svenpanne) Actually deprecate when Chrome is adapted.
+ Local<String> StringValue() const { return ValueOf(); }
+
/**
* Returns the String held by the object.
*/
- Local<String> StringValue() const;
+ Local<String> ValueOf() const;
V8_INLINE(static StringObject* Cast(v8::Value* obj));
@@ -2812,10 +2850,14 @@ class V8EXPORT SymbolObject : public Object {
public:
static Local<Value> New(Isolate* isolate, Handle<Symbol> value);
+ // Deprecated, use SymbolObject::ValueOf() instead.
+ // TODO(svenpanne) Actually deprecate when Chrome is adapted.
+ Local<Symbol> SymbolValue() const { return ValueOf(); }
+
/**
* Returns the Symbol held by the object.
*/
- Local<Symbol> SymbolValue() const;
+ Local<Symbol> ValueOf() const;
V8_INLINE(static SymbolObject* Cast(v8::Value* obj));
@@ -5399,7 +5441,7 @@ class Internals {
static const int kNullValueRootIndex = 7;
static const int kTrueValueRootIndex = 8;
static const int kFalseValueRootIndex = 9;
- static const int kEmptyStringRootIndex = 134;
+ static const int kEmptyStringRootIndex = 135;
static const int kNodeClassIdOffset = 1 * kApiPointerSize;
static const int kNodeFlagsOffset = 1 * kApiPointerSize + 3;
@@ -5976,6 +6018,10 @@ Handle<Integer> ScriptOrigin::ResourceColumnOffset() const {
return resource_column_offset_;
}
+Handle<Boolean> ScriptOrigin::ResourceIsSharedCrossOrigin() const {
+ return resource_is_shared_cross_origin_;
+}
+
Handle<Boolean> Boolean::New(bool value) {
return value ? True() : False();
« no previous file with comments | « build/toolchain.gypi ('k') | src/a64/builtins-a64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698