Rev 1741 | Rev 1940 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1741 | Rev 1898 | ||
|---|---|---|---|
| Line 79... | Line 79... | ||
| 79 | { |
79 | { |
| 80 | v8::Locker lock; |
80 | v8::Locker lock; |
| 81 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
81 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
| 82 | v8::HandleScope handle_scope; |
82 | v8::HandleScope handle_scope; |
| 83 | 83 | ||
| 84 |
|
84 | LOG.Debug(std::string(__FUNCTION__) + " called!"); |
| 85 | 85 | ||
| 86 | ArgumentListPointer arguments = ArgumentListPointer(new ArgumentList); |
86 | ArgumentListPointer arguments = ArgumentListPointer(new ArgumentList); |
| 87 | arguments->push_back(v8::Integer::New(client_id)); |
87 | arguments->push_back(v8::Integer::New(client_id)); |
| 88 | arguments->push_back(v8::String::New(data.ToCharString().data())); |
88 | arguments->push_back(v8::String::New(data.ToCharString().data())); |
| 89 | 89 | ||
| Line 94... | Line 94... | ||
| 94 | { |
94 | { |
| 95 | v8::Locker lock; |
95 | v8::Locker lock; |
| 96 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
96 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
| 97 | v8::HandleScope handle_scope; |
97 | v8::HandleScope handle_scope; |
| 98 | 98 | ||
| 99 |
|
99 | LOG.Debug(std::string(__FUNCTION__) + " called!"); |
| 100 | 100 | ||
| 101 | ArgumentListPointer arguments = ArgumentListPointer(new ArgumentList); |
101 | ArgumentListPointer arguments = ArgumentListPointer(new ArgumentList); |
| 102 | arguments->push_back(v8::Integer::New(client_id)); |
102 | arguments->push_back(v8::Integer::New(client_id)); |
| 103 | arguments->push_back(v8::Uint32::New((unsigned int)client_state)); |
103 | arguments->push_back(v8::Uint32::New((unsigned int)client_state)); |
| 104 | 104 | ||
| Line 109... | Line 109... | ||
| 109 | { |
109 | { |
| 110 | v8::Locker lock; |
110 | v8::Locker lock; |
| 111 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
111 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
| 112 | v8::HandleScope handle_scope; |
112 | v8::HandleScope handle_scope; |
| 113 | 113 | ||
| 114 |
|
114 | LOG.Debug(std::string(__FUNCTION__) + " called!"); |
| 115 | 115 | ||
| 116 | if (args.Length() < 2) |
116 | if (args.Length() < 2) |
| 117 | { |
117 | { |
| 118 | LOG.Error(std::string(__FUNCTION__) + ": To few arguments."); |
118 | LOG.Error(std::string(__FUNCTION__) + ": To few arguments."); |
| 119 | return handle_scope.Close(v8::Boolean::New(false)); |
119 | return handle_scope.Close(v8::Boolean::New(false)); |
| Line 130... | Line 130... | ||
| 130 | { |
130 | { |
| 131 | v8::Locker lock; |
131 | v8::Locker lock; |
| 132 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
132 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
| 133 | v8::HandleScope handle_scope; |
133 | v8::HandleScope handle_scope; |
| 134 | 134 | ||
| 135 |
|
135 | LOG.Debug(std::string(__FUNCTION__) + " called!"); |
| 136 | 136 | ||
| 137 | if (args.Length() < 1) |
137 | if (args.Length() < 1) |
| 138 | { |
138 | { |
| 139 | LOG.Error(std::string(__FUNCTION__) + ": To few arguments."); |
139 | LOG.Error(std::string(__FUNCTION__) + ": To few arguments."); |
| 140 | return handle_scope.Close(v8::Boolean::New(false)); |
140 | return handle_scope.Close(v8::Boolean::New(false)); |
| Line 149... | Line 149... | ||
| 149 | { |
149 | { |
| 150 | v8::Locker lock; |
150 | v8::Locker lock; |
| 151 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
151 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
| 152 | v8::HandleScope handle_scope; |
152 | v8::HandleScope handle_scope; |
| 153 | 153 | ||
| 154 |
|
154 | LOG.Debug(std::string(__FUNCTION__) + " called!"); |
| 155 | 155 | ||
| 156 | if (args.Length() < 2) |
156 | if (args.Length() < 2) |
| 157 | { |
157 | { |
| 158 | LOG.Error(std::string(__FUNCTION__) + ": To few arguments."); |
158 | LOG.Error(std::string(__FUNCTION__) + ": To few arguments."); |
| 159 | return handle_scope.Close(v8::Boolean::New(false)); |
159 | return handle_scope.Close(v8::Boolean::New(false)); |