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

Unified Diff: Source/bindings/scripts/unstable/v8_attributes.py

Issue 141523002: Add null-correctness checking to [StrictTypeChecking] methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Last test Created 6 years, 11 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 | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/unstable/v8_attributes.py
diff --git a/Source/bindings/scripts/unstable/v8_attributes.py b/Source/bindings/scripts/unstable/v8_attributes.py
index fbd00a82da01d8108406362c791e5d7ca17dce39..919835ac8f8f481d462a9ca39316ed59bb0d3958 100644
--- a/Source/bindings/scripts/unstable/v8_attributes.py
+++ b/Source/bindings/scripts/unstable/v8_attributes.py
@@ -170,7 +170,11 @@ def generate_getter(interface, attribute, contents):
v8_set_return_value_statement = 'v8SetReturnValue(info, wrapper)'
includes.add('bindings/v8/V8HiddenPropertyName.h')
else:
- v8_set_return_value_statement = v8_types.v8_set_return_value(idl_type, cpp_value, extended_attributes=extended_attributes, script_wrappable='imp')
+ if attribute.is_nullable and v8_types.is_interface_type(idl_type):
+ set_cpp_value = 'jsValue.release()'
+ else:
+ set_cpp_value = cpp_value
+ v8_set_return_value_statement = v8_types.v8_set_return_value(idl_type, set_cpp_value, extended_attributes=extended_attributes, script_wrappable='imp')
contents.update({
'cpp_value': cpp_value,
« no previous file with comments | « Source/bindings/scripts/code_generator_v8.pm ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698