Commit 656b425c authored by sigbjornf@opera.com's avatar sigbjornf@opera.com

CompositorWorker is now always on the heap.

Consequently, update its IDL attribute to [GarbageCollected] and adjust
the return type of its constructor.

R=haraken
BUG=522949

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

git-svn-id: svn://svn.chromium.org/blink/trunk@200964 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 4b9b44a6
......@@ -20,7 +20,7 @@ inline CompositorWorker::CompositorWorker(ExecutionContext* context)
{
}
PassRefPtrWillBeRawPtr<CompositorWorker> CompositorWorker::create(ExecutionContext* context, const String& url, ExceptionState& exceptionState)
CompositorWorker* CompositorWorker::create(ExecutionContext* context, const String& url, ExceptionState& exceptionState)
{
ASSERT(isMainThread());
Document* document = toDocument(context);
......@@ -28,9 +28,9 @@ PassRefPtrWillBeRawPtr<CompositorWorker> CompositorWorker::create(ExecutionConte
exceptionState.throwDOMException(InvalidAccessError, "The context provided is invalid.");
return nullptr;
}
RefPtrWillBeRawPtr<CompositorWorker> worker = adoptRefWillBeNoop(new CompositorWorker(context));
CompositorWorker* worker = new CompositorWorker(context);
if (worker->initialize(context, url, exceptionState))
return worker.release();
return worker;
return nullptr;
}
......
......@@ -18,7 +18,7 @@ class WorkerGlobalScopeProxy;
class CompositorWorker final : public InProcessWorkerBase {
DEFINE_WRAPPERTYPEINFO();
public:
static PassRefPtrWillBeRawPtr<CompositorWorker> create(ExecutionContext*, const String& url, ExceptionState&);
static CompositorWorker* create(ExecutionContext*, const String& url, ExceptionState&);
~CompositorWorker() override;
const AtomicString& interfaceName() const override;
......
......@@ -6,9 +6,9 @@
ActiveDOMObject,
Constructor(DOMString scriptUrl),
ConstructorCallWith=ExecutionContext,
GarbageCollected,
RaisesException=Constructor,
RuntimeEnabled=CompositorWorker,
WillBeGarbageCollected,
] interface CompositorWorker : EventTarget {
attribute EventHandler onmessage;
[PostMessage, RaisesException] void postMessage(SerializedScriptValue message, optional sequence<Transferable> transfer);
......
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