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

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

Issue 1079983002: Introduce SmallTypedArray IDL type and use it for bufferSubData (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updates Created 5 years, 8 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/v8_methods.py ('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/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'
])
« no previous file with comments | « Source/bindings/scripts/v8_methods.py ('k') | Source/bindings/templates/methods.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698