OLD | NEW |
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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 'long long': 'toInt64({arguments})', | 466 'long long': 'toInt64({arguments})', |
467 'unsigned long long': 'toUInt64({arguments})', | 467 'unsigned long long': 'toUInt64({arguments})', |
468 # Interface types | 468 # Interface types |
469 'Dictionary': 'Dictionary({v8_value}, {isolate})', | 469 'Dictionary': 'Dictionary({v8_value}, {isolate})', |
470 'EventTarget': 'V8DOMWrapper::isDOMWrapper({v8_value}) ? toWrapperTypeInfo(v
8::Handle<v8::Object>::Cast({v8_value}))->toEventTarget(v8::Handle<v8::Object>::
Cast({v8_value})) : 0', | 470 'EventTarget': 'V8DOMWrapper::isDOMWrapper({v8_value}) ? toWrapperTypeInfo(v
8::Handle<v8::Object>::Cast({v8_value}))->toEventTarget(v8::Handle<v8::Object>::
Cast({v8_value})) : 0', |
471 'NodeFilter': 'toNodeFilter({v8_value}, info.Holder(), ScriptState::current(
{isolate}))', | 471 'NodeFilter': 'toNodeFilter({v8_value}, info.Holder(), ScriptState::current(
{isolate}))', |
472 'Promise': 'ScriptPromise::cast(ScriptState::current({isolate}), {v8_value})
', | 472 'Promise': 'ScriptPromise::cast(ScriptState::current({isolate}), {v8_value})
', |
473 'SerializedScriptValue': 'SerializedScriptValue::create({v8_value}, 0, 0, ex
ceptionState, {isolate})', | 473 'SerializedScriptValue': 'SerializedScriptValue::create({v8_value}, 0, 0, ex
ceptionState, {isolate})', |
474 'ScriptValue': 'ScriptValue(ScriptState::current({isolate}), {v8_value})', | 474 'ScriptValue': 'ScriptValue(ScriptState::current({isolate}), {v8_value})', |
475 'Window': 'toDOMWindow({v8_value}, {isolate})', | 475 'Window': 'toDOMWindow({v8_value}, {isolate})', |
476 'XPathNSResolver': 'toXPathNSResolver({v8_value}, {isolate})', | 476 'XPathNSResolver': 'toXPathNSResolver({isolate}, {v8_value})', |
477 } | 477 } |
478 | 478 |
479 | 479 |
480 def v8_conversion_needs_exception_state(idl_type): | 480 def v8_conversion_needs_exception_state(idl_type): |
481 return (idl_type.is_numeric_type or | 481 return (idl_type.is_numeric_type or |
482 idl_type.is_dictionary or | 482 idl_type.is_dictionary or |
483 idl_type.name in ('ByteString', 'USVString', 'SerializedScriptValue'
)) | 483 idl_type.name in ('ByteString', 'USVString', 'SerializedScriptValue'
)) |
484 | 484 |
485 IdlType.v8_conversion_needs_exception_state = property(v8_conversion_needs_excep
tion_state) | 485 IdlType.v8_conversion_needs_exception_state = property(v8_conversion_needs_excep
tion_state) |
486 IdlArrayOrSequenceType.v8_conversion_needs_exception_state = True | 486 IdlArrayOrSequenceType.v8_conversion_needs_exception_state = True |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 | 879 |
880 | 880 |
881 def is_explicit_nullable(idl_type): | 881 def is_explicit_nullable(idl_type): |
882 # Nullable type that isn't implicit nullable (see above.) For such types, | 882 # Nullable type that isn't implicit nullable (see above.) For such types, |
883 # we use Nullable<T> or similar explicit ways to represent a null value. | 883 # we use Nullable<T> or similar explicit ways to represent a null value. |
884 return idl_type.is_nullable and not idl_type.is_implicit_nullable | 884 return idl_type.is_nullable and not idl_type.is_implicit_nullable |
885 | 885 |
886 IdlTypeBase.is_implicit_nullable = property(is_implicit_nullable) | 886 IdlTypeBase.is_implicit_nullable = property(is_implicit_nullable) |
887 IdlUnionType.is_implicit_nullable = False | 887 IdlUnionType.is_implicit_nullable = False |
888 IdlTypeBase.is_explicit_nullable = property(is_explicit_nullable) | 888 IdlTypeBase.is_explicit_nullable = property(is_explicit_nullable) |
OLD | NEW |