Index: src/accessors.cc |
diff --git a/src/accessors.cc b/src/accessors.cc |
index 54bd241b8d639fe70e8d82cc826e48b52477b5c4..5a4e96d036c42b1ee0e631336168346adbcd75a6 100644 |
--- a/src/accessors.cc |
+++ b/src/accessors.cc |
@@ -587,6 +587,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* source = Script::cast(JSValue::cast(object)->value())->source_url(); |
yurys
2014/06/10 09:28:47
source -> url
marja
2014/06/10 13:46:08
Done.
|
+ info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(source, 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* source = |
yurys
2014/06/10 09:28:47
ditto
marja
2014/06/10 13:46:09
Done.
|
+ Script::cast(JSValue::cast(object)->value())->source_mapping_url(); |
+ info.GetReturnValue().Set(Utils::ToLocal(Handle<Object>(source, 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 |
// |