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

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: Created 3 years, 10 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..c3bcdf8759b6e0cbb509c1693d9b551e63293f8e 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/TestInterfaceOrLong.cpp
@@ -11,7 +11,9 @@
// clang-format off
#include "TestInterfaceOrLong.h"
+#include "bindings/core/v8/IDLTypes.h"
#include "bindings/core/v8/ToV8.h"
+#include "bindings/core/v8/V8BindingForIDLTypes.h"
#include "bindings/core/v8/V8TestInterface.h"
#include "bindings/tests/idls/core/TestImplements2.h"
#include "bindings/tests/idls/core/TestImplements3Implementation.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