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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.cpp

Issue 2228283002: Make a deserializing function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 years, 4 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/GeneratedCodeHelper.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.cpp b/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.cpp
index 57ecd06e260cd8558fd4ac99ce9383f8cd2a23e5..e449086ed7acba36288a6a3904f1cc105dae021c 100644
--- a/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/GeneratedCodeHelper.cpp
@@ -4,6 +4,7 @@
#include "bindings/core/v8/GeneratedCodeHelper.h"
+#include "bindings/core/v8/SerializedScriptValue.h"
#include "bindings/core/v8/V8Binding.h"
namespace blink {
@@ -18,4 +19,11 @@ void v8ConstructorAttributeGetter(v8::Local<v8::Name> propertyName, const v8::Pr
v8SetReturnValue(info, perContextData->constructorForType(WrapperTypeInfo::unwrap(data)));
}
+v8::Local<v8::Value> v8Deserialize(v8::Isolate* isolate, PassRefPtr<SerializedScriptValue> value)
+{
+ if (value)
+ return value->deserialize();
+ return v8::Null(isolate);
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698