Chromium Code Reviews| Index: Source/bindings/scripts/v8_types.py |
| diff --git a/Source/bindings/scripts/v8_types.py b/Source/bindings/scripts/v8_types.py |
| index dcce52845ade81fd27a782f71c4a7199b08ca247..948d16b470be5339de0ddf3e6ec79b466c94c540 100644 |
| --- a/Source/bindings/scripts/v8_types.py |
| +++ b/Source/bindings/scripts/v8_types.py |
| @@ -54,6 +54,7 @@ NON_WRAPPER_TYPES = frozenset([ |
| 'EventListener', |
| 'NodeFilter', |
| 'SerializedScriptValue', |
| + 'SmallTypedArray', |
| ]) |
| TYPED_ARRAY_TYPES = frozenset([ |
| 'Float32Array', |
| @@ -111,6 +112,7 @@ CPP_SPECIAL_CONVERSION_RULES = { |
| 'NodeFilter': 'RefPtrWillBeRawPtr<NodeFilter>', |
| 'Promise': 'ScriptPromise', |
| 'ScriptValue': 'ScriptValue', |
| + 'SmallTypedArray': 'std::pair<void*, size_t>', |
| # FIXME: Eliminate custom bindings for XPathNSResolver http://crbug.com/345529 |
| 'XPathNSResolver': 'RefPtrWillBeRawPtr<XPathNSResolver>', |
| 'boolean': 'bool', |
| @@ -492,6 +494,7 @@ V8_VALUE_TO_CPP_VALUE = { |
| 'Promise': 'ScriptPromise::cast(ScriptState::current({isolate}), {v8_value})', |
| 'SerializedScriptValue': 'SerializedScriptValueFactory::instance().create({v8_value}, 0, 0, exceptionState, {isolate})', |
| 'ScriptValue': 'ScriptValue(ScriptState::current({isolate}), {v8_value})', |
| + 'SmallTypedArray': '{v8_value}->IsArrayBufferView() ? {variable_name} = std::make_pair(alloca(v8::ArrayBufferView::Cast(*{v8_value})->ByteLength()), v8::ArrayBufferView::Cast(*{v8_value})->ByteLength()), v8::ArrayBufferView::Cast(*{v8_value})->CopyContents({variable_name}.first, {variable_name}.second), {variable_name} : std::make_pair(nullptr, 0)', |
|
Ken Russell (switch to Gerrit)
2015/04/14 01:40:26
Is there any way to split this up into multiple ex
Jens Widell
2015/04/14 09:18:18
I think we should make a helper function out of it
|
| 'Window': 'toDOMWindow({isolate}, {v8_value})', |
| 'XPathNSResolver': 'toXPathNSResolver({isolate}, {v8_value})', |
| } |
| @@ -514,6 +517,7 @@ TRIVIAL_CONVERSIONS = frozenset([ |
| 'Date', |
| 'Dictionary', |
| 'NodeFilter', |
| + 'SmallTypedArray', |
| 'XPathNSResolver', |
| 'Promise' |
| ]) |