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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h

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/core/v8/SerializedScriptValue.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h
index ceb9d63e64389f54d7ef4cec4ed2bf23c86c38de..b610b640aedbcd9a0e3b4efdc3e24e4c63c62cee 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h
+++ b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValue.h
@@ -33,6 +33,7 @@
#include <memory>
+#include "bindings/core/v8/NativeValueTraits.h"
#include "bindings/core/v8/ScriptValue.h"
#include "bindings/core/v8/Transferables.h"
#include "core/CoreExport.h"
@@ -182,6 +183,18 @@ class CORE_EXPORT SerializedScriptValue
intptr_t m_externallyAllocatedMemory;
};
+template <>
+struct NativeValueTraits<SerializedScriptValue>
+ : public NativeValueTraitsBase<SerializedScriptValue> {
+ CORE_EXPORT static inline PassRefPtr<SerializedScriptValue> nativeValue(
+ v8::Isolate* isolate,
+ v8::Local<v8::Value> value,
+ ExceptionState& exceptionState) {
+ return SerializedScriptValue::serialize(isolate, value, nullptr, nullptr,
+ exceptionState);
+ }
+};
+
} // namespace blink
#endif // SerializedScriptValue_h

Powered by Google App Engine
This is Rietveld 408576698