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

Unified Diff: third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.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/V8TestNode.cpp
diff --git a/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp b/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
index a9bdc0bf00e3ec66dd5c7e88ad924e1d3522cb2e..deb00cce3ec002037dcbc080ef1fc904d0ec341d 100644
--- a/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
+++ b/third_party/WebKit/Source/bindings/tests/results/core/V8TestNode.cpp
@@ -12,6 +12,8 @@
#include "V8TestNode.h"
#include "bindings/core/v8/ExceptionState.h"
+#include "bindings/core/v8/IDLTypes.h"
+#include "bindings/core/v8/NativeValueTraitsImpl.h"
#include "bindings/core/v8/V8DOMConfiguration.h"
#include "bindings/core/v8/V8ObjectConstructor.h"
#include "core/dom/Document.h"
@@ -131,7 +133,7 @@ static void hrefByteStringAttributeSetter(v8::Local<v8::Value> v8Value, const v8
ExceptionState exceptionState(info.GetIsolate(), ExceptionState::SetterContext, "TestNode", "hrefByteString");
// Prepare the value to be set.
- V8StringResource<> cppValue = toByteString(info.GetIsolate(), v8Value, exceptionState);
+ V8StringResource<> cppValue = NativeValueTraits<IDLByteString>::nativeValue(info.GetIsolate(), v8Value, exceptionState);
if (exceptionState.hadException())
return;
@@ -241,4 +243,8 @@ TestNode* V8TestNode::toImplWithTypeCheck(v8::Isolate* isolate, v8::Local<v8::Va
return hasInstance(value, isolate) ? toImpl(v8::Local<v8::Object>::Cast(value)) : nullptr;
}
+TestNode* NativeValueTraits<TestNode>::nativeValue(v8::Isolate* isolate, v8::Local<v8::Value> value, ExceptionState& exceptionState) {
+ return V8TestNode::toImplWithTypeCheck(isolate, value);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698