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

Side by Side Diff: Source/bindings/core/v8/V8Binding.h

Issue 949193002: [bindings] Remove SQLTransaction's usage of custom binding. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed exception Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2012 Ericsson AB. All rights reserved. 3 * Copyright (C) 2012 Ericsson AB. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 exceptionState.rethrowV8Exception(block.Exception()); 723 exceptionState.rethrowV8Exception(block.Exception());
724 return Vector<T>(); 724 return Vector<T>();
725 } 725 }
726 result.uncheckedAppend(TraitsType::nativeValue(element, isolate, excepti onState)); 726 result.uncheckedAppend(TraitsType::nativeValue(element, isolate, excepti onState));
727 if (exceptionState.hadException()) 727 if (exceptionState.hadException())
728 return Vector<T>(); 728 return Vector<T>();
729 } 729 }
730 return result; 730 return result;
731 } 731 }
732 732
733 template <typename T>
734 Vector<T> toImplArray(const Vector<ScriptValue>& value, v8::Isolate* isolate, Ex ceptionState& exceptionState)
735 {
736 Vector<T> result;
737 result.reserveInitialCapacity(value.size());
738 for (unsigned i = 0; i < value.size(); ++i) {
739 result.uncheckedAppend(NativeValueTraits<T>::nativeValue(value[i].v8Valu e(), isolate, exceptionState));
740 if (exceptionState.hadException())
741 return Vector<T>();
742 }
743 return result;
744 }
745
733 template <class T> 746 template <class T>
734 Vector<T> toImplArguments(const v8::FunctionCallbackInfo<v8::Value>& info, int s tartIndex, ExceptionState& exceptionState) 747 Vector<T> toImplArguments(const v8::FunctionCallbackInfo<v8::Value>& info, int s tartIndex, ExceptionState& exceptionState)
735 { 748 {
736 Vector<T> result; 749 Vector<T> result;
737 typedef NativeValueTraits<T> TraitsType; 750 typedef NativeValueTraits<T> TraitsType;
738 int length = info.Length(); 751 int length = info.Length();
739 if (startIndex < length) { 752 if (startIndex < length) {
740 result.reserveInitialCapacity(length - startIndex); 753 result.reserveInitialCapacity(length - startIndex);
741 for (int i = startIndex; i < length; ++i) { 754 for (int i = startIndex; i < length; ++i) {
742 result.uncheckedAppend(TraitsType::nativeValue(info[i], info.GetIsol ate(), exceptionState)); 755 result.uncheckedAppend(TraitsType::nativeValue(info[i], info.GetIsol ate(), exceptionState));
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1010 1023
1011 // Callback functions used by generated code. 1024 // Callback functions used by generated code.
1012 void v8ConstructorAttributeGetterAsProperty(v8::Local<v8::String> propertyName, const v8::PropertyCallbackInfo<v8::Value>&); 1025 void v8ConstructorAttributeGetterAsProperty(v8::Local<v8::String> propertyName, const v8::PropertyCallbackInfo<v8::Value>&);
1013 void v8ConstructorAttributeGetterAsAccessor(const v8::FunctionCallbackInfo<v8::V alue>&); 1026 void v8ConstructorAttributeGetterAsAccessor(const v8::FunctionCallbackInfo<v8::V alue>&);
1014 1027
1015 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso late*); 1028 typedef void (*InstallTemplateFunction)(v8::Local<v8::FunctionTemplate>, v8::Iso late*);
1016 1029
1017 } // namespace blink 1030 } // namespace blink
1018 1031
1019 #endif // V8Binding_h 1032 #endif // V8Binding_h
OLDNEW
« no previous file with comments | « LayoutTests/storage/websql/sql-error-codes-expected.txt ('k') | Source/bindings/modules/v8/V8BindingForModules.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698