*/
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();
}
};
};
/**
- * 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:
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());
}
}
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());
}
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);
}
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;
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());
}