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

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

Issue 1638563002: DevTools: migrate ScriptFunctionCall off ScriptValue (to be inlined into the InjectedScript.cpp). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ready for review Created 4 years, 11 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/ScriptFunctionCall.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/ScriptFunctionCall.h b/third_party/WebKit/Source/bindings/core/v8/ScriptFunctionCall.h
index 52c44c66778025a41970c4a32f4dcaed7602651d..58f9a760a00ba80fe9ff8ff1364ac0332e91c838 100644
--- a/third_party/WebKit/Source/bindings/core/v8/ScriptFunctionCall.h
+++ b/third_party/WebKit/Source/bindings/core/v8/ScriptFunctionCall.h
@@ -31,42 +31,35 @@
#ifndef ScriptFunctionCall_h
#define ScriptFunctionCall_h
-#include "bindings/core/v8/ScriptValue.h"
#include "wtf/Vector.h"
#include "wtf/text/WTFString.h"
+#include <v8.h>
namespace blink {
-class ScriptValue;
-class ScriptCallArgumentHandler {
+class ScriptFunctionCall {
STACK_ALLOCATED();
public:
- ScriptCallArgumentHandler(ScriptState* scriptState) : m_scriptState(scriptState) { }
+ ScriptFunctionCall(v8::Local<v8::Context>, v8::Local<v8::Value>, const String& name);
void appendArgument(v8::Local<v8::Value>);
- void appendArgument(const ScriptValue&);
void appendArgument(const String&);
void appendArgument(int);
void appendArgument(bool);
void appendUndefinedArgument();
-protected:
- RefPtr<ScriptState> m_scriptState;
- Vector<ScriptValue> m_arguments;
-};
-
-class ScriptFunctionCall : public ScriptCallArgumentHandler {
- STACK_ALLOCATED();
-public:
- ScriptFunctionCall(const ScriptValue& thisObject, const String& name);
- ScriptValue call(bool& hadException, bool reportExceptions = true);
- ScriptValue call();
+ v8::Local<v8::Value> call(bool& hadException, bool reportExceptions = true);
+ v8::Local<v8::Value> call();
v8::Local<v8::Function> function();
- ScriptValue callWithoutExceptionHandling();
+ v8::Local<v8::Value> callWithoutExceptionHandling();
+ v8::Local<v8::Context> context() { return m_context; }
+
protected:
- ScriptValue m_thisObject;
- String m_name;
+ v8::Local<v8::Context> m_context;
+ Vector<v8::Local<v8::Value>> m_arguments;
+ v8::Local<v8::String> m_name;
+ v8::Local<v8::Value> m_value;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698