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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp

Issue 2730183003: bindings: Add C++ versions of WebIDL types and generalize NativeValueTraits. (Closed)
Patch Set: Move specialization for SerializedScriptValue to the appropriate header Created 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
index c0f6cf3659d58dbb95d758624b404a156f565e45..1b5632eac7f4e8dbeb191a49299d3cf56a199f16 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestInterface2.cpp
@@ -12,6 +12,8 @@
#include "V8TestInterface2.h"
#include "bindings/core/v8/ExceptionState.h"
+#include "bindings/core/v8/IDLTypes.h"
+#include "bindings/core/v8/NativeValueTraitsImpl.h"
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/V8DOMConfiguration.h"
@@ -68,7 +70,7 @@ static void legacyCallerMethod(const v8::FunctionCallbackInfo<v8::Value>& info)
}
uint32_t index;
- index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
+ index = NativeValueTraits<IDLUnsignedLong>::nativeValue(info.GetIsolate(), info[0], exceptionState, NormalConversion);
if (exceptionState.hadException())
return;
@@ -86,7 +88,7 @@ static void itemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
}
uint32_t index;
- index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
+ index = NativeValueTraits<IDLUnsignedLong>::nativeValue(info.GetIsolate(), info[0], exceptionState, NormalConversion);
if (exceptionState.hadException())
return;
@@ -109,7 +111,7 @@ static void setItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
uint32_t index;
TestInterfaceEmpty* value;
- index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
+ index = NativeValueTraits<IDLUnsignedLong>::nativeValue(info.GetIsolate(), info[0], exceptionState, NormalConversion);
if (exceptionState.hadException())
return;
@@ -138,7 +140,7 @@ static void deleteItemMethod(const v8::FunctionCallbackInfo<v8::Value>& info) {
}
uint32_t index;
- index = toUInt32(info.GetIsolate(), info[0], NormalConversion, exceptionState);
+ index = NativeValueTraits<IDLUnsignedLong>::nativeValue(info.GetIsolate(), info[0], exceptionState, NormalConversion);
if (exceptionState.hadException())
return;
@@ -661,6 +663,10 @@ TestInterface2* V8TestInterface2::toImplWithTypeCheck(v8::Isolate* isolate, v8::
return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
}
+TestInterface2* NativeValueTraits<TestInterface2>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
+ return V8TestInterface2::toImplWithTypeCheck(isolate, value);
+}
+
InstallTemplateFunction V8TestInterface2::installV8TestInterface2TemplateFunction =
&V8TestInterface2::installV8TestInterface2Template;

Powered by Google App Engine
This is Rietveld 408576698