| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index cfd952ecb2fb907d7e1783e58c78e18a8f9e88d6..767f9421d906194db4106756a6d26b0970d2f5a1 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -1631,6 +1631,38 @@ Handle<Value> UnboundScript::GetScriptName() {
|
| }
|
|
|
|
|
| +Handle<Value> UnboundScript::GetSourceURL() {
|
| + i::Handle<i::SharedFunctionInfo> obj =
|
| + i::Handle<i::SharedFunctionInfo>::cast(Utils::OpenHandle(this));
|
| + i::Isolate* isolate = obj->GetIsolate();
|
| + ON_BAILOUT(isolate, "v8::UnboundScript::GetSourceURL()",
|
| + return Handle<String>());
|
| + LOG_API(isolate, "UnboundScript::GetSourceURL");
|
| + if (obj->script()->IsScript()) {
|
| + i::Object* url = i::Script::cast(obj->script())->source_url();
|
| + return Utils::ToLocal(i::Handle<i::Object>(url, isolate));
|
| + } else {
|
| + return Handle<String>();
|
| + }
|
| +}
|
| +
|
| +
|
| +Handle<Value> UnboundScript::GetSourceMappingURL() {
|
| + i::Handle<i::SharedFunctionInfo> obj =
|
| + i::Handle<i::SharedFunctionInfo>::cast(Utils::OpenHandle(this));
|
| + i::Isolate* isolate = obj->GetIsolate();
|
| + ON_BAILOUT(isolate, "v8::UnboundScript::GetSourceMappingURL()",
|
| + return Handle<String>());
|
| + LOG_API(isolate, "UnboundScript::GetSourceMappingURL");
|
| + if (obj->script()->IsScript()) {
|
| + i::Object* url = i::Script::cast(obj->script())->source_mapping_url();
|
| + return Utils::ToLocal(i::Handle<i::Object>(url, isolate));
|
| + } else {
|
| + return Handle<String>();
|
| + }
|
| +}
|
| +
|
| +
|
| Local<Value> Script::Run() {
|
| // If execution is terminating, Compile(..)->Run() requires this
|
| // check.
|
|
|