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

Unified Diff: Source/bindings/scripts/v8_callback_interface.py

Issue 345893002: Implement an infrastructure of Blink-in-JS Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 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/scripts.gypi ('k') | Source/bindings/scripts/v8_interface.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/v8_callback_interface.py
diff --git a/Source/bindings/scripts/v8_callback_interface.py b/Source/bindings/scripts/v8_callback_interface.py
index 06c18f2b8097f5f3edffd8895c6c652bdbcd60da..671ea1de5281004bba37deb44cb39e2f5a2ef013 100644
--- a/Source/bindings/scripts/v8_callback_interface.py
+++ b/Source/bindings/scripts/v8_callback_interface.py
@@ -61,11 +61,11 @@ def cpp_type(idl_type):
return 'const String&'
if idl_type_name == 'void':
return 'void'
- # Callbacks use raw pointers, so used_as_argument=True
- usual_cpp_type = idl_type.cpp_type_args(used_as_argument=True)
- if usual_cpp_type.startswith(('Vector', 'HeapVector', 'WillBeHeapVector')):
- return 'const %s&' % usual_cpp_type
- return usual_cpp_type
+ # Callbacks use raw pointers, so used_as_raw_type=True
+ raw_cpp_type = idl_type.cpp_type_args(used_as_raw_type=True)
+ if raw_cpp_type.startswith(('Vector', 'HeapVector', 'WillBeHeapVector')):
+ return 'const %s&' % raw_cpp_type
+ return raw_cpp_type
IdlType.callback_cpp_type = property(cpp_type)
@@ -115,10 +115,6 @@ def generate_arguments_contents(arguments, call_with_this_handle):
def generate_argument(argument):
return {
'handle': '%sHandle' % argument.name,
- # FIXME: setting creation_context=v8::Handle<v8::Object>() is
- # wrong, as toV8 then implicitly uses the current context, which
- # causes leaks between isolated worlds if a different context is
- # used.
'cpp_value_to_v8_value': argument.idl_type.cpp_value_to_v8_value(
argument.name, isolate='isolate',
creation_context='m_scriptState->context()->Global()'),
« no previous file with comments | « Source/bindings/scripts/scripts.gypi ('k') | Source/bindings/scripts/v8_interface.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698