Reviewers: Sven Panne,
Message:
svenpanne@, ptal
Description:
Compilation API: next step of deprecations.
Remove deprecated functions and deprecated Script::GetId (which was
supposed to
be deprecated, but Chrome was using it).
[email protected]
BUG=
Please review this at https://codereview.chromium.org/315003003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+12, -27 lines):
M include/v8.h
M test/cctest/test-api.cc
M test/cctest/test-cpu-profiler.cc
M test/cctest/test-debug.cc
M test/cctest/test-profile-generator.cc
Index: include/v8.h
diff --git a/include/v8.h b/include/v8.h
index
0fd196bacbfb8046fb7164cb63d182bd6e0d36fa..6bfb5cfeab8b400654d4c1d332915ef871da6da3
100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -984,24 +984,9 @@ class V8_EXPORT Script {
*/
Local<UnboundScript> GetUnboundScript();
- // To be deprecated; use GetUnboundScript()->GetId();
- int GetId() {
- return GetUnboundScript()->GetId();
- }
-
- // Use GetUnboundScript()->GetId();
V8_DEPRECATED("Use GetUnboundScript()->GetId()",
- Handle<Value> GetScriptName()) {
- return GetUnboundScript()->GetScriptName();
- }
-
- /**
- * Returns zero based line number of the code_pos location in the script.
- * -1 will be returned if no information available.
- */
- V8_DEPRECATED("Use GetUnboundScript()->GetLineNumber()",
- int GetLineNumber(int code_pos)) {
- return GetUnboundScript()->GetLineNumber(code_pos);
+ int GetId()) {
+ return GetUnboundScript()->GetId();
}
};
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index
3ce54cf574cad7a83e3bffb9c8d3310a0d6c6720..1241f4d26c80d6ae96c839d12e1c3b5935114a00
100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -17545,7 +17545,7 @@ TEST(ScriptIdInStackTrace) {
script->Run();
for (int i = 0; i < 2; i++) {
CHECK(scriptIdInStack[i] != v8::Message::kNoScriptIdInfo);
- CHECK_EQ(scriptIdInStack[i], script->GetId());
+ CHECK_EQ(scriptIdInStack[i], script->GetUnboundScript()->GetId());
}
}
@@ -18476,8 +18476,8 @@ THREADED_TEST(FunctionGetScriptId) {
env->Global()->Get(v8::String::NewFromUtf8(isolate, "foo")));
v8::Local<v8::Function> bar = v8::Local<v8::Function>::Cast(
env->Global()->Get(v8::String::NewFromUtf8(isolate, "bar")));
- CHECK_EQ(script->GetId(), foo->ScriptId());
- CHECK_EQ(script->GetId(), bar->ScriptId());
+ CHECK_EQ(script->GetUnboundScript()->GetId(), foo->ScriptId());
+ CHECK_EQ(script->GetUnboundScript()->GetId(), bar->ScriptId());
}
Index: test/cctest/test-cpu-profiler.cc
diff --git a/test/cctest/test-cpu-profiler.cc
b/test/cctest/test-cpu-profiler.cc
index
fca8ce84b082aaae25a997e4d41cb2b984d3c617..61e4f3f129a34f0ad3b8e2b9694ae8855ce4162d
100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -1623,16 +1623,16 @@ TEST(FunctionDetails) {
ProfileGenerator::kAnonymousFunctionName);
CheckFunctionDetails(env->GetIsolate(), script,
ProfileGenerator::kAnonymousFunctionName, "script_b",
- script_b->GetId(), 1, 1);
+ script_b->GetUnboundScript()->GetId(), 1, 1);
const v8::CpuProfileNode* baz = GetChild(env->GetIsolate(),
script, "baz");
CheckFunctionDetails(env->GetIsolate(), baz, "baz", "script_b",
- script_b->GetId(), 3, 16);
+ script_b->GetUnboundScript()->GetId(), 3, 16);
const v8::CpuProfileNode* foo = GetChild(env->GetIsolate(), baz, "foo");
CheckFunctionDetails(env->GetIsolate(), foo, "foo", "script_a",
- script_a->GetId(), 2, 1);
+ script_a->GetUnboundScript()->GetId(), 2, 1);
const v8::CpuProfileNode* bar = GetChild(env->GetIsolate(), foo, "bar");
CheckFunctionDetails(env->GetIsolate(), bar, "bar", "script_a",
- script_a->GetId(), 3, 14);
+ script_a->GetUnboundScript()->GetId(), 3, 14);
}
Index: test/cctest/test-debug.cc
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc
index
b5641638d63a5e827a2b4e6ebab5019eef990c18..ce2c7072b748970ddac4a585f10f279e815d8a78
100644
--- a/test/cctest/test-debug.cc
+++ b/test/cctest/test-debug.cc
@@ -1638,7 +1638,7 @@ TEST(ScriptBreakPointByIdThroughJavaScript) {
env->Global()->Get(v8::String::NewFromUtf8(env->GetIsolate(), "g")));
// Get the script id knowing that internally it is a 32 integer.
- int script_id = script->GetId();
+ int script_id = script->GetUnboundScript()->GetId();
// Call f and g without break points.
break_point_hit_count = 0;
Index: test/cctest/test-profile-generator.cc
diff --git a/test/cctest/test-profile-generator.cc
b/test/cctest/test-profile-generator.cc
index
c137e05fea7b975fcb94adbb2e9531b3d1bc2a19..865a42ed1112be6857bcc5abe9e5c696209aa111
100644
--- a/test/cctest/test-profile-generator.cc
+++ b/test/cctest/test-profile-generator.cc
@@ -662,11 +662,11 @@ TEST(ProfileNodeScriptId) {
current = PickChild(current, "b");
CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current));
- CHECK_EQ(script_b->GetId(), current->GetScriptId());
+ CHECK_EQ(script_b->GetUnboundScript()->GetId(), current->GetScriptId());
current = PickChild(current, "a");
CHECK_NE(NULL, const_cast<v8::CpuProfileNode*>(current));
- CHECK_EQ(script_a->GetId(), current->GetScriptId());
+ CHECK_EQ(script_a->GetUnboundScript()->GetId(), current->GetScriptId());
}
--
--
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/d/optout.