Index: src/accessors.cc |
diff --git a/src/accessors.cc b/src/accessors.cc |
index 836b4f58e8420c9d8a95d909209990d746ae7b97..6ade56aaee7ad3d1eb09240194b44d4d5e7d3da7 100644 |
--- a/src/accessors.cc |
+++ b/src/accessors.cc |
@@ -586,6 +586,77 @@ Handle<AccessorInfo> Accessors::ScriptLineEndsInfo( |
// |
+// Accessors::ScriptSourceUrl |
+// |
+ |
+ |
+void Accessors::ScriptSourceUrlGetter( |
+ v8::Local<v8::String> name, |
+ const v8::PropertyCallbackInfo<v8::Value>& info) { |
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); |
+ DisallowHeapAllocation no_allocation; |
+ HandleScope scope(isolate); |
+ Object* object = *Utils::OpenHandle(*info.This()); |
+ Object* url = Script::cast(JSValue::cast(object)->value())->source_url(); |
+ info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(url, isolate))); |
+} |
+ |
+ |
+void Accessors::ScriptSourceUrlSetter( |
+ v8::Local<v8::String> name, |
+ v8::Local<v8::Value> value, |
+ const v8::PropertyCallbackInfo<void>& info) { |
+ UNREACHABLE(); |
+} |
+ |
+ |
+Handle<AccessorInfo> Accessors::ScriptSourceUrlInfo( |
+ Isolate* isolate, PropertyAttributes attributes) { |
+ return MakeAccessor(isolate, |
+ isolate->factory()->source_url_string(), |
+ &ScriptSourceUrlGetter, |
+ &ScriptSourceUrlSetter, |
+ attributes); |
+} |
+ |
+ |
+// |
+// Accessors::ScriptSourceMappingUrl |
+// |
+ |
+ |
+void Accessors::ScriptSourceMappingUrlGetter( |
+ v8::Local<v8::String> name, |
+ const v8::PropertyCallbackInfo<v8::Value>& info) { |
+ i::Isolate* isolate = reinterpret_cast<i::Isolate*>(info.GetIsolate()); |
+ DisallowHeapAllocation no_allocation; |
+ HandleScope scope(isolate); |
+ Object* object = *Utils::OpenHandle(*info.This()); |
+ Object* url = |
+ Script::cast(JSValue::cast(object)->value())->source_mapping_url(); |
+ info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(url, isolate))); |
+} |
+ |
+ |
+void Accessors::ScriptSourceMappingUrlSetter( |
+ v8::Local<v8::String> name, |
+ v8::Local<v8::Value> value, |
+ const v8::PropertyCallbackInfo<void>& info) { |
+ UNREACHABLE(); |
+} |
+ |
+ |
+Handle<AccessorInfo> Accessors::ScriptSourceMappingUrlInfo( |
+ Isolate* isolate, PropertyAttributes attributes) { |
+ return MakeAccessor(isolate, |
+ isolate->factory()->source_mapping_url_string(), |
+ &ScriptSourceMappingUrlGetter, |
+ &ScriptSourceMappingUrlSetter, |
+ attributes); |
+} |
+ |
+ |
+// |
// Accessors::ScriptGetContextData |
// |