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

Unified Diff: include/v8.h

Issue 84833006: Add Isolate* parameter to static API methods that don't take one. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/api.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 6e1ac3f5d1e828b0104cafff000e035964887e89..1226eb3666d9d489cfd99bd28eee15be47854574 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1137,6 +1137,8 @@ class V8_EXPORT Message {
bool IsSharedCrossOrigin() const;
// TODO(1245381): Print to a string instead of on a FILE.
+ static void PrintCurrentStackTrace(Isolate* isolate, FILE* out);
+ // Will be deprecated soon.
dcarney 2013/11/25 15:35:53 maybe move to isolate
static void PrintCurrentStackTrace(FILE* out);
static const int kNoLineNumberInfo = 0;
@@ -1192,6 +1194,11 @@ class V8_EXPORT StackTrace {
* StackFrame.
*/
static Local<StackTrace> CurrentStackTrace(
+ Isolate* isolate,
+ int frame_limit,
+ StackTraceOptions options = kOverview);
+ // Will be deprecated soon.
+ static Local<StackTrace> CurrentStackTrace(
int frame_limit,
StackTraceOptions options = kOverview);
};
@@ -1792,6 +1799,9 @@ class V8_EXPORT String : public Primitive {
* should the underlying buffer be deallocated or modified except through the
* destructor of the external string resource.
*/
+ static Local<String> NewExternal(Isolate* isolate,
+ ExternalStringResource* resource);
+ // Will be deprecated soon.
static Local<String> NewExternal(ExternalStringResource* resource);
/**
@@ -1813,6 +1823,9 @@ class V8_EXPORT String : public Primitive {
* should the underlying buffer be deallocated or modified except through the
* destructor of the external string resource.
*/
+ static Local<String> NewExternal(Isolate* isolate,
+ ExternalAsciiStringResource* resource);
+ // Will be deprecated soon.
static Local<String> NewExternal(ExternalAsciiStringResource* resource);
/**
@@ -1966,8 +1979,9 @@ class V8_EXPORT Private : public Data {
class V8_EXPORT Number : public Primitive {
public:
double Value() const;
- static Local<Number> New(double value);
static Local<Number> New(Isolate* isolate, double value);
+ // Will be deprecated soon.
+ static Local<Number> New(double value);
V8_INLINE static Number* Cast(v8::Value* obj);
private:
Number();
@@ -1980,10 +1994,11 @@ class V8_EXPORT Number : public Primitive {
*/
class V8_EXPORT Integer : public Number {
public:
- static Local<Integer> New(int32_t value);
- static Local<Integer> NewFromUnsigned(uint32_t value);
static Local<Integer> New(int32_t value, Isolate*);
static Local<Integer> NewFromUnsigned(uint32_t value, Isolate*);
+ // Will be deprecated soon.
+ static Local<Integer> New(int32_t value);
+ static Local<Integer> NewFromUnsigned(uint32_t value);
int64_t Value() const;
V8_INLINE static Integer* Cast(v8::Value* obj);
private:
@@ -2336,6 +2351,8 @@ class V8_EXPORT Object : public Value {
*/
Local<Value> CallAsConstructor(int argc, Handle<Value> argv[]);
+ static Local<Object> New(Isolate* isolate);
+ // Will be deprecated soon.
static Local<Object> New();
V8_INLINE static Object* Cast(Value* obj);
@@ -2364,6 +2381,8 @@ class V8_EXPORT Array : public Object {
* Creates a JavaScript array with the given length. If the length
* is negative the returned array will have length 0.
*/
+ static Local<Array> New(Isolate* isolate, int length = 0);
+ // Will be deprecated soon.
static Local<Array> New(int length = 0);
V8_INLINE static Array* Cast(Value* obj);
@@ -2627,6 +2646,8 @@ class V8_EXPORT ArrayBuffer : public Object {
* will be deallocated when it is garbage-collected,
* unless the object is externalized.
*/
+ static Local<ArrayBuffer> New(Isolate* isolate, size_t byte_length);
+ // Will be deprecated soon.
static Local<ArrayBuffer> New(size_t byte_length);
/**
@@ -2635,6 +2656,9 @@ class V8_EXPORT ArrayBuffer : public Object {
* The memory block will not be reclaimed when a created ArrayBuffer
* is garbage-collected.
*/
+ static Local<ArrayBuffer> New(Isolate* isolate, void* data,
+ size_t byte_length);
+ // Will be deprecated soon.
static Local<ArrayBuffer> New(void* data, size_t byte_length);
/**
@@ -2895,6 +2919,8 @@ class V8_EXPORT DataView : public ArrayBufferView {
*/
class V8_EXPORT Date : public Object {
public:
+ static Local<Value> New(Isolate* isolate, double time);
+ // Will be deprecated soon.
static Local<Value> New(double time);
V8_DEPRECATED(
@@ -2921,6 +2947,8 @@ class V8_EXPORT Date : public Object {
* This API should not be called more than needed as it will
* negatively impact the performance of date operations.
*/
+ static void DateTimeConfigurationChangeNotification(Isolate* isolate);
+ // Will be deprecated soon.
dcarney 2013/11/25 15:35:53 maybe move to isolate
static void DateTimeConfigurationChangeNotification();
private:
@@ -2933,6 +2961,8 @@ class V8_EXPORT Date : public Object {
*/
class V8_EXPORT NumberObject : public Object {
public:
+ static Local<Value> New(Isolate* isolate, double value);
+ // Will be deprecated soon.
static Local<Value> New(double value);
V8_DEPRECATED(
@@ -3377,6 +3407,13 @@ class V8_EXPORT FunctionTemplate : public Template {
public:
/** Creates a function template.*/
static Local<FunctionTemplate> New(
+ Isolate* isolate,
+ FunctionCallback callback = 0,
+ Handle<Value> data = Handle<Value>(),
+ Handle<Signature> signature = Handle<Signature>(),
+ int length = 0);
+ // Will be deprecated soon.
+ static Local<FunctionTemplate> New(
FunctionCallback callback = 0,
Handle<Value> data = Handle<Value>(),
Handle<Signature> signature = Handle<Signature>(),
@@ -3463,6 +3500,8 @@ class V8_EXPORT FunctionTemplate : public Template {
class V8_EXPORT ObjectTemplate : public Template {
public:
/** Creates an ObjectTemplate. */
+ static Local<ObjectTemplate> New(Isolate* isolate);
+ // Will be deprecated soon.
static Local<ObjectTemplate> New();
/** Creates a new instance of this template.*/
@@ -3604,7 +3643,8 @@ class V8_EXPORT ObjectTemplate : public Template {
private:
ObjectTemplate();
- static Local<ObjectTemplate> New(Handle<FunctionTemplate> constructor);
+ static Local<ObjectTemplate> New(internal::Isolate* isolate,
+ Handle<FunctionTemplate> constructor);
friend class FunctionTemplate;
};
@@ -3615,6 +3655,12 @@ class V8_EXPORT ObjectTemplate : public Template {
*/
class V8_EXPORT Signature : public Data {
public:
+ static Local<Signature> New(Isolate* isolate,
+ Handle<FunctionTemplate> receiver =
+ Handle<FunctionTemplate>(),
+ int argc = 0,
+ Handle<FunctionTemplate> argv[] = 0);
+ // Will be deprecated soon.
static Local<Signature> New(Handle<FunctionTemplate> receiver =
Handle<FunctionTemplate>(),
int argc = 0,
@@ -3630,8 +3676,13 @@ class V8_EXPORT Signature : public Data {
*/
class V8_EXPORT AccessorSignature : public Data {
public:
+ static Local<AccessorSignature> New(Isolate* isolate,
+ Handle<FunctionTemplate> receiver =
+ Handle<FunctionTemplate>());
+ // Will be deprecated soon.
static Local<AccessorSignature> New(Handle<FunctionTemplate> receiver =
Handle<FunctionTemplate>());
+
private:
AccessorSignature();
};
@@ -3779,17 +3830,17 @@ class V8_EXPORT DeclareExtension {
// --- Statics ---
+V8_INLINE Handle<Primitive> Undefined(Isolate* isolate);
+V8_INLINE Handle<Primitive> Null(Isolate* isolate);
+V8_INLINE Handle<Boolean> True(Isolate* isolate);
+V8_INLINE Handle<Boolean> False(Isolate* isolate);
+// Will be removed soon.
Handle<Primitive> V8_EXPORT Undefined();
Handle<Primitive> V8_EXPORT Null();
Handle<Boolean> V8_EXPORT True();
Handle<Boolean> V8_EXPORT False();
-V8_INLINE Handle<Primitive> Undefined(Isolate* isolate);
-V8_INLINE Handle<Primitive> Null(Isolate* isolate);
-V8_INLINE Handle<Boolean> True(Isolate* isolate);
-V8_INLINE Handle<Boolean> False(Isolate* isolate);
-
/**
* A set of constraints that specifies the limits of the runtime's memory use.
« 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