Reviewers: machenbach,
Message:
plz review
Description:
Clean up incorrect V8_DEPRECATION macro usage and enable deprecatitions
We turn the default for standalone builds on, however, I added overrides
to all targets to turn it locally off again. In follow up CLs, I'll
clean up one target at a time.
BUG=v8:3023
[email protected]
LOG=n
Please review this at https://codereview.chromium.org/82763004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+31, -8 lines):
M build/standalone.gypi
M include/v8.h
M samples/samples.gyp
M src/d8.gyp
M test/cctest/cctest.gyp
M tools/gyp/v8.gyp
Index: build/standalone.gypi
diff --git a/build/standalone.gypi b/build/standalone.gypi
index
4cb5e00bcc760fa9330bbca7114703f0899bd3b1..b1aec36677416517df9473f75af980fc16b336b6
100644
--- a/build/standalone.gypi
+++ b/build/standalone.gypi
@@ -37,6 +37,7 @@
'visibility%': 'hidden',
'v8_enable_backtrace%': 0,
'v8_enable_i18n_support%': 1,
+ 'v8_deprecation_warnings': 1,
'msvs_multi_core_compile%': '1',
'mac_deployment_target%': '10.5',
'variables': {
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index
e44c0bfe4684face3a142ba8bc554131bba24b14..51b226236e7c6f167c92bc3f61d313c869c5973e
100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -1736,7 +1736,7 @@ class V8_EXPORT String : public Primitive {
* the function calls 'strlen' to determine the buffer length.
*/
V8_DEPRECATED(
- "Use NewFromOneByte instead",
+ "Use NewFromUtf8 instead",
V8_INLINE static Local<String> New(const char* data, int length =
-1));
/** Allocates a new string from 16-bit character codes.*/
@@ -2535,7 +2535,7 @@ class V8_EXPORT Function : public Object {
/**
* Returns scriptId object.
*/
- V8_DEPRECATED("Use ScriptId instead", Handle<Value> GetScriptId()) const;
+ V8_DEPRECATED("Use ScriptId instead", Handle<Value> GetScriptId() const);
/**
* Returns scriptId.
@@ -2899,7 +2899,7 @@ class V8_EXPORT Date : public Object {
V8_DEPRECATED(
"Use ValueOf instead",
- double NumberValue()) const { return ValueOf(); }
+ double NumberValue() const) { return ValueOf(); }
/**
* A specialization of Value::NumberValue that is more efficient
@@ -2937,7 +2937,7 @@ class V8_EXPORT NumberObject : public Object {
V8_DEPRECATED(
"Use ValueOf instead",
- double NumberValue()) const { return ValueOf(); }
+ double NumberValue() const) { return ValueOf(); }
/**
* Returns the Number held by the object.
@@ -2960,7 +2960,7 @@ class V8_EXPORT BooleanObject : public Object {
V8_DEPRECATED(
"Use ValueOf instead",
- bool BooleanValue()) const { return ValueOf(); }
+ bool BooleanValue() const) { return ValueOf(); }
/**
* Returns the Boolean held by the object.
@@ -2983,7 +2983,7 @@ class V8_EXPORT StringObject : public Object {
V8_DEPRECATED(
"Use ValueOf instead",
- Local<String> StringValue()) const { return ValueOf(); }
+ Local<String> StringValue() const) { return ValueOf(); }
/**
* Returns the String held by the object.
@@ -3008,7 +3008,7 @@ class V8_EXPORT SymbolObject : public Object {
V8_DEPRECATED(
"Use ValueOf instead",
- Local<Symbol> SymbolValue()) const { return ValueOf(); }
+ Local<Symbol> SymbolValue() const) { return ValueOf(); }
/**
* Returns the Symbol held by the object.
@@ -6047,7 +6047,7 @@ Handle<Boolean> Boolean::New(bool value) {
void Template::Set(const char* name, v8::Handle<Data> value) {
- Set(v8::String::New(name), value);
+ Set(v8::String::NewFromUtf8(Isolate::GetCurrent(), name), value);
}
Index: samples/samples.gyp
diff --git a/samples/samples.gyp b/samples/samples.gyp
index
dfc7410070b3c46edf026caa98f92fc3da64701b..0e8e9c4347640a2ca87151c27f4a8c5184deda39
100644
--- a/samples/samples.gyp
+++ b/samples/samples.gyp
@@ -39,6 +39,10 @@
'include_dirs': [
'../include',
],
+ 'variables': {
+ # TODO(jochen): enable warnings.
+ 'v8_deprecation_warnings': 0,
+ },
'conditions': [
['v8_enable_i18n_support==1', {
'dependencies': [
Index: src/d8.gyp
diff --git a/src/d8.gyp b/src/d8.gyp
index
097abc04652fc39de72fc094ea08c5c2c670efdf..1e6e2c359c186e1274e7c70b6e30391f7a1f7b0a
100644
--- a/src/d8.gyp
+++ b/src/d8.gyp
@@ -33,6 +33,12 @@
'v8_enable_vtunejit%': 0,
'v8_enable_i18n_support%': 1,
},
+ 'target_defaults': {
+ 'variables': {
+ # TODO(jochen): enable warnings.
+ 'v8_deprecation_warnings': 0,
+ },
+ },
'includes': ['../build/toolchain.gypi', '../build/features.gypi'],
'targets': [
{
Index: test/cctest/cctest.gyp
diff --git a/test/cctest/cctest.gyp b/test/cctest/cctest.gyp
index
2017d61a2f4a498f23f30326897003d8c9c32d45..bf98268c21e9ec9b0108c22ba6f67be3f428f427
100644
--- a/test/cctest/cctest.gyp
+++ b/test/cctest/cctest.gyp
@@ -30,6 +30,12 @@
'v8_code': 1,
'generated_file': '<(SHARED_INTERMEDIATE_DIR)/resources.cc',
},
+ 'target_defaults': {
+ 'variables': {
+ # TODO(jochen): enable warnings.
+ 'v8_deprecation_warnings': 0,
+ },
+ },
'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
'targets': [
{
Index: tools/gyp/v8.gyp
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index
b1b9019e16a6e69fd299c0f55680e63926830dc1..ae233c6b45ab748af49bcaf802cbd2594ed6b0b9
100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -30,6 +30,12 @@
'v8_code': 1,
'v8_random_seed%': 314159265,
},
+ 'target_defaults': {
+ 'variables': {
+ # TODO(jochen): enable warnings.
+ 'v8_deprecation_warnings': 0,
+ },
+ },
'includes': ['../../build/toolchain.gypi', '../../build/features.gypi'],
'targets': [
{
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.