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

Unified Diff: Source/bindings/v8/custom/V8DataViewCustom.cpp

Issue 16951005: Add support for byte and octet Web IDL types to the bindings generator (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take Joshua's feedback into consideration Created 7 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/v8/V8Binding.cpp ('k') | Source/core/html/canvas/DataView.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/v8/custom/V8DataViewCustom.cpp
diff --git a/Source/bindings/v8/custom/V8DataViewCustom.cpp b/Source/bindings/v8/custom/V8DataViewCustom.cpp
index 89352700e5d944ef2151bc6cfb6a8006b91c1de7..b8120e98afe105619f115c6dcf5bb88d8faea558 100644
--- a/Source/bindings/v8/custom/V8DataViewCustom.cpp
+++ b/Source/bindings/v8/custom/V8DataViewCustom.cpp
@@ -57,76 +57,4 @@ v8::Handle<v8::Object> wrap(DataView* impl, v8::Handle<v8::Object> creationConte
return V8DataView::createWrapper(impl, creationContext, isolate);
}
-void V8DataView::getInt8MethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
-{
- if (args.Length() < 1) {
- throwNotEnoughArgumentsError(args.GetIsolate());
- return;
- }
-
- DataView* imp = V8DataView::toNative(args.Holder());
- ExceptionCode ec = 0;
- V8TRYCATCH_VOID(unsigned, byteOffset, toUInt32(args[0]));
- int8_t result = imp->getInt8(byteOffset, ec);
- if (UNLIKELY(ec)) {
- setDOMException(ec, args.GetIsolate());
- return;
- }
- v8SetReturnValue(args, result);
-}
-
-void V8DataView::getUint8MethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
-{
- if (args.Length() < 1) {
- throwNotEnoughArgumentsError(args.GetIsolate());
- return;
- }
-
- DataView* imp = V8DataView::toNative(args.Holder());
- ExceptionCode ec = 0;
- V8TRYCATCH_VOID(unsigned, byteOffset, toUInt32(args[0]));
- uint8_t result = imp->getUint8(byteOffset, ec);
- if (UNLIKELY(ec)) {
- setDOMException(ec, args.GetIsolate());
- return;
- }
- v8SetReturnValue(args, result);
-}
-
-void V8DataView::setInt8MethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
-{
- if (args.Length() < 2) {
- throwNotEnoughArgumentsError(args.GetIsolate());
- return;
- }
-
- DataView* imp = V8DataView::toNative(args.Holder());
- ExceptionCode ec = 0;
- V8TRYCATCH_VOID(unsigned, byteOffset, toUInt32(args[0]));
- V8TRYCATCH_VOID(int, value, toInt32(args[1]));
- imp->setInt8(byteOffset, static_cast<int8_t>(value), ec);
- if (UNLIKELY(ec)) {
- setDOMException(ec, args.GetIsolate());
- return;
- }
-}
-
-void V8DataView::setUint8MethodCustom(const v8::FunctionCallbackInfo<v8::Value>& args)
-{
- if (args.Length() < 2) {
- throwNotEnoughArgumentsError(args.GetIsolate());
- return;
- }
-
- DataView* imp = V8DataView::toNative(args.Holder());
- ExceptionCode ec = 0;
- V8TRYCATCH_VOID(unsigned, byteOffset, toUInt32(args[0]));
- V8TRYCATCH_VOID(int, value, toInt32(args[1]));
- imp->setUint8(byteOffset, static_cast<uint8_t>(value), ec);
- if (UNLIKELY(ec)) {
- setDOMException(ec, args.GetIsolate());
- return;
- }
-}
-
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/V8Binding.cpp ('k') | Source/core/html/canvas/DataView.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698