From 7590d302e37dd04664ef2bd68042063a8e634599 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 14 May 2015 18:48:25 -0700 Subject: [PATCH] Fix deprecation declarations in headers BUG=none R=ulan@chromium.org LOG=n Review URL: https://codereview.chromium.org/1127963005 Cr-Commit-Position: refs/heads/master@{#28407} --- include/v8.h | 62 +++++++++++++++++++++++++++++++----------------------------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/include/v8.h b/include/v8.h index 5ce6dd5..d4b664a 100644 --- a/include/v8.h +++ b/include/v8.h @@ -1390,7 +1390,7 @@ class V8_EXPORT Message { public: Local Get() const; - V8_DEPRECATE_SOON("Use maybe version", Local GetSourceLine()) const; + V8_DEPRECATE_SOON("Use maybe version", Local GetSourceLine() const); V8_WARN_UNUSED_RESULT MaybeLocal GetSourceLine( Local context) const; @@ -1416,7 +1416,7 @@ class V8_EXPORT Message { /** * Returns the number, 1-based, of the line where the error occurred. */ - V8_DEPRECATE_SOON("Use maybe version", int GetLineNumber()) const; + V8_DEPRECATE_SOON("Use maybe version", int GetLineNumber() const); V8_WARN_UNUSED_RESULT Maybe GetLineNumber(Local context) const; /** @@ -1435,14 +1435,14 @@ class V8_EXPORT Message { * Returns the index within the line of the first character where * the error occurred. */ - V8_DEPRECATE_SOON("Use maybe version", int GetStartColumn()) const; + V8_DEPRECATE_SOON("Use maybe version", int GetStartColumn() const); V8_WARN_UNUSED_RESULT Maybe GetStartColumn(Local context) const; /** * Returns the index within the line of the last character where * the error occurred. */ - V8_DEPRECATE_SOON("Use maybe version", int GetEndColumn()) const; + V8_DEPRECATE_SOON("Use maybe version", int GetEndColumn() const); V8_WARN_UNUSED_RESULT Maybe GetEndColumn(Local context) const; /** @@ -1910,39 +1910,39 @@ class V8_EXPORT Value : public Data { V8_WARN_UNUSED_RESULT MaybeLocal ToInt32(Local context) const; V8_DEPRECATE_SOON("Use maybe version", - Local ToBoolean(Isolate* isolate)) const; + Local ToBoolean(Isolate* isolate) const); V8_DEPRECATE_SOON("Use maybe version", - Local ToNumber(Isolate* isolate)) const; + Local ToNumber(Isolate* isolate) const); V8_DEPRECATE_SOON("Use maybe version", - Local ToString(Isolate* isolate)) const; + Local ToString(Isolate* isolate) const); V8_DEPRECATE_SOON("Use maybe version", - Local ToDetailString(Isolate* isolate)) const; + Local ToDetailString(Isolate* isolate) const); V8_DEPRECATE_SOON("Use maybe version", - Local ToObject(Isolate* isolate)) const; + Local ToObject(Isolate* isolate) const); V8_DEPRECATE_SOON("Use maybe version", - Local ToInteger(Isolate* isolate)) const; + Local ToInteger(Isolate* isolate) const); V8_DEPRECATE_SOON("Use maybe version", - Local ToUint32(Isolate* isolate)) const; + Local ToUint32(Isolate* isolate) const); V8_DEPRECATE_SOON("Use maybe version", - Local ToInt32(Isolate* isolate)) const; + Local ToInt32(Isolate* isolate) const); inline V8_DEPRECATE_SOON("Use maybe version", - Local ToBoolean()) const; - inline V8_DEPRECATE_SOON("Use maybe version", Local ToNumber()) const; - inline V8_DEPRECATE_SOON("Use maybe version", Local ToString()) const; + Local ToBoolean() const); + inline V8_DEPRECATE_SOON("Use maybe version", Local ToNumber() const); + inline V8_DEPRECATE_SOON("Use maybe version", Local ToString() const); inline V8_DEPRECATE_SOON("Use maybe version", - Local ToDetailString()) const; - inline V8_DEPRECATE_SOON("Use maybe version", Local ToObject()) const; + Local ToDetailString() const); + inline V8_DEPRECATE_SOON("Use maybe version", Local ToObject() const); inline V8_DEPRECATE_SOON("Use maybe version", - Local ToInteger()) const; - inline V8_DEPRECATE_SOON("Use maybe version", Local ToUint32()) const; - inline V8_DEPRECATE_SOON("Use maybe version", Local ToInt32()) const; + Local ToInteger() const); + inline V8_DEPRECATE_SOON("Use maybe version", Local ToUint32() const); + inline V8_DEPRECATE_SOON("Use maybe version", Local ToInt32() const); /** * Attempts to convert a string to an array index. * Returns an empty handle if the conversion fails. */ - V8_DEPRECATE_SOON("Use maybe version", Local ToArrayIndex()) const; + V8_DEPRECATE_SOON("Use maybe version", Local ToArrayIndex() const); V8_WARN_UNUSED_RESULT MaybeLocal ToArrayIndex( Local context) const; @@ -1954,14 +1954,14 @@ class V8_EXPORT Value : public Data { Local context) const; V8_WARN_UNUSED_RESULT Maybe Int32Value(Local context) const; - V8_DEPRECATE_SOON("Use maybe version", bool BooleanValue()) const; - V8_DEPRECATE_SOON("Use maybe version", double NumberValue()) const; - V8_DEPRECATE_SOON("Use maybe version", int64_t IntegerValue()) const; - V8_DEPRECATE_SOON("Use maybe version", uint32_t Uint32Value()) const; - V8_DEPRECATE_SOON("Use maybe version", int32_t Int32Value()) const; + V8_DEPRECATE_SOON("Use maybe version", bool BooleanValue() const); + V8_DEPRECATE_SOON("Use maybe version", double NumberValue() const); + V8_DEPRECATE_SOON("Use maybe version", int64_t IntegerValue() const); + V8_DEPRECATE_SOON("Use maybe version", uint32_t Uint32Value() const); + V8_DEPRECATE_SOON("Use maybe version", int32_t Int32Value() const); /** JS == */ - V8_DEPRECATE_SOON("Use maybe version", bool Equals(Handle that)) const; + V8_DEPRECATE_SOON("Use maybe version", bool Equals(Handle that) const); V8_WARN_UNUSED_RESULT Maybe Equals(Local context, Handle that) const; bool StrictEquals(Handle that) const; @@ -3077,7 +3077,7 @@ class V8_EXPORT Function : public Object { V8_WARN_UNUSED_RESULT MaybeLocal NewInstance( Local context, int argc, Handle argv[]) const; - V8_DEPRECATE_SOON("Use maybe version", Local NewInstance()) const; + V8_DEPRECATE_SOON("Use maybe version", Local NewInstance() const); V8_WARN_UNUSED_RESULT MaybeLocal NewInstance( Local context) const { return NewInstance(context, 0, nullptr); @@ -6175,7 +6175,7 @@ class V8_EXPORT TryCatch { * Returns the .stack property of the thrown object. If no .stack * property is present an empty handle is returned. */ - V8_DEPRECATE_SOON("Use maybe version.", Local StackTrace()) const; + V8_DEPRECATE_SOON("Use maybe version.", Local StackTrace() const); V8_WARN_UNUSED_RESULT MaybeLocal StackTrace( Local context) const; @@ -7294,7 +7294,9 @@ Handle Boolean::New(Isolate* isolate, bool value) { void Template::Set(Isolate* isolate, const char* name, v8::Handle value) { - Set(v8::String::NewFromUtf8(isolate, name), value); + Set(v8::String::NewFromUtf8(isolate, name, NewStringType::kNormal) + .ToLocalChecked(), + value); } -- 2.7.4