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

Side by Side Diff: Source/bindings/scripts/v8_types.py

Issue 698023005: Move the v8::Isolate* parameter to the first parameter of various binding methods in third_party/We… (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 'unsigned long': 'toUInt32({arguments})', 470 'unsigned long': 'toUInt32({arguments})',
471 'long long': 'toInt64({arguments})', 471 'long long': 'toInt64({arguments})',
472 'unsigned long long': 'toUInt64({arguments})', 472 'unsigned long long': 'toUInt64({arguments})',
473 # Interface types 473 # Interface types
474 'Dictionary': 'Dictionary({v8_value}, {isolate})', 474 'Dictionary': 'Dictionary({v8_value}, {isolate})',
475 'EventTarget': 'V8DOMWrapper::isDOMWrapper({v8_value}) ? toWrapperTypeInfo(v 8::Handle<v8::Object>::Cast({v8_value}))->toEventTarget(v8::Handle<v8::Object>:: Cast({v8_value})) : 0', 475 'EventTarget': 'V8DOMWrapper::isDOMWrapper({v8_value}) ? toWrapperTypeInfo(v 8::Handle<v8::Object>::Cast({v8_value}))->toEventTarget(v8::Handle<v8::Object>:: Cast({v8_value})) : 0',
476 'NodeFilter': 'toNodeFilter({v8_value}, info.Holder(), ScriptState::current( {isolate}))', 476 'NodeFilter': 'toNodeFilter({v8_value}, info.Holder(), ScriptState::current( {isolate}))',
477 'Promise': 'ScriptPromise::cast(ScriptState::current({isolate}), {v8_value}) ', 477 'Promise': 'ScriptPromise::cast(ScriptState::current({isolate}), {v8_value}) ',
478 'SerializedScriptValue': 'SerializedScriptValue::create({v8_value}, 0, 0, ex ceptionState, {isolate})', 478 'SerializedScriptValue': 'SerializedScriptValue::create({v8_value}, 0, 0, ex ceptionState, {isolate})',
479 'ScriptValue': 'ScriptValue(ScriptState::current({isolate}), {v8_value})', 479 'ScriptValue': 'ScriptValue(ScriptState::current({isolate}), {v8_value})',
480 'Window': 'toDOMWindow({v8_value}, {isolate})', 480 'Window': 'toDOMWindow({isolate}, {v8_value})',
481 'XPathNSResolver': 'toXPathNSResolver({isolate}, {v8_value})', 481 'XPathNSResolver': 'toXPathNSResolver({isolate}, {v8_value})',
482 } 482 }
483 483
484 484
485 def v8_conversion_needs_exception_state(idl_type): 485 def v8_conversion_needs_exception_state(idl_type):
486 return (idl_type.is_numeric_type or 486 return (idl_type.is_numeric_type or
487 idl_type.is_dictionary or 487 idl_type.is_dictionary or
488 idl_type.name in ('ByteString', 'USVString', 'SerializedScriptValue' )) 488 idl_type.name in ('ByteString', 'USVString', 'SerializedScriptValue' ))
489 489
490 IdlType.v8_conversion_needs_exception_state = property(v8_conversion_needs_excep tion_state) 490 IdlType.v8_conversion_needs_exception_state = property(v8_conversion_needs_excep tion_state)
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 number_of_nullable_member_types_union) 914 number_of_nullable_member_types_union)
915 915
916 916
917 def includes_nullable_type_union(idl_type): 917 def includes_nullable_type_union(idl_type):
918 # http://heycam.github.io/webidl/#dfn-includes-a-nullable-type 918 # http://heycam.github.io/webidl/#dfn-includes-a-nullable-type
919 return idl_type.number_of_nullable_member_types == 1 919 return idl_type.number_of_nullable_member_types == 1
920 920
921 IdlTypeBase.includes_nullable_type = False 921 IdlTypeBase.includes_nullable_type = False
922 IdlNullableType.includes_nullable_type = True 922 IdlNullableType.includes_nullable_type = True
923 IdlUnionType.includes_nullable_type = property(includes_nullable_type_union) 923 IdlUnionType.includes_nullable_type = property(includes_nullable_type_union)
OLDNEW
« no previous file with comments | « Source/bindings/core/v8/custom/V8XMLHttpRequestCustom.cpp ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698