| 57 | } |
| 58 | |
| 59 | void Script::Initialize(IHTMLDocument2* document, |
| 60 | const std::wstring& script_source, |
| 61 | const unsigned long argument_count) { |
| 62 | LOG(TRACE) << "Entering Script::Initialize"; |
| 63 | |
| 64 | this->script_engine_host_ = document; |
| 65 | this->source_code_ = script_source; |
| 66 | this->argument_count_ = argument_count; |
| 67 | this->current_arg_index_ = 0; |
| 68 | |
| 69 | // Calling vector::resize() is okay here, because the vector |
| 70 | // should be empty when Initialize() is called, and the |
| 71 | // reallocation of variants shouldn't give us too much of a |
| 72 | // negative impact. |
| 73 | this->argument_array_.resize(this->argument_count_); |
| 74 | } |
| 75 | |
| 76 | void Script::AddArgument(const std::string& argument) { |
| 77 | LOG(TRACE) << "Entering Script::AddArgument(std::string)"; |
no test coverage detected