Rev 1741 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1741 | Rev 2081 | ||
|---|---|---|---|
| Line 89... | Line 89... | ||
| 89 | { |
89 | { |
| 90 | v8::Locker lock; |
90 | v8::Locker lock; |
| 91 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
91 | v8::Context::Scope context_scope(vm::Manager::Instance()->GetContext()); |
| 92 | v8::HandleScope handle_scope; |
92 | v8::HandleScope handle_scope; |
| 93 | 93 | ||
| 94 |
|
94 | LOG.Debug(std::string(__FUNCTION__) + " called!"); |
| 95 | 95 | ||
| 96 | ArgumentListPointer arguments = ArgumentListPointer(new ArgumentList); |
96 | ArgumentListPointer arguments = ArgumentListPointer(new ArgumentList); |
| 97 | 97 | ||
| 98 | arguments->push_back(v8::String::New(full_id.data())); |
98 | arguments->push_back(v8::String::New(full_id.data())); |
| 99 | arguments->push_back(v8::String::New(command.data())); |
99 | arguments->push_back(v8::String::New(command.data())); |
| - | 100 | LOG.Debug("Fullid:" + full_id); |
|
| - | 101 | LOG.Debug("command:" + command); |
|
| 100 | 102 | ||
| 101 | v8::Local<v8::Array> vars = v8::Array::New(variables.size()); |
103 | v8::Local<v8::Array> vars = v8::Array::New(variables.size()); |
| 102 | 104 | ||
| 103 | for (common::StringMap::iterator it = variables.begin(); it != variables.end(); it++) |
105 | for (common::StringMap::iterator it = variables.begin(); it != variables.end(); it++) |
| 104 | { |
106 | { |
| 105 | vars->Set(v8::String::New(it->first.data()), v8::String::New(it->second.data())); |
107 | vars->Set(v8::String::New(it->first.data()), v8::String::New(it->second.data())); |
| - | 108 | LOG.Debug(it->first + "=" + it->second); |
|
| 106 | } |
109 | } |
| 107 | 110 | ||
| 108 | arguments->push_back(vars); |
111 | arguments->push_back(vars); |
| 109 | 112 | ||
| 110 | this->Call(0, "Module_OnMessage", arguments); |
113 | this->Call(0, "Module_OnMessage", arguments); |