Index: src/api.cc |
=================================================================== |
--- src/api.cc (revision 9927) |
+++ src/api.cc (working copy) |
@@ -3619,6 +3619,23 @@ |
} |
+int Function::GetScriptColumnNumber() const { |
+ i::Handle<i::JSFunction> func = Utils::OpenHandle(this); |
+ if (func->shared()->script()->IsScript()) { |
+ i::Handle<i::Script> script(i::Script::cast(func->shared()->script())); |
+ return i::GetScriptColumnNumber(script, func->shared()->start_position()); |
+ } |
+ return kLineOffsetNotFound; |
+} |
+ |
+Handle<Value> Function::GetScriptId() const { |
+ i::Handle<i::JSFunction> func = Utils::OpenHandle(this); |
+ if (!func->shared()->script()->IsScript()) |
+ return v8::Undefined(); |
+ i::Handle<i::Script> script(i::Script::cast(func->shared()->script())); |
+ return Utils::ToLocal(i::Handle<i::Object>(script->id())); |
+} |
+ |
int String::Length() const { |
i::Handle<i::String> str = Utils::OpenHandle(this); |
if (IsDeadCheck(str->GetIsolate(), "v8::String::Length()")) return 0; |