Index: include/v8.h |
diff --git a/include/v8.h b/include/v8.h |
index 9bf96081d5a4a3276bff5aa06892331055269c5b..99827feca124fa311af84bd143464dd7926b06ad 100644 |
--- a/include/v8.h |
+++ b/include/v8.h |
@@ -455,18 +455,6 @@ class WeakCallbackData { |
}; |
-// TODO(dcarney): Remove this class. |
-template<typename T, |
- typename P, |
- typename M = NonCopyablePersistentTraits<T> > |
-class WeakReferenceCallbacks { |
- public: |
- typedef void (*Revivable)(Isolate* isolate, |
- Persistent<T, M>* object, |
- P* parameter); |
-}; |
- |
- |
/** |
* An object reference that is independent of any handle scope. Where |
* a Local handle only lives as long as the HandleScope in which it was |
@@ -701,9 +689,6 @@ template <class T, class M> class Persistent : public PersistentBase<T> { |
if (M::kResetInDestructor) this->Reset(); |
} |
- V8_DEPRECATED("Use Reset instead", |
- V8_INLINE void Dispose()) { this->Reset(); } |
- |
// TODO(dcarney): this is pretty useless, fix or remove |
template <class S> |
V8_INLINE static Persistent<T>& Cast(Persistent<S>& that) { // NOLINT |
@@ -720,26 +705,9 @@ template <class T, class M> class Persistent : public PersistentBase<T> { |
return Persistent<S>::Cast(*this); |
} |
- template<typename S, typename P> |
- V8_DEPRECATED( |
- "Use SetWeak instead", |
- V8_INLINE void MakeWeak( |
- P* parameter, |
- typename WeakReferenceCallbacks<S, P>::Revivable callback)); |
- |
- template<typename P> |
- V8_DEPRECATED( |
- "Use SetWeak instead", |
- V8_INLINE void MakeWeak( |
- P* parameter, |
- typename WeakReferenceCallbacks<T, P>::Revivable callback)); |
- |
// This will be removed. |
V8_INLINE T* ClearAndLeak(); |
- V8_DEPRECATED("This will be removed", |
- V8_INLINE void Clear()) { this->val_ = 0; } |
- |
// TODO(dcarney): remove |
#ifndef V8_ALLOW_ACCESS_TO_RAW_HANDLE_CONSTRUCTOR |
@@ -852,10 +820,6 @@ class V8_EXPORT HandleScope { |
~HandleScope(); |
- template <class T> |
- V8_DEPRECATED("Use EscapableHandleScope::Escape instead", |
- Local<T> Close(Handle<T> value)); |
- |
/** |
* Counts the number of allocated handles. |
*/ |
@@ -894,18 +858,10 @@ class V8_EXPORT HandleScope { |
} |
}; |
- void Leave(); |
- |
internal::Isolate* isolate_; |
internal::Object** prev_next_; |
internal::Object** prev_limit_; |
- // TODO(dcarney): remove this field |
- // Allow for the active closing of HandleScopes which allows to pass a handle |
- // from the HandleScope being closed to the next top most HandleScope. |
- bool is_closed_; |
- internal::Object** RawClose(internal::Object** value); |
- |
friend class ImplementationUtilities; |
friend class EscapableHandleScope; |
template<class F> friend class Handle; |
@@ -1145,11 +1101,6 @@ class V8_EXPORT Script { |
Local<Value> Run(); |
/** |
- * Returns the script id value. |
- */ |
- V8_DEPRECATED("Use GetId instead", Local<Value> Id()); |
- |
- /** |
* Returns the script id. |
*/ |
int GetId(); |
@@ -1240,8 +1191,6 @@ class V8_EXPORT Message { |
// TODO(1245381): Print to a string instead of on a FILE. |
static void PrintCurrentStackTrace(Isolate* isolate, FILE* out); |
- V8_DEPRECATED("Will be removed", |
- static void PrintCurrentStackTrace(FILE* out)); |
static const int kNoLineNumberInfo = 0; |
static const int kNoColumnInfo = 0; |
@@ -1299,9 +1248,6 @@ class V8_EXPORT StackTrace { |
Isolate* isolate, |
int frame_limit, |
StackTraceOptions options = kOverview); |
- V8_DEPRECATED("Will be removed", |
- static Local<StackTrace> CurrentStackTrace( |
- int frame_limit, StackTraceOptions options = kOverview)); |
}; |
@@ -1633,8 +1579,6 @@ class V8_EXPORT Boolean : public Primitive { |
public: |
bool Value() const; |
V8_INLINE static Handle<Boolean> New(Isolate* isolate, bool value); |
- V8_DEPRECATED("Will be removed", |
- V8_INLINE static Handle<Boolean> New(bool value)); |
}; |
@@ -1840,30 +1784,6 @@ class V8_EXPORT String : public Primitive { |
V8_INLINE static String* Cast(v8::Value* obj); |
- /** |
- * Allocates a new string from either UTF-8 encoded or ASCII data. |
- * The second parameter 'length' gives the buffer length. If omitted, |
- * the function calls 'strlen' to determine the buffer length. |
- */ |
- V8_DEPRECATED( |
- "Use NewFromUtf8 instead", |
- V8_INLINE static Local<String> New(const char* data, int length = -1)); |
- |
- /** Allocates a new string from 16-bit character codes.*/ |
- V8_DEPRECATED( |
- "Use NewFromTwoByte instead", |
- V8_INLINE static Local<String> New( |
- const uint16_t* data, int length = -1)); |
- |
- /** |
- * Creates an internalized string (historically called a "symbol", |
- * not to be confused with ES6 symbols). Returns one if it exists already. |
- */ |
- V8_DEPRECATED( |
- "Use NewFromUtf8 instead", |
- V8_INLINE static Local<String> NewSymbol( |
- const char* data, int length = -1)); |
- |
enum NewStringType { |
kNormalString, kInternalizedString, kUndetectableString |
}; |
@@ -1904,8 +1824,6 @@ class V8_EXPORT String : public Primitive { |
*/ |
static Local<String> NewExternal(Isolate* isolate, |
ExternalStringResource* resource); |
- V8_DEPRECATED("Will be removed", static Local<String> NewExternal( |
- ExternalStringResource* resource)); |
/** |
* Associate an external string resource with this string by transforming it |
@@ -1928,8 +1846,6 @@ class V8_EXPORT String : public Primitive { |
*/ |
static Local<String> NewExternal(Isolate* isolate, |
ExternalAsciiStringResource* resource); |
- V8_DEPRECATED("Will be removed", static Local<String> NewExternal( |
- ExternalAsciiStringResource* resource)); |
/** |
* Associate an external string resource with this string by transforming it |
@@ -1947,18 +1863,6 @@ class V8_EXPORT String : public Primitive { |
*/ |
bool CanMakeExternal(); |
- /** Creates an undetectable string from the supplied ASCII or UTF-8 data.*/ |
- V8_DEPRECATED( |
- "Use NewFromUtf8 instead", |
- V8_INLINE static Local<String> NewUndetectable(const char* data, |
- int length = -1)); |
- |
- /** Creates an undetectable string from the supplied 16-bit character codes.*/ |
- V8_DEPRECATED( |
- "Use NewFromTwoByte instead", |
- V8_INLINE static Local<String> NewUndetectable(const uint16_t* data, |
- int length = -1)); |
- |
/** |
* Converts an object to a UTF-8-encoded character array. Useful if |
* you want to print the object. If conversion to a string fails |
@@ -1983,30 +1887,6 @@ class V8_EXPORT String : public Primitive { |
}; |
/** |
- * Converts an object to an ASCII string. |
- * Useful if you want to print the object. |
- * If conversion to a string fails (eg. due to an exception in the toString() |
- * method of the object) then the length() method returns 0 and the * operator |
- * returns NULL. |
- */ |
- class V8_EXPORT AsciiValue { |
- public: |
- V8_DEPRECATED("Use Utf8Value instead", |
- explicit AsciiValue(Handle<v8::Value> obj)); |
- ~AsciiValue(); |
- char* operator*() { return str_; } |
- const char* operator*() const { return str_; } |
- int length() const { return length_; } |
- private: |
- char* str_; |
- int length_; |
- |
- // Disallow copying and assigning. |
- AsciiValue(const AsciiValue&); |
- void operator=(const AsciiValue&); |
- }; |
- |
- /** |
* Converts an object to a two-byte string. |
* If conversion to a string fails (eg. due to an exception in the toString() |
* method of the object) then the length() method returns 0 and the * operator |
@@ -2487,7 +2367,6 @@ class V8_EXPORT Array : public Object { |
* is negative the returned array will have length 0. |
*/ |
static Local<Array> New(Isolate* isolate, int length = 0); |
- V8_DEPRECATED("Will be removed", static Local<Array> New(int length = 0)); |
V8_INLINE static Array* Cast(Value* obj); |
private: |
@@ -2656,11 +2535,6 @@ class V8_EXPORT Function : public Object { |
bool IsBuiltin() const; |
/** |
- * Returns scriptId object. |
- */ |
- V8_DEPRECATED("Use ScriptId instead", Handle<Value> GetScriptId() const); |
- |
- /** |
* Returns scriptId. |
*/ |
int ScriptId() const; |
@@ -2751,8 +2625,6 @@ class V8_EXPORT ArrayBuffer : public Object { |
* unless the object is externalized. |
*/ |
static Local<ArrayBuffer> New(Isolate* isolate, size_t byte_length); |
- V8_DEPRECATED("Will be removed", |
- static Local<ArrayBuffer> New(size_t byte_length)); |
/** |
* Create a new ArrayBuffer over an existing memory block. |
@@ -2762,8 +2634,6 @@ class V8_EXPORT ArrayBuffer : public Object { |
*/ |
static Local<ArrayBuffer> New(Isolate* isolate, void* data, |
size_t byte_length); |
- V8_DEPRECATED("Will be removed", |
- static Local<ArrayBuffer> New(void* data, size_t byte_length)); |
/** |
* Returns true if ArrayBuffer is extrenalized, that is, does not |
@@ -3024,11 +2894,6 @@ class V8_EXPORT DataView : public ArrayBufferView { |
class V8_EXPORT Date : public Object { |
public: |
static Local<Value> New(Isolate* isolate, double time); |
- V8_DEPRECATED("Will be removed", static Local<Value> New(double time)); |
- |
- V8_DEPRECATED( |
- "Use ValueOf instead", |
- double NumberValue() const) { return ValueOf(); } |
/** |
* A specialization of Value::NumberValue that is more efficient |
@@ -3051,8 +2916,6 @@ class V8_EXPORT Date : public Object { |
* negatively impact the performance of date operations. |
*/ |
static void DateTimeConfigurationChangeNotification(Isolate* isolate); |
- V8_DEPRECATED("Will be removed", |
- static void DateTimeConfigurationChangeNotification()); |
private: |
static void CheckCast(v8::Value* obj); |
@@ -3065,15 +2928,7 @@ class V8_EXPORT Date : public Object { |
class V8_EXPORT NumberObject : public Object { |
public: |
static Local<Value> New(Isolate* isolate, double value); |
- V8_DEPRECATED("Will be removed", static Local<Value> New(double value)); |
- |
- V8_DEPRECATED( |
- "Use ValueOf instead", |
- double NumberValue() const) { return ValueOf(); } |
- /** |
- * Returns the Number held by the object. |
- */ |
double ValueOf() const; |
V8_INLINE static NumberObject* Cast(v8::Value* obj); |
@@ -3090,13 +2945,6 @@ class V8_EXPORT BooleanObject : public Object { |
public: |
static Local<Value> New(bool value); |
- V8_DEPRECATED( |
- "Use ValueOf instead", |
- bool BooleanValue() const) { return ValueOf(); } |
- |
- /** |
- * Returns the Boolean held by the object. |
- */ |
bool ValueOf() const; |
V8_INLINE static BooleanObject* Cast(v8::Value* obj); |
@@ -3113,13 +2961,6 @@ class V8_EXPORT StringObject : public Object { |
public: |
static Local<Value> New(Handle<String> value); |
- V8_DEPRECATED( |
- "Use ValueOf instead", |
- Local<String> StringValue() const) { return ValueOf(); } |
- |
- /** |
- * Returns the String held by the object. |
- */ |
Local<String> ValueOf() const; |
V8_INLINE static StringObject* Cast(v8::Value* obj); |
@@ -3138,13 +2979,6 @@ class V8_EXPORT SymbolObject : public Object { |
public: |
static Local<Value> New(Isolate* isolate, Handle<Symbol> value); |
- V8_DEPRECATED( |
- "Use ValueOf instead", |
- Local<Symbol> SymbolValue() const) { return ValueOf(); } |
- |
- /** |
- * Returns the Symbol held by the object. |
- */ |
Local<Symbol> ValueOf() const; |
V8_INLINE static SymbolObject* Cast(v8::Value* obj); |
@@ -3207,7 +3041,6 @@ class V8_EXPORT RegExp : public Object { |
class V8_EXPORT External : public Value { |
public: |
static Local<External> New(Isolate* isolate, void* value); |
- V8_DEPRECATED("Will be removed", static Local<External> New(void *value)); |
V8_INLINE static External* Cast(Value* obj); |
void* Value() const; |
private: |
@@ -3227,8 +3060,6 @@ class V8_EXPORT Template : public Data { |
void Set(Handle<String> name, Handle<Data> value, |
PropertyAttribute attributes = None); |
V8_INLINE void Set(Isolate* isolate, const char* name, Handle<Data> value); |
- V8_DEPRECATED("Will be removed", |
- V8_INLINE void Set(const char* name, Handle<Data> value)); |
void SetAccessorProperty( |
Local<String> name, |
@@ -3764,12 +3595,6 @@ class V8_EXPORT Signature : public Data { |
Handle<FunctionTemplate>(), |
int argc = 0, |
Handle<FunctionTemplate> argv[] = 0); |
- V8_DEPRECATED("Will be removed", |
- static Local<Signature> New(Handle<FunctionTemplate> receiver = |
- Handle<FunctionTemplate>(), |
- int argc = 0, |
- Handle<FunctionTemplate> argv[] = |
- 0)); |
private: |
Signature(); |
@@ -3785,9 +3610,6 @@ class V8_EXPORT AccessorSignature : public Data { |
static Local<AccessorSignature> New(Isolate* isolate, |
Handle<FunctionTemplate> receiver = |
Handle<FunctionTemplate>()); |
- V8_DEPRECATED("Will be removed", static Local<AccessorSignature> New( |
- Handle<FunctionTemplate> receiver = |
- Handle<FunctionTemplate>())); |
private: |
AccessorSignature(); |
@@ -3894,16 +3716,6 @@ class V8_EXPORT Extension { // NOLINT |
virtual ~Extension() { } |
virtual v8::Handle<v8::FunctionTemplate> GetNativeFunctionTemplate( |
v8::Isolate* isolate, v8::Handle<v8::String> name) { |
-#if defined(V8_DEPRECATION_WARNINGS) |
- return v8::Handle<v8::FunctionTemplate>(); |
-#else |
- return GetNativeFunction(name); |
-#endif |
- } |
- |
- V8_DEPRECATED("Will be removed", |
- virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( |
- v8::Handle<v8::String> name)) { |
return v8::Handle<v8::FunctionTemplate>(); |
} |
@@ -3951,11 +3763,6 @@ V8_INLINE Handle<Primitive> Null(Isolate* isolate); |
V8_INLINE Handle<Boolean> True(Isolate* isolate); |
V8_INLINE Handle<Boolean> False(Isolate* isolate); |
-V8_DEPRECATED("Will be removed", Handle<Primitive> V8_EXPORT Undefined()); |
-V8_DEPRECATED("Will be removed", Handle<Primitive> V8_EXPORT Null()); |
-V8_DEPRECATED("Will be removed", Handle<Boolean> V8_EXPORT True()); |
-V8_DEPRECATED("Will be removed", Handle<Boolean> V8_EXPORT False()); |
- |
/** |
* A set of constraints that specifies the limits of the runtime's memory use. |
@@ -3981,8 +3788,6 @@ class V8_EXPORT ResourceConstraints { |
*/ |
void ConfigureDefaults(uint64_t physical_memory, |
uint32_t number_of_processors); |
- V8_DEPRECATED("Will be removed", |
- void ConfigureDefaults(uint64_t physical_memory)); |
int max_young_space_size() const { return max_young_space_size_; } |
void set_max_young_space_size(int value) { max_young_space_size_ = value; } |
@@ -4024,10 +3829,6 @@ typedef void (*FatalErrorCallback)(const char* location, const char* message); |
typedef void (*MessageCallback)(Handle<Message> message, Handle<Value> error); |
-V8_DEPRECATED( |
- "Use Isolate::ThrowException instead", |
- Handle<Value> V8_EXPORT ThrowException(Handle<Value> exception)); |
- |
/** |
* Create new error objects by calling the corresponding error object |
* constructor with the message. |
@@ -4220,10 +4021,6 @@ class V8_EXPORT Isolate { |
*/ |
void Dispose(); |
- V8_DEPRECATED("Use SetData(0, data) instead.", |
- V8_INLINE void SetData(void* data)); |
- V8_DEPRECATED("Use GetData(0) instead.", V8_INLINE void* GetData()); |
- |
/** |
* Associate embedder-specific data with the isolate. |slot| has to be |
* between 0 and GetNumberOfDataSlots() - 1. |
@@ -4841,11 +4638,6 @@ class V8_EXPORT V8 { |
static void SetJitCodeEventHandler(JitCodeEventOptions options, |
JitCodeEventHandler event_handler); |
- V8_DEPRECATED( |
- "Use Isolate::AdjustAmountOfExternalAllocatedMemory instead", |
- static int64_t AdjustAmountOfExternalAllocatedMemory( |
- int64_t change_in_bytes)); |
- |
/** |
* Forcefully terminate the current thread of JavaScript execution |
* in the given isolate. If no isolate is provided, the default |
@@ -4975,12 +4767,10 @@ class V8_EXPORT V8 { |
internal::Object** handle); |
static internal::Object** CopyPersistent(internal::Object** handle); |
static void DisposeGlobal(internal::Object** global_handle); |
- typedef WeakReferenceCallbacks<Value, void>::Revivable RevivableCallback; |
typedef WeakCallbackData<Value, void>::Callback WeakCallback; |
static void MakeWeak(internal::Object** global_handle, |
void* data, |
- WeakCallback weak_callback, |
- RevivableCallback weak_reference_callback); |
+ WeakCallback weak_callback); |
static void ClearWeak(internal::Object** global_handle); |
static void Eternalize(Isolate* isolate, |
Value* handle, |
@@ -5193,15 +4983,6 @@ class V8_EXPORT Context { |
Handle<ObjectTemplate> global_template = Handle<ObjectTemplate>(), |
Handle<Value> global_object = Handle<Value>()); |
- V8_DEPRECATED("Use Isolate::GetEnteredContext instead", |
- static Local<Context> GetEntered()); |
- |
- V8_DEPRECATED("Use Isolate::GetCurrentContext instead", |
- static Local<Context> GetCurrent()); |
- |
- V8_DEPRECATED("Use Isolate::GetCallingContext instead", |
- static Local<Context> GetCalling()); |
- |
/** |
* Sets the security token for the context. To access an object in |
* another context, the security tokens must match. |
@@ -5231,9 +5012,6 @@ class V8_EXPORT Context { |
/** Returns true if the context has experienced an out of memory situation. */ |
bool HasOutOfMemoryException(); |
- V8_DEPRECATED("Use Isolate::InContext instead", |
- static bool InContext()); |
- |
/** Returns an isolate associated with a current context. */ |
v8::Isolate* GetIsolate(); |
@@ -5303,12 +5081,6 @@ class V8_EXPORT Context { |
explicit V8_INLINE Scope(Handle<Context> context) : context_(context) { |
context_->Enter(); |
} |
- V8_DEPRECATED( |
- "Use Handle version instead", |
- V8_INLINE Scope(Isolate* isolate, Persistent<Context>& context)) // NOLINT |
- : context_(Handle<Context>::New(isolate, context)) { |
- context_->Enter(); |
- } |
V8_INLINE ~Scope() { context_->Exit(); } |
private: |
@@ -5894,8 +5666,7 @@ void PersistentBase<T>::SetWeak( |
typedef typename WeakCallbackData<Value, void>::Callback Callback; |
V8::MakeWeak(reinterpret_cast<internal::Object**>(this->val_), |
parameter, |
- reinterpret_cast<Callback>(callback), |
- NULL); |
+ reinterpret_cast<Callback>(callback)); |
} |
@@ -5908,29 +5679,6 @@ void PersistentBase<T>::SetWeak( |
} |
-template <class T, class M> |
-template <typename S, typename P> |
-void Persistent<T, M>::MakeWeak( |
- P* parameters, |
- typename WeakReferenceCallbacks<S, P>::Revivable callback) { |
- TYPE_CHECK(S, T); |
- typedef typename WeakReferenceCallbacks<Value, void>::Revivable Revivable; |
- V8::MakeWeak(reinterpret_cast<internal::Object**>(this->val_), |
- parameters, |
- NULL, |
- reinterpret_cast<Revivable>(callback)); |
-} |
- |
- |
-template <class T, class M> |
-template <typename P> |
-void Persistent<T, M>::MakeWeak( |
- P* parameters, |
- typename WeakReferenceCallbacks<T, P>::Revivable callback) { |
- MakeWeak<T, P>(parameters, callback); |
-} |
- |
- |
template <class T> |
void PersistentBase<T>::ClearWeak() { |
V8::ClearWeak(reinterpret_cast<internal::Object**>(this->val_)); |
@@ -6155,13 +5903,6 @@ int FunctionCallbackInfo<T>::Length() const { |
} |
-template <class T> |
-Local<T> HandleScope::Close(Handle<T> value) { |
- internal::Object** before = reinterpret_cast<internal::Object**>(*value); |
- internal::Object** after = RawClose(before); |
- return Local<T>(reinterpret_cast<T*>(after)); |
-} |
- |
Handle<Value> ScriptOrigin::ResourceName() const { |
return resource_name_; |
} |
@@ -6186,21 +5927,11 @@ Handle<Boolean> Boolean::New(Isolate* isolate, bool value) { |
} |
-Handle<Boolean> Boolean::New(bool value) { |
- return Boolean::New(Isolate::GetCurrent(), value); |
-} |
- |
- |
void Template::Set(Isolate* isolate, const char* name, v8::Handle<Data> value) { |
Set(v8::String::NewFromUtf8(isolate, name), value); |
} |
-void Template::Set(const char* name, v8::Handle<Data> value) { |
- Set(Isolate::GetCurrent(), name, value); |
-} |
- |
- |
Local<Value> Object::GetInternalField(int index) { |
#ifndef V8_ENABLE_CHECKS |
typedef internal::Object O; |
@@ -6253,32 +5984,6 @@ Local<String> String::Empty(Isolate* isolate) { |
} |
-Local<String> String::New(const char* data, int length) { |
- return NewFromUtf8(Isolate::GetCurrent(), data, kNormalString, length); |
-} |
- |
- |
-Local<String> String::New(const uint16_t* data, int length) { |
- return NewFromTwoByte(Isolate::GetCurrent(), data, kNormalString, length); |
-} |
- |
- |
-Local<String> String::NewSymbol(const char* data, int length) { |
- return NewFromUtf8(Isolate::GetCurrent(), data, kInternalizedString, length); |
-} |
- |
- |
-Local<String> String::NewUndetectable(const char* data, int length) { |
- return NewFromUtf8(Isolate::GetCurrent(), data, kUndetectableString, length); |
-} |
- |
- |
-Local<String> String::NewUndetectable(const uint16_t* data, int length) { |
- return NewFromTwoByte( |
- Isolate::GetCurrent(), data, kUndetectableString, length); |
-} |
- |
- |
String::ExternalStringResource* String::GetExternalStringResource() const { |
typedef internal::Object O; |
typedef internal::Internals I; |
@@ -6649,18 +6354,6 @@ Handle<Boolean> False(Isolate* isolate) { |
} |
-void Isolate::SetData(void* data) { |
- typedef internal::Internals I; |
- I::SetEmbedderData(this, 0, data); |
-} |
- |
- |
-void* Isolate::GetData() { |
- typedef internal::Internals I; |
- return I::GetEmbedderData(this, 0); |
-} |
- |
- |
void Isolate::SetData(uint32_t slot, void* data) { |
typedef internal::Internals I; |
I::SetEmbedderData(this, slot, data); |