Commit 69113fea authored by dominicc@chromium.org's avatar dominicc@chromium.org

Fix InstallPhaseEvent so that instances can be passed to script.

Events need to provide the V8Event binding their interface name (by
overriding Event::interfaceName) and set up wrapper info (by calling
ScriptWrappable::init.) Make InstallPhaseEvent follow the rules.

BUG=356021

Review URL: https://codereview.chromium.org/216603003

git-svn-id: svn://svn.chromium.org/blink/trunk@170322 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 688a9d5a
......@@ -31,8 +31,8 @@
#include "config.h"
#include "InstallPhaseEvent.h"
#include "bindings/v8/ScriptWrappable.h"
#include "modules/serviceworkers/WaitUntilObserver.h"
#include "platform/NotImplemented.h"
namespace WebCore {
......@@ -57,12 +57,19 @@ void InstallPhaseEvent::waitUntil(const ScriptValue& value)
InstallPhaseEvent::InstallPhaseEvent()
{
ScriptWrappable::init(this);
}
InstallPhaseEvent::InstallPhaseEvent(const AtomicString& type, const EventInit& initializer, PassRefPtr<WaitUntilObserver> observer)
: Event(type, initializer)
, m_observer(observer)
{
ScriptWrappable::init(this);
}
const AtomicString& InstallPhaseEvent::interfaceName() const
{
return EventNames::InstallPhaseEvent;
}
void InstallPhaseEvent::trace(Visitor* visitor)
......
......@@ -47,6 +47,7 @@ public:
void waitUntil(const ScriptValue&);
virtual const AtomicString& interfaceName() const OVERRIDE;
virtual void trace(Visitor*) OVERRIDE;
protected:
......
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