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

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

Issue 2010103002: [Binding] [Refactoring] Remove redundant overloaded methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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/SerializedScriptValueFactory.cpp
diff --git a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueFactory.cpp b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueFactory.cpp
index 6b69eae8bd0d1cab784c1388ab93b94d879f6f8a..5b01a7abe72d7f44377a2554ff0f6924cee419de 100644
--- a/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueFactory.cpp
+++ b/third_party/WebKit/Source/bindings/core/v8/SerializedScriptValueFactory.cpp
@@ -24,7 +24,7 @@ PassRefPtr<SerializedScriptValue> SerializedScriptValueFactory::create(v8::Isola
String errorMessage;
{
v8::TryCatch tryCatch(isolate);
- status = doSerialize(value, writer, transferables, blobInfo, serializedValue.get(), tryCatch, errorMessage, isolate);
+ status = doSerialize(value, writer, transferables, blobInfo, serializedValue->blobDataHandles(), tryCatch, errorMessage, isolate);
if (status == ScriptValueSerializer::JSException) {
// If there was a JS exception thrown, re-throw it.
exceptionState.rethrowV8Exception(tryCatch.Exception());
@@ -53,21 +53,10 @@ PassRefPtr<SerializedScriptValue> SerializedScriptValueFactory::create(v8::Isola
return create(isolate, value, writer, transferables, blobInfo, exceptionState);
}
-PassRefPtr<SerializedScriptValue> SerializedScriptValueFactory::create(v8::Isolate* isolate, v8::Local<v8::Value> value, Transferables* transferables, ExceptionState& exceptionState)
-{
- return create(isolate, value, transferables, 0, exceptionState);
-}
-
PassRefPtr<SerializedScriptValue> SerializedScriptValueFactory::createAndSwallowExceptions(v8::Isolate* isolate, v8::Local<v8::Value> value)
{
TrackExceptionState exceptionState;
- return create(isolate, value, nullptr, exceptionState);
-}
-
-PassRefPtr<SerializedScriptValue> SerializedScriptValueFactory::create(v8::Isolate* isolate, const ScriptValue& value, WebBlobInfoArray* blobInfo, ExceptionState& exceptionState)
-{
- ASSERT(isolate->InContext());
- return create(isolate, value.v8Value(), nullptr, blobInfo, exceptionState);
+ return create(isolate, value, nullptr, nullptr, exceptionState);
}
PassRefPtr<SerializedScriptValue> SerializedScriptValueFactory::create(const String& data)
@@ -94,11 +83,6 @@ void SerializedScriptValueFactory::transferData(SerializedScriptValue* serialize
serializedValue->transferOffscreenCanvas(isolate, transferables->offscreenCanvases, exceptionState);
}
-ScriptValueSerializer::Status SerializedScriptValueFactory::doSerialize(v8::Local<v8::Value> value, SerializedScriptValueWriter& writer, Transferables* transferables, WebBlobInfoArray* blobInfo, SerializedScriptValue* serializedValue, v8::TryCatch& tryCatch, String& errorMessage, v8::Isolate* isolate)
-{
- return doSerialize(value, writer, transferables, blobInfo, serializedValue->blobDataHandles(), tryCatch, errorMessage, isolate);
-}
-
ScriptValueSerializer::Status SerializedScriptValueFactory::doSerialize(v8::Local<v8::Value> value, SerializedScriptValueWriter& writer, Transferables* transferables, WebBlobInfoArray* blobInfo, BlobDataHandleMap& blobDataHandles, v8::TryCatch& tryCatch, String& errorMessage, v8::Isolate* isolate)
{
ScriptValueSerializer serializer(writer, transferables, blobInfo, blobDataHandles, tryCatch, ScriptState::current(isolate));

Powered by Google App Engine
This is Rietveld 408576698