| Index: src/api.cc
|
| diff --git a/src/api.cc b/src/api.cc
|
| index 0013d27e2a01fa5da5e69c4b91d4c63440a9a101..8aaa240a1ea63a74fd5323a98601110ab7f49f52 100644
|
| --- a/src/api.cc
|
| +++ b/src/api.cc
|
| @@ -1615,6 +1615,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() {
|
| i::Handle<i::Object> obj = Utils::OpenHandle(this, true);
|
| // If execution is terminating, Compile(..)->Run() requires this
|
|
|