Rev 1679 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1679 | Rev 1740 | ||
|---|---|---|---|
| Line 62... | Line 62... | ||
| 62 | LOG.Info(output); |
62 | LOG.Info(output); |
| 63 | } |
63 | } |
| 64 | 64 | ||
| 65 | Value System::Export_Require(const v8::Arguments& args) |
65 | Value System::Export_Require(const v8::Arguments& args) |
| 66 | { |
66 | { |
| - | 67 | v8::Locker lock; |
|
| 67 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
68 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
| 68 | 69 | ||
| 69 | //LOG.Debug(std::string(__FUNCTION__) + " called!"); |
70 | //LOG.Debug(std::string(__FUNCTION__) + " called!"); |
| 70 | 71 | ||
| 71 | if (args.Length() < 1) |
72 | if (args.Length() < 1) |
| Line 79... | Line 80... | ||
| 79 | return v8::Boolean::New(Manager::Instance()->LoadScript(*str)); |
80 | return v8::Boolean::New(Manager::Instance()->LoadScript(*str)); |
| 80 | } |
81 | } |
| 81 | 82 | ||
| 82 | Value System::Export_Execute(const v8::Arguments& args) |
83 | Value System::Export_Execute(const v8::Arguments& args) |
| 83 | { |
84 | { |
| - | 85 | v8::Locker lock; |
|
| 84 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
86 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
| 85 | 87 | ||
| 86 | //LOG.Debug(std::string(__FUNCTION__) + " called!"); |
88 | //LOG.Debug(std::string(__FUNCTION__) + " called!"); |
| 87 | 89 | ||
| 88 | if (args.Length() < 1) |
90 | if (args.Length() < 1) |
| Line 117... | Line 119... | ||
| 117 | return v8::String::New(output_buffer.data()); |
119 | return v8::String::New(output_buffer.data()); |
| 118 | } |
120 | } |
| 119 | 121 | ||
| 120 | Value System::Export_ToHex(const v8::Arguments& args) |
122 | Value System::Export_ToHex(const v8::Arguments& args) |
| 121 | { |
123 | { |
| - | 124 | v8::Locker lock; |
|
| 122 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
125 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
| 123 | 126 | ||
| 124 | //LOG.Debug(std::string(__FUNCTION__) + " called!"); |
127 | //LOG.Debug(std::string(__FUNCTION__) + " called!"); |
| 125 | 128 | ||
| 126 | if (args.Length() < 1) |
129 | if (args.Length() < 1) |
| Line 132... | Line 135... | ||
| 132 | return v8::String::New(common::ToHex(args[0]->Uint32Value()).data()); |
135 | return v8::String::New(common::ToHex(args[0]->Uint32Value()).data()); |
| 133 | } |
136 | } |
| 134 | 137 | ||
| 135 | Value System::Export_Version(const v8::Arguments& args) |
138 | Value System::Export_Version(const v8::Arguments& args) |
| 136 | { |
139 | { |
| - | 140 | v8::Locker lock; |
|
| 137 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
141 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
| 138 | return v8::String::New(VERSION); |
142 | return v8::String::New(VERSION); |
| 139 | } |
143 | } |
| 140 | 144 | ||
| 141 | Value System::Export_License(const v8::Arguments& args) |
145 | Value System::Export_License(const v8::Arguments& args) |
| 142 | { |
146 | { |
| - | 147 | v8::Locker lock; |
|
| 143 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
148 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
| 144 | return v8::String::New(LICENSE); |
149 | return v8::String::New(LICENSE); |
| 145 | } |
150 | } |
| 146 | 151 | ||
| 147 | }; // namespace plugin |
152 | }; // namespace plugin |