Chromium Code Reviews| Index: include/v8.h |
| diff --git a/include/v8.h b/include/v8.h |
| index 815f43db7b2fb392ec521940c3b43821f190196b..5ae73663388deffe60e4c45a413c58257d045720 100644 |
| --- a/include/v8.h |
| +++ b/include/v8.h |
| @@ -701,9 +701,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,6 +717,7 @@ template <class T, class M> class Persistent : public PersistentBase<T> { |
| return Persistent<S>::Cast(*this); |
| } |
| + // TODO(svenpanne): Used by d8.cc and test-api.cc. |
| template<typename S, typename P> |
| V8_DEPRECATED( |
| "Use SetWeak instead", |
| @@ -727,6 +725,7 @@ template <class T, class M> class Persistent : public PersistentBase<T> { |
| P* parameter, |
| typename WeakReferenceCallbacks<S, P>::Revivable callback)); |
| + // TODO(svenpanne): Used by d8.cc and test-api.cc. |
| template<typename P> |
| V8_DEPRECATED( |
| "Use SetWeak instead", |
| @@ -737,9 +736,6 @@ template <class T, class M> class Persistent : public PersistentBase<T> { |
| // 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,6 +848,7 @@ class V8_EXPORT HandleScope { |
| ~HandleScope(); |
| + // TODO(svenpanne): Used by HandleEscapeFrom. |
| template <class T> |
| V8_DEPRECATED("Use EscapableHandleScope::Escape instead", |
| Local<T> Close(Handle<T> value)); |
| @@ -1145,11 +1142,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 +1232,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 +1289,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 +1620,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 +1825,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 +1865,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 +1887,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 +1904,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 |
| @@ -1982,29 +1927,6 @@ class V8_EXPORT String : public Primitive { |
| void operator=(const Utf8Value&); |
| }; |
|
Michael Starzinger
2013/12/02 15:01:28
nit: Only one empty new-line withing class body.
Sven Panne
2013/12/02 17:18:09
Doesn't this improve readability? ;-) Will remove
|
| - /** |
| - * 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. |
| @@ -2487,7 +2409,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 +2577,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 +2667,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 +2676,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,18 +2936,7 @@ 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 |
|
Michael Starzinger
2013/12/02 15:01:28
Why do we remove this comment, I liked it, can we
Sven Panne
2013/12/02 17:18:09
Hmmm, Value::NumberValue is dead, and I don't like
|
| - * because we know the structure of this object. |
| - */ |
| double ValueOf() const; |
| - |
| V8_INLINE static Date* Cast(v8::Value* obj); |
| /** |
| @@ -3051,8 +2952,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,19 +2964,8 @@ 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); |
| - |
| private: |
| static void CheckCast(v8::Value* obj); |
| }; |
| @@ -3089,18 +2977,8 @@ class V8_EXPORT NumberObject : public Object { |
| 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); |
| - |
| private: |
| static void CheckCast(v8::Value* obj); |
| }; |
| @@ -3112,18 +2990,8 @@ class V8_EXPORT BooleanObject : public Object { |
| 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); |
| - |
| private: |
| static void CheckCast(v8::Value* obj); |
| }; |
| @@ -3137,18 +3005,8 @@ class V8_EXPORT StringObject : public Object { |
| 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); |
| - |
| private: |
| static void CheckCast(v8::Value* obj); |
| }; |
| @@ -3207,7 +3065,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 +3084,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 +3619,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 +3634,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(); |
| @@ -3901,12 +3747,6 @@ class V8_EXPORT Extension { // NOLINT |
| #endif |
| } |
| - V8_DEPRECATED("Will be removed", |
| - virtual v8::Handle<v8::FunctionTemplate> GetNativeFunction( |
| - v8::Handle<v8::String> name)) { |
| - return v8::Handle<v8::FunctionTemplate>(); |
| - } |
| - |
| const char* name() const { return name_; } |
| size_t source_length() const { return source_length_; } |
| const String::ExternalAsciiStringResource* source() const { |
| @@ -3951,11 +3791,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 +3816,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 +3857,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 +4049,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 +4666,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 |
| @@ -5209,15 +5029,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. |
| @@ -5247,9 +5058,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(); |
| @@ -5319,12 +5127,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: |
| @@ -6202,21 +6004,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; |
| @@ -6269,32 +6061,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; |
| @@ -6665,18 +6431,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); |