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

Unified Diff: third_party/WebKit/Source/platform/bindings/ToV8.h

Issue 2843143002: Move more files to platform/bindings (Closed)
Patch Set: Move back IDLDictionaryBase Created 3 years, 8 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/platform/bindings/ToV8.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ToV8.h b/third_party/WebKit/Source/platform/bindings/ToV8.h
similarity index 89%
copy from third_party/WebKit/Source/bindings/core/v8/ToV8.h
copy to third_party/WebKit/Source/platform/bindings/ToV8.h
index 10c1cd9e810a1ac923fd6bf209ba6189e889eb70..1cfa16a9a45dec14fa052d5a9bce97dd1e61a0bd 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ToV8.h
+++ b/third_party/WebKit/Source/platform/bindings/ToV8.h
@@ -10,14 +10,10 @@
#include <utility>
-#include "bindings/core/v8/DOMDataStore.h"
-#include "bindings/core/v8/IDLDictionaryBase.h"
-#include "bindings/core/v8/ScriptState.h"
-#include "bindings/core/v8/ScriptValue.h"
-#include "bindings/core/v8/ScriptWrappable.h"
-#include "bindings/core/v8/V8Binding.h"
-#include "core/CoreExport.h"
-#include "core/dom/ArrayBufferViewHelpers.h"
+#include "platform/bindings/DOMDataStore.h"
+#include "platform/bindings/ScriptState.h"
+#include "platform/bindings/ScriptWrappable.h"
+#include "platform/bindings/V8Binding.h"
#include "platform/heap/Handle.h"
#include "platform/wtf/Forward.h"
#include "v8/include/v8.h"
@@ -164,24 +160,6 @@ inline v8::Local<v8::Value> ToV8(const ToV8UndefinedGenerator& value,
return v8::Undefined(isolate);
}
-// ScriptValue
-
-inline v8::Local<v8::Value> ToV8(const ScriptValue& value,
- v8::Local<v8::Object> creation_context,
- v8::Isolate* isolate) {
- if (value.IsEmpty())
- return v8::Undefined(isolate);
- return value.V8Value();
-}
-
-// Dictionary
-
-inline v8::Local<v8::Value> ToV8(const IDLDictionaryBase& value,
- v8::Local<v8::Object> creation_context,
- v8::Isolate* isolate) {
- return value.ToV8Impl(creation_context, isolate);
-}
-
// Array
// Declare the function here but define it later so it can call the ToV8()
@@ -295,13 +273,6 @@ v8::Local<v8::Value> ToV8(void* value,
v8::Local<v8::Object> creation_context,
v8::Isolate*) = delete;
-// Cannot define in ScriptValue because of the circular dependency between toV8
-// and ScriptValue
-template <typename T>
-inline ScriptValue ScriptValue::From(ScriptState* script_state, T&& value) {
- return ScriptValue(script_state, ToV8(std::forward<T>(value), script_state));
-}
-
} // namespace blink
#endif // ToV8ForPlatform_h

Powered by Google App Engine
This is Rietveld 408576698