Commit 4fd3295a authored by dimich@chromium.org's avatar dimich@chromium.org

2009-06-12 Dmitry Titov <dimich@chromium.org>

        Reviewed by David Levin.

        https://bugs.webkit.org/show_bug.cgi?id=26359
        [v8] Add XMLHttpRequest to WorkerContextExecutionProxy.

        * bindings/v8/WorkerContextExecutionProxy.cpp:
        (WebCore::WorkerContextExecutionProxy::ToV8Object): Add type == V8ClassIndex::XMLHTTPREQUEST to the convertable types.
        (WebCore::WorkerContextExecutionProxy::EventTargetToV8Object): same.
        * bindings/v8/WorkerContextExecutionProxy.h: fix typo in the comment.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44635 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 10e5b780
2009-06-12 Dmitry Titov <dimich@chromium.org>
Reviewed by David Levin.
https://bugs.webkit.org/show_bug.cgi?id=26359
[v8] Add XMLHttpRequest to WorkerContextExecutionProxy.
* bindings/v8/WorkerContextExecutionProxy.cpp:
(WebCore::WorkerContextExecutionProxy::ToV8Object): Add type == V8ClassIndex::XMLHTTPREQUEST to the convertable types.
(WebCore::WorkerContextExecutionProxy::EventTargetToV8Object): same.
* bindings/v8/WorkerContextExecutionProxy.h: fix typo in the comment.
2009-06-12 Peter Kasting <pkasting@google.com>
Reviewed by Eric Seidel.
......@@ -217,7 +217,7 @@ v8::Handle<v8::Value> WorkerContextExecutionProxy::ToV8Object(V8ClassIndex::V8Wr
if (type == V8ClassIndex::WORKERCONTEXT)
return WorkerContextToV8Object(static_cast<WorkerContext*>(impl));
if (type == V8ClassIndex::WORKER) {
if (type == V8ClassIndex::WORKER || type == V8ClassIndex::XMLHTTPREQUEST) {
v8::Persistent<v8::Object> result = getActiveDOMObjectMap().get(impl);
if (!result.IsEmpty())
return result;
......@@ -293,6 +293,10 @@ v8::Handle<v8::Value> WorkerContextExecutionProxy::EventTargetToV8Object(EventTa
if (worker)
return ToV8Object(V8ClassIndex::WORKER, worker);
XMLHttpRequest* xhr = target->toXMLHttpRequest();
if (xhr)
return ToV8Object(V8ClassIndex::XMLHTTPREQUEST, xhr);
ASSERT_NOT_REACHED();
return v8::Handle<v8::Value>();
}
......
......@@ -53,7 +53,7 @@ namespace WebCore {
WorkerContextExecutionProxy(WorkerContext*);
~WorkerContextExecutionProxy();
// FIXME: following function sshould have camelCased names once V8 code-generating script is migrated.
// FIXME: following function should have camelCased names once V8 code-generating script is migrated.
v8::Local<v8::Context> GetContext() { return v8::Local<v8::Context>::New(m_context); }
v8::Local<v8::Function> GetConstructor(V8ClassIndex::V8WrapperType);
void RemoveEventListener(V8EventListener*);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment