summaryrefslogtreecommitdiffstats
path: root/WebCore/bindings/v8
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/bindings/v8')
-rw-r--r--WebCore/bindings/v8/IDBBindingUtilities.cpp4
-rw-r--r--WebCore/bindings/v8/ScriptDebugServer.cpp6
-rw-r--r--WebCore/bindings/v8/V8Proxy.cpp10
-rw-r--r--WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp2
-rw-r--r--WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp7
5 files changed, 24 insertions, 5 deletions
diff --git a/WebCore/bindings/v8/IDBBindingUtilities.cpp b/WebCore/bindings/v8/IDBBindingUtilities.cpp
index 644e2d2..509d7c5 100644
--- a/WebCore/bindings/v8/IDBBindingUtilities.cpp
+++ b/WebCore/bindings/v8/IDBBindingUtilities.cpp
@@ -41,8 +41,8 @@ PassRefPtr<IDBKey> createIDBKeyFromValue(v8::Handle<v8::Value> value)
{
if (value->IsNull())
return IDBKey::create();
- if (value->IsInt32())
- return IDBKey::create(value->Int32Value());
+ if (value->IsNumber())
+ return IDBKey::create(value->NumberValue());
if (value->IsString())
return IDBKey::create(v8ValueToWebCoreString(value));
if (value->IsDate())
diff --git a/WebCore/bindings/v8/ScriptDebugServer.cpp b/WebCore/bindings/v8/ScriptDebugServer.cpp
index 7a8dbf7..9dfca55 100644
--- a/WebCore/bindings/v8/ScriptDebugServer.cpp
+++ b/WebCore/bindings/v8/ScriptDebugServer.cpp
@@ -113,8 +113,10 @@ void ScriptDebugServer::addListener(ScriptDebugListener* listener, Page* page)
}
m_listenersMap.set(page, listener);
- v8::Local<v8::Context> context = proxy->mainWorldContext();
-
+ V8DOMWindowShell* shell = proxy->windowShell();
+ if (!shell->isContextInitialized())
+ return;
+ v8::Handle<v8::Context> context = shell->context();
v8::Handle<v8::Function> getScriptsFunction = v8::Local<v8::Function>::Cast(m_debuggerScript.get()->Get(v8::String::New("getScripts")));
v8::Handle<v8::Value> argv[] = { context->GetData() };
v8::Handle<v8::Value> value = getScriptsFunction->Call(m_debuggerScript.get(), 1, argv);
diff --git a/WebCore/bindings/v8/V8Proxy.cpp b/WebCore/bindings/v8/V8Proxy.cpp
index df3670d..5eaba00 100644
--- a/WebCore/bindings/v8/V8Proxy.cpp
+++ b/WebCore/bindings/v8/V8Proxy.cpp
@@ -37,6 +37,7 @@
#include "DocumentLoader.h"
#include "Frame.h"
#include "FrameLoaderClient.h"
+#include "IDBDatabaseException.h"
#include "IDBFactoryBackendInterface.h"
#include "IDBPendingTransactionMonitor.h"
#include "InspectorInstrumentation.h"
@@ -64,6 +65,10 @@
#include "WorkerContext.h"
#include "WorkerContextExecutionProxy.h"
+#if ENABLE(INDEXED_DATABASE)
+#include "V8IDBDatabaseException.h"
+#endif
+
#if ENABLE(SVG)
#include "V8SVGException.h"
#endif
@@ -707,6 +712,11 @@ void V8Proxy::setDOMException(int exceptionCode)
exception = toV8(FileException::create(description));
break;
#endif
+#if ENABLE(INDEXED_DATABASE)
+ case IDBDatabaseExceptionType:
+ exception = toV8(IDBDatabaseException::create(description));
+ break;
+#endif
default:
ASSERT_NOT_REACHED();
}
diff --git a/WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp b/WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp
index 2afa55f..be05a80 100644
--- a/WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8IDBKeyCustom.cpp
@@ -45,7 +45,7 @@ v8::Handle<v8::Value> toV8(IDBKey* key)
case IDBKey::NullType:
return v8::Null();
case IDBKey::NumberType:
- return v8::Integer::New(key->number());
+ return v8::Number::New(key->number());
case IDBKey::StringType:
return v8String(key->string());
// FIXME: Implement dates.
diff --git a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
index 5c56cfb..6a571ae 100644
--- a/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
+++ b/WebCore/bindings/v8/custom/V8XMLHttpRequestCustom.cpp
@@ -193,6 +193,13 @@ v8::Handle<v8::Value> V8XMLHttpRequest::sendCallback(const v8::Arguments& args)
DOMFormData* domFormData = V8DOMFormData::toNative(object);
ASSERT(domFormData);
xmlHttpRequest->send(domFormData, ec);
+#if ENABLE(3D_CANVAS) || ENABLE(BLOB)
+ } else if (V8ArrayBuffer::HasInstance(arg)) {
+ v8::Handle<v8::Object> object = v8::Handle<v8::Object>::Cast(arg);
+ ArrayBuffer* arrayBuffer = V8ArrayBuffer::toNative(object);
+ ASSERT(arrayBuffer);
+ xmlHttpRequest->send(arrayBuffer, ec);
+#endif
} else
xmlHttpRequest->send(toWebCoreStringWithNullCheck(arg), ec);
}