Commit 16be5bb3 authored by marja@chromium.org's avatar marja@chromium.org

Compilation API: next step of deprecations.

Remove deprecated functions and deprecated Script::GetId (which was supposed to
be deprecated, but Chrome was using it).

R=dcarney@chromium.org, svenpanne@chromium.org
BUG=

Review URL: https://codereview.chromium.org/315003003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21695 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent eb1f1843
......@@ -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();
}
};
......@@ -1046,8 +1031,7 @@ class V8_EXPORT ScriptCompiler {
};
/**
* Source code which can be then compiled to a UnboundScript or
* BoundScript.
* Source code which can be then compiled to a UnboundScript or Script.
*/
class Source {
public:
......
......@@ -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());
}
......
......@@ -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);
}
......
......@@ -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;
......
......@@ -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());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment