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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.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/TestInterfaceOrLong.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp b/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp
index b910fb9ed36931dae6d62c52a176329e6cacffea..8dd9929a5fa6eca6b3381dc6857a8aae84882cda 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp
@@ -11,6 +11,8 @@
// clang-format off
#include "TestInterfaceOrLong.h"
+#include "bindings/core/v8/IDLTypes.h"
+#include "bindings/core/v8/NativeValueTraitsImpl.h"
#include "bindings/core/v8/ToV8.h"
#include "bindings/core/v8/V8TestInterface.h"
#include "bindings/tests/idls/core/TestImplements2.h"
@@ -79,7 +81,7 @@ void V8TestInterfaceOrLong::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8
}
if (v8Value->IsNumber()) {
- int32_t cppValue = toInt32(isolate, v8Value, NormalConversion, exceptionState);
+ int32_t cppValue = NativeValueTraits<IDLLong>::nativeValue(isolate, v8Value, exceptionState, NormalConversion);
if (exceptionState.hadException())
return;
impl.setLong(cppValue);
@@ -87,7 +89,7 @@ void V8TestInterfaceOrLong::toImpl(v8::Isolate* isolate, v8::Local<v8::Value> v8
}
{
- int32_t cppValue = toInt32(isolate, v8Value, NormalConversion, exceptionState);
+ int32_t cppValue = NativeValueTraits<IDLLong>::nativeValue(isolate, v8Value, exceptionState, NormalConversion);
if (exceptionState.hadException())
return;
impl.setLong(cppValue);

Powered by Google App Engine
This is Rietveld 408576698