| 266 | } |
| 267 | |
| 268 | StringBox V8JavaScriptContext::propertyNameToString(const JSPropertyName& propertyName) { |
| 269 | v8::HandleScope handleScope(_isolate); |
| 270 | JSExceptionTracker tracker(*this); |
| 271 | auto propertyValue = fromValdiJSPropertyName(_isolate, propertyName, tracker); |
| 272 | if (!tracker) { |
| 273 | // TODO(rjaber): Figure out the error handling here |
| 274 | return StringBox(); |
| 275 | } |
| 276 | v8::String::Utf8Value propertyValueString(_isolate, propertyValue); |
| 277 | |
| 278 | auto stringData = *propertyValueString; |
| 279 | auto stringLength = propertyValueString.length(); |
| 280 | |
| 281 | // TODO(rjaber): Find a way to avoid the copy, or move it to creation ? |
| 282 | return StringCache::getGlobal().makeString(stringData, stringLength); |
| 283 | } |
| 284 | |
| 285 | JSValueRef V8JavaScriptContext::newObject(JSExceptionTracker& exceptionTracker) { |
| 286 | v8::HandleScope handleScope(_isolate); |
no test coverage detected