|
361 | 361 | } else if (owner->tag == "style") { |
362 | 362 | append_node_text(*owner, source); |
363 | 363 | } |
364 | | - info.GetReturnValue().Set(js_string(info.GetIsolate(), source)); |
| 364 | + info.GetReturnValue().Set(js_string(info.GetIsolate(), source.c_str())); |
365 | 365 | } |
366 | 366 |
|
367 | 367 | static void load_style_sheet_import( |
|
390 | 390 | } |
391 | 391 | auto result = v8::Object::New(info.GetIsolate()); |
392 | 392 | result->Set(local_context, js_string(info.GetIsolate(), "source"), |
393 | | - js_string(info.GetIsolate(), source)).Check(); |
| 393 | + js_string(info.GetIsolate(), source.c_str())).Check(); |
394 | 394 | result->Set(local_context, js_string(info.GetIsolate(), "url"), |
395 | | - js_string(info.GetIsolate(), resolved)).Check(); |
| 395 | + js_string(info.GetIsolate(), resolved.c_str())).Check(); |
396 | 396 | info.GetReturnValue().Set(result); |
397 | 397 | } |
398 | 398 |
|
|
425 | 425 | } |
426 | 426 | } |
427 | 427 | result->Set(local_context, js_string(isolate, "href"), |
428 | | - node.tag == "link" ? js_string(isolate, base_address).As<v8::Value>() |
| 428 | + node.tag == "link" ? js_string(isolate, base_address.c_str()).As<v8::Value>() |
429 | 429 | : v8::Null(isolate).As<v8::Value>()).Check(); |
430 | 430 | result->Set(local_context, js_string(isolate, "title"), |
431 | 431 | node.attributes.contains("title") |
432 | | - ? js_string(isolate, node.attributes.at("title")).As<v8::Value>() |
| 432 | + ? js_string(isolate, node.attributes.at("title").c_str()).As<v8::Value>() |
433 | 433 | : v8::Null(isolate).As<v8::Value>()).Check(); |
434 | 434 | result->DefineOwnProperty( |
435 | 435 | local_context, |
436 | 436 | js_string(isolate, "__webSceneBaseURL"), |
437 | | - js_string(isolate, base_address), |
| 437 | + js_string(isolate, base_address.c_str()), |
438 | 438 | static_cast<v8::PropertyAttribute>( |
439 | 439 | v8::DontEnum | v8::DontDelete | v8::ReadOnly)).Check(); |
440 | 440 | result->DefineOwnProperty( |
|
1114 | 1114 | }); |
1115 | 1115 | } |
1116 | 1116 |
|
1117 | | - const std::string& effective_document_base(dom_node* root) |
| 1117 | + const std::string& effective_document_base(const dom_node* root) |
1118 | 1118 | { |
1119 | 1119 | if (root == nullptr) root = &document.body(); |
1120 | 1120 | auto [found, inserted] = document_base_caches.try_emplace(root); |
|
0 commit comments