~ubuntu-branches/ubuntu/karmic/webkit/karmic-proposed

« back to all changes in this revision

Viewing changes to WebCore/bindings/js/JSMessagePortCustom.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo Noronha Silva
  • Date: 2009-05-15 18:30:58 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090515183058-50q5exjo9b1kxy9s
Tags: 1.1.7-1
* New upstream release
* debian/libwebkit-1.0-2.symbols:
- updated with the new symbols in 1.1.7
* debian/libwebkit-dev.install, debian/libwebkit-dev.links,
  debian/rules:
- Build, and ship gtk-doc documentation (Closes: #526683)
* debian/copyright:
- updated.

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
    }
61
61
}
62
62
 
63
 
JSValuePtr JSMessagePort::startConversation(ExecState* exec, const ArgList& args)
 
63
JSValue JSMessagePort::startConversation(ExecState* exec, const ArgList& args)
64
64
{
65
65
    JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject());
66
 
    const UString& message = args.at(exec, 0).toString(exec);
 
66
    const UString& message = args.at(0).toString(exec);
67
67
 
68
68
    return toJS(exec, impl()->startConversation(globalObject->scriptExecutionContext(), message).get());
69
69
}
70
70
 
71
 
JSValuePtr JSMessagePort::addEventListener(ExecState* exec, const ArgList& args)
 
71
JSValue JSMessagePort::addEventListener(ExecState* exec, const ArgList& args)
72
72
{
73
73
    JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(impl()->scriptExecutionContext());
74
74
    if (!globalObject)
75
75
        return jsUndefined();
76
 
    RefPtr<JSEventListener> listener = globalObject->findOrCreateJSEventListener(args.at(exec, 1));
 
76
    RefPtr<JSEventListener> listener = globalObject->findOrCreateJSEventListener(args.at(1));
77
77
    if (!listener)
78
78
        return jsUndefined();
79
 
    impl()->addEventListener(args.at(exec, 0).toString(exec), listener.release(), args.at(exec, 2).toBoolean(exec));
 
79
    impl()->addEventListener(args.at(0).toString(exec), listener.release(), args.at(2).toBoolean(exec));
80
80
    return jsUndefined();
81
81
}
82
82
 
83
 
JSValuePtr JSMessagePort::removeEventListener(ExecState* exec, const ArgList& args)
 
83
JSValue JSMessagePort::removeEventListener(ExecState* exec, const ArgList& args)
84
84
{
85
85
    JSDOMGlobalObject* globalObject = toJSDOMGlobalObject(impl()->scriptExecutionContext());
86
86
    if (!globalObject)
87
87
        return jsUndefined();
88
 
    JSEventListener* listener = globalObject->findJSEventListener(args.at(exec, 1));
 
88
    JSEventListener* listener = globalObject->findJSEventListener(args.at(1));
89
89
    if (!listener)
90
90
        return jsUndefined();
91
 
    impl()->removeEventListener(args.at(exec, 0).toString(exec), listener, args.at(exec, 2).toBoolean(exec));
 
91
    impl()->removeEventListener(args.at(0).toString(exec), listener, args.at(2).toBoolean(exec));
92
92
    return jsUndefined();
93
93
}
94
94