| 150 | } |
| 151 | |
| 152 | Runtime* Runtime::GetRuntime(int runtimeId) { |
| 153 | auto itFound = s_id2RuntimeCache.find(runtimeId); |
| 154 | auto runtime = |
| 155 | (itFound != s_id2RuntimeCache.end()) ? itFound->second : nullptr; |
| 156 | |
| 157 | if (runtime == nullptr) { |
| 158 | stringstream ss; |
| 159 | ss << "Cannot find runtime for id:" << runtimeId; |
| 160 | throw NativeScriptException(ss.str()); |
| 161 | } |
| 162 | |
| 163 | return runtime; |
| 164 | } |
| 165 | |
| 166 | Runtime* Runtime::GetRuntime(v8::Isolate* isolate) { |
| 167 | auto it = s_isolate2RuntimesCache.find(isolate); |
nothing calls this directly
no test coverage detected