Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(633)

Unified Diff: third_party/WebKit/Source/bindings/scripts/v8_types.py

Issue 2897603003: Get and return String by const-ref if used as rvalue (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/results/core/BooleanOrStringOrUnrestrictedDouble.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/bindings/scripts/v8_types.py
diff --git a/third_party/WebKit/Source/bindings/scripts/v8_types.py b/third_party/WebKit/Source/bindings/scripts/v8_types.py
index 121779c8e03990b59f938dd13e26cedbbe985233..aa23c402ca828d8f11a73963ebb78d2666deab3e 100644
--- a/third_party/WebKit/Source/bindings/scripts/v8_types.py
+++ b/third_party/WebKit/Source/bindings/scripts/v8_types.py
@@ -201,7 +201,7 @@ def cpp_type(idl_type, extended_attributes=None, raw_type=False, used_as_rvalue_
return ('PassRefPtr<%s>' if used_as_rvalue_type else 'RefPtr<%s>') % base_idl_type
if idl_type.is_string_type:
if not raw_type:
- return 'String'
+ return 'const String&' if used_as_rvalue_type else 'String'
return 'V8StringResource<%s>' % string_mode()
if base_idl_type == 'ArrayBufferView' and 'FlexibleArrayBufferView' in extended_attributes:
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/tests/results/core/BooleanOrStringOrUnrestrictedDouble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698