flutter_flutter/engine/core/app/AbstractModule.cpp
Adam Barth b71fee9e48 Move exports from Document to Module
This CL moves the |exports| from Document to the new |Module| interface,
matching the spec. Also, the |module| object available to scripts is now really
an instance of |Module|.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/703593003
2014-11-10 15:34:25 -08:00

28 lines
727 B
C++

// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "config.h"
#include "core/app/AbstractModule.h"
namespace blink {
AbstractModule::AbstractModule(ExecutionContext* context,
Document* document,
const String& url)
: ContextLifecycleObserver(context),
document_(document),
url_(url) {
document_->setModule(this);
}
AbstractModule::~AbstractModule() {
document_->setModule(nullptr);
}
ExecutionContext* AbstractModule::executionContext() const {
return ContextLifecycleObserver::executionContext();
}
} // namespace blink