summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp')
-rw-r--r--WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp b/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
index ad4ed01..054f9ba 100644
--- a/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8InjectedScriptHostCustom.cpp
@@ -39,12 +39,14 @@
#include "InspectorController.h"
#include "Node.h"
#include "Page.h"
+#include "SerializedScriptValue.h"
#include "V8Binding.h"
#include "V8Database.h"
#include "V8Node.h"
#include "V8Proxy.h"
#include "V8Storage.h"
+#include <wtf/RefPtr.h>
namespace WebCore {
@@ -58,7 +60,7 @@ static void WeakReferenceCallback(v8::Persistent<v8::Value> object, void* parame
static v8::Local<v8::Object> createInjectedScriptHostV8Wrapper(InjectedScriptHost* host)
{
V8ClassIndex::V8WrapperType descriptorType = V8ClassIndex::INJECTEDSCRIPTHOST;
- v8::Local<v8::Function> function = V8DOMWrapper::getTemplate(descriptorType)->GetFunction();
+ v8::Local<v8::Function> function = V8InjectedScriptHost::GetTemplate()->GetFunction();
if (function.IsEmpty()) {
// Return if allocation failed.
return v8::Local<v8::Object>();
@@ -194,6 +196,19 @@ v8::Handle<v8::Value> V8InjectedScriptHost::selectDOMStorageCallback(const v8::A
}
#endif
+v8::Handle<v8::Value> V8InjectedScriptHost::reportDidDispatchOnInjectedScriptCallback(const v8::Arguments& args)
+{
+ INC_STATS("InjectedScriptHost.reportDidDispatchOnInjectedScript()");
+ if (args.Length() < 3)
+ return v8::Undefined();
+ InjectedScriptHost* host = V8InjectedScriptHost::toNative(args.Holder());
+ int callId = args[0]->ToInt32()->Value();
+ RefPtr<SerializedScriptValue> result(SerializedScriptValue::create(args[1]));
+ bool isException = args[2]->ToBoolean()->Value();
+ host->reportDidDispatchOnInjectedScript(callId, result.get(), isException);
+ return v8::Undefined();
+}
+
InjectedScript InjectedScriptHost::injectedScriptFor(ScriptState* inspectedScriptState)
{
v8::HandleScope handleScope;